summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mapi/es1api/Makefile7
-rw-r--r--src/mapi/glapi/Makefile18
-rw-r--r--src/mapi/shared-glapi/Makefile7
-rw-r--r--src/mapi/vgapi/Makefile5
4 files changed, 30 insertions, 7 deletions
diff --git a/src/mapi/es1api/Makefile b/src/mapi/es1api/Makefile
index 4fa68e5c39d..aef694866c2 100644
--- a/src/mapi/es1api/Makefile
+++ b/src/mapi/es1api/Makefile
@@ -124,10 +124,15 @@ install: default install-headers install-pc
$(MINSTALL) $(TOP)/$(LIB_DIR)/$(esapi_LIB_GLOB) \
$(DESTDIR)$(INSTALL_LIB_DIR)
+# workaround a bug in makedepend
+makedepend_CPPFLAGS := \
+ $(filter-out -DMAPI_ABI_HEADER=%, $(esapi_CPPFLAGS))
+$(esapi_OBJECTS): glapi_mapi_tmp.h
+
depend: $(esapi_SOURCES)
@echo "running $(MKDEP)"
@touch depend
- @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(esapi_CPPFLAGS) \
+ @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(makedepend_CPPFLAGS) \
$(esapi_SOURCES) 2>/dev/null | \
sed -e 's,^$(GLAPI)/,,' -e 's,^$(MAPI)/,,' > depend
diff --git a/src/mapi/glapi/Makefile b/src/mapi/glapi/Makefile
index 203a8abd018..bb4ed6585d9 100644
--- a/src/mapi/glapi/Makefile
+++ b/src/mapi/glapi/Makefile
@@ -13,11 +13,12 @@ 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\"
+ -I$(TOP)/src/mesa
ifeq ($(SHARED_GLAPI),1)
-glapi_CPPFLAGS += -DMAPI_MODE_BRIDGE
+glapi_CPPFLAGS += \
+ -DMAPI_MODE_BRIDGE \
+ -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
glapi_SOURCES := $(addprefix $(MAPI)/, $(MAPI_BRIDGE_SOURCES))
glapi_GLAPI_OBJECTS :=
@@ -58,10 +59,19 @@ clean:
-rm -f lib$(TARGET).a
-rm -f depend depend.bak
+ifeq ($(SHARED_GLAPI),1)
+# workaround a bug in makedepend
+makedepend_CPPFLAGS := \
+ $(filter-out -DMAPI_ABI_HEADER=%, $(glapi_CPPFLAGS))
+$(glapi_OBJECTS): glapi_mapi_tmp.h
+else
+makedepend_CPPFLAGS := $(glapi_CPPFLAGS)
+endif
+
depend: $(glapi_SOURCES)
@ echo "running $(MKDEP)"
@ touch depend
- @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(glapi_CPPFLAGS) \
+ @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(makedepend_CPPFLAGS) \
$(glapi_SOURCES) 2>/dev/null | sed -e 's,^$(MAPI)/,,' > depend
-include depend
diff --git a/src/mapi/shared-glapi/Makefile b/src/mapi/shared-glapi/Makefile
index ee937bd681b..c928f822c81 100644
--- a/src/mapi/shared-glapi/Makefile
+++ b/src/mapi/shared-glapi/Makefile
@@ -51,10 +51,15 @@ install:
$(MINSTALL) $(TOP)/$(LIB_DIR)/$(GLAPI_LIB_GLOB) \
$(DESTDIR)$(INSTALL_LIB_DIR)
+# workaround a bug in makedepend
+makedepend_CPPFLAGS := \
+ $(filter-out -DMAPI_ABI_HEADER=%, $(glapi_CPPFLAGS))
+$(glapi_OBJECTS): glapi_mapi_tmp.h
+
depend: $(glapi_SOURCES)
@echo "running $(MKDEP)"
@touch depend
- @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(glapi_CPPFLAGS) \
+ @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(makedepend_CPPFLAGS) \
$(glapi_SOURCES) 2>/dev/null | sed -e 's,^$(MAPI)/,,' \
> depend
diff --git a/src/mapi/vgapi/Makefile b/src/mapi/vgapi/Makefile
index e239e20987e..68cf26e83c3 100644
--- a/src/mapi/vgapi/Makefile
+++ b/src/mapi/vgapi/Makefile
@@ -81,11 +81,14 @@ install: default install-headers install-pc
$(MINSTALL) $(TOP)/$(LIB_DIR)/$(VG_LIB_GLOB) \
$(DESTDIR)$(INSTALL_LIB_DIR)
+# due to a bug in makedepend, cannot pass VGAPI_CPPFLAGS to it
+$(VGAPI_OBJECTS): vgapi_tmp.h
+
depend: $(VGAPI_SOURCES)
@echo "running $(MKDEP)"
@touch depend
@$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \
- $(VGAPI_CPPFLAGS) $(VGAPI_SOURCES) 2>/dev/null | \
+ $(VGAPI_SOURCES) 2>/dev/null | \
sed -e 's,^$(MAPI)/,,' > depend
-include depend