From: Moritz Bunkus Date: Sun, 11 Apr 2010 16:40:15 +0000 (+0000) Subject: Let the user use CXXFLAGS for his own flags. Fix for not finding the includes. X-Git-Tag: release-0.9.0~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82d6d4db2a5788ed5661b0a1ae61ab86e2da6e9f;p=libmatroska Let the user use CXXFLAGS for his own flags. Fix for not finding the includes. git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libmatroska@106 a6f86f6d-0131-4f8e-9e7b-e335508773d5 --- diff --git a/make/mingw32/Makefile b/make/mingw32/Makefile index 097a0be..404a704 100644 --- a/make/mingw32/Makefile +++ b/make/mingw32/Makefile @@ -32,25 +32,26 @@ SRC = $(wildcard ../../src/*.cpp) OBJ = $(patsubst %.cpp,%.o,$(SRC)) ifeq (yes,$(SHARED)) LIBS = libmatroska.dll -CXXFLAGS = -DMATROSKA_DLL +FLAGS = -DMATROSKA_DLL DLLFLAGS = -DMATROSKA_DLL_EXPORT else LIBS = libmatroska.a endif ifeq (yes,$(SHARED)) ifeq (yes,$(EBML_DLL)) -CXXFLAGS += -DEBML_DLL +FLAGS += -DEBML_DLL endif endif -INCS = -I../.. -I$(EBML_DIR) +CWD = $(shell pwd) +INCS = -I$(CWD)/../.. -I$(EBML_DIR) LDFLAGS = -L. -L$(EBML_DIR)/make/mingw32 -CXXFLAGS += $(DEBUGFLAGS) $(INCS) +COMPILEFLAGS = $(DEBUGFLAGS) $(INCS) $(FLAGS) $(CXXFLAGS) TESTS = test6 test8 test9 .PHONY: all all-before all-after clean clean-custom .cpp.o: - $(CXX) $(DLLFLAGS) $(CXXFLAGS) -c -o $@ $< + $(CXX) $(DLLFLAGS) $(COMPILEFLAGS) -c -o $@ $< all: lib @@ -76,19 +77,19 @@ libmatroska.dll: $(OBJ) # Explicitely list these object files because for them # MATROSKA_DLL_EXPORT must NOT be defined. ../../test/mux/test6.o: ../../test/mux/test6.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< + $(CXX) $(COMPILEFLAGS) -c -o $@ $< test6: ../../test/mux/test6.o $(LIBS) $(LD) -o $@ $(LDFLAGS) $< -lmatroska -lebml ../../test/mux/test8.o: ../../test/mux/test8.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< + $(CXX) $(COMPILEFLAGS) -c -o $@ $< test8: ../../test/mux/test8.o $(LIBS) $(LD) -o $@ $(LDFLAGS) $< -lmatroska -lebml ../../test/tags/test9.o: ../../test/tags/test9.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< + $(CXX) $(COMPILEFLAGS) -c -o $@ $< test9: ../../test/tags/test9.o $(LIBS) $(LD) -o $@ $(LDFLAGS) $< -lmatroska -lebml @@ -100,7 +101,7 @@ depend: @for i in $(SRC); do \ o="`echo $$i | sed -e 's/\.c$$/.o/' -e 's/\.cpp$$/.o/'`" ; \ echo ' ' $$i: $$o ; \ - $(CXX) $(CXXFLAGS) -MM -MT $$o $$i >> .depend ; \ + $(CXX) $(COMPILEFLAGS) -MM -MT $$o $$i >> .depend ; \ done #