aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi/glapi/Makefile
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-21 08:10:52 +0000
committermarha <marha@users.sourceforge.net>2011-01-21 08:10:52 +0000
commitb0be6a88c8fecdf15176f642c0799bff99930e0d (patch)
treeec9fea5c77c9d705757c0533beb059c467a16393 /mesalib/src/mapi/glapi/Makefile
parentb582c2f2afd66e3afa0d143923e8b71985e39a6c (diff)
downloadvcxsrv-b0be6a88c8fecdf15176f642c0799bff99930e0d.tar.gz
vcxsrv-b0be6a88c8fecdf15176f642c0799bff99930e0d.tar.bz2
vcxsrv-b0be6a88c8fecdf15176f642c0799bff99930e0d.zip
xserver mesa xkbcomp libxcb git update 21 jan 2011
Diffstat (limited to 'mesalib/src/mapi/glapi/Makefile')
-rw-r--r--mesalib/src/mapi/glapi/Makefile120
1 files changed, 67 insertions, 53 deletions
diff --git a/mesalib/src/mapi/glapi/Makefile b/mesalib/src/mapi/glapi/Makefile
index 803926147..203a8abd0 100644
--- a/mesalib/src/mapi/glapi/Makefile
+++ b/mesalib/src/mapi/glapi/Makefile
@@ -1,53 +1,67 @@
-# src/mapi/glapi/Makefile
-
-TOP = ../../..
-include $(TOP)/configs/current
-
-TARGET = glapi
-
-MAPI = $(TOP)/src/mapi/mapi
-
-include sources.mak
-GLAPI_OBJECTS = $(GLAPI_SOURCES:.c=.o)
-GLAPI_ASM_OBJECTS = $(GLAPI_ASM_SOURCES:.S=.o)
-
-include $(MAPI)/sources.mak
-MAPI_UTIL_OBJECTS := $(MAPI_UTIL_SOURCES:.c=.o)
-MAPI_UTIL_SOURCES := $(addprefix $(MAPI)/, $(MAPI_UTIL_SOURCES))
-
-TARGET_OBJECTS = $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) $(MAPI_UTIL_OBJECTS)
-
-INCLUDE_DIRS = \
- -I$(TOP)/include \
- -I$(TOP)/src/mapi \
- -I$(TOP)/src/mesa
-
-default: depend lib$(TARGET).a
-
-lib$(TARGET).a: $(TARGET_OBJECTS)
- @$(MKLIB) -o $(TARGET) -static $(TARGET_OBJECTS)
-
-$(GLAPI_OBJECTS): %.o: %.c
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_MODE_UTIL $< -o $@
-
-$(GLAPI_ASM_OBJECTS): %.o: %.S
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
-
-$(MAPI_UTIL_OBJECTS): %.o: $(MAPI)/%.c
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_MODE_UTIL $< -o $@
-
-install:
-
-clean:
- -rm -f $(TARGET_OBJECTS)
- -rm -f lib$(TARGET).a
- -rm -f depend depend.bak
-
-depend: $(GLAPI_SOURCES) $(MAPI_UTIL_SOURCES)
- @ echo "running $(MKDEP)"
- @ touch depend
- @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \
- -DMAPI_MODE_UTIL $(GLAPI_SOURCES) $(MAPI_UTIL_SOURCES) \
- 2>/dev/null | sed -e 's,^$(MAPI)/,,' > depend
-
--include depend
+# src/mapi/glapi/Makefile
+
+TOP = ../../..
+include $(TOP)/configs/current
+
+TARGET = glapi
+
+MAPI = $(TOP)/src/mapi/mapi
+
+include sources.mak
+include $(MAPI)/sources.mak
+
+glapi_CPPFLAGS := \
+ -I$(TOP)/include \
+ -I$(TOP)/src/mapi \
+ -I$(TOP)/src/mesa \
+ -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
+
+ifeq ($(SHARED_GLAPI),1)
+glapi_CPPFLAGS += -DMAPI_MODE_BRIDGE
+glapi_SOURCES := $(addprefix $(MAPI)/, $(MAPI_BRIDGE_SOURCES))
+
+glapi_GLAPI_OBJECTS :=
+glapi_ASM_OBJECTS :=
+glapi_MAPI_OBJECTS := $(MAPI_BRIDGE_SOURCES:.c=.o)
+else
+glapi_CPPFLAGS += -DMAPI_MODE_UTIL
+glapi_SOURCES := $(GLAPI_SOURCES) $(addprefix $(MAPI)/, $(MAPI_UTIL_SOURCES))
+
+glapi_GLAPI_OBJECTS := $(GLAPI_SOURCES:.c=.o)
+glapi_ASM_OBJECTS := $(GLAPI_ASM_SOURCES:.S=.o)
+glapi_MAPI_OBJECTS := $(MAPI_UTIL_SOURCES:.c=.o)
+endif # SHARED_GLAPI
+
+glapi_OBJECTS := \
+ $(glapi_GLAPI_OBJECTS) \
+ $(glapi_ASM_OBJECTS) \
+ $(glapi_MAPI_OBJECTS)
+
+default: depend lib$(TARGET).a
+
+lib$(TARGET).a: $(glapi_OBJECTS)
+ @$(MKLIB) -o $(TARGET) -static $(glapi_OBJECTS)
+
+$(glapi_GLAPI_OBJECTS): %.o: %.c
+ $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
+
+$(glapi_ASM_OBJECTS): %.o: %.S
+ $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
+
+$(glapi_MAPI_OBJECTS): %.o: $(MAPI)/%.c
+ $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
+
+install:
+
+clean:
+ -rm -f $(glapi_OBJECTS)
+ -rm -f lib$(TARGET).a
+ -rm -f depend depend.bak
+
+depend: $(glapi_SOURCES)
+ @ echo "running $(MKDEP)"
+ @ touch depend
+ @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(glapi_CPPFLAGS) \
+ $(glapi_SOURCES) 2>/dev/null | sed -e 's,^$(MAPI)/,,' > depend
+
+-include depend