From: Tim W. <tw...@re...> - 2002-01-22 15:46:25
|
This patch removes include path directives from CFLAGS and puts them in INCLUDES, so that CFLAGS can be substituted on the command line like: make retail=1 CFLAGS="-O2 -march=i386 -mcpu=i686" Tim. */ --- Omni/CUPS/Makefile.cflags Wed Jun 13 20:23:08 2001 +++ Omni/CUPS/Makefile Tue Jan 22 14:16:30 2002 @@ -37,16 +37,18 @@ else CFLAGS = endif -CFLAGS += -Wall $(OMNI_INCLUDE_PATH) +CFLAGS += -Wall ifdef DEBUG CFLAGS += -g -DDEBUG=1 endif +INCLUDES := +INCLUDES += $(OMNI_INCLUDE_PATH) .SUFFIXES: .SUFFIXES: .cpp .hpp .o .exe .cpp.o: - $(CC) $(CFLAGS) -c $(*F).cpp + $(CC) $(CFLAGS) $(INCLUDES) -c $(*F).cpp % : %.cpp $(CC) $(CFLAGS) -o $(*F) $(OMNI_LIB_PATH) $(OMNI_LIBS) $(CUPS_LIB_PATH) $(CUPS_LIBS) $(*F).cpp @@ -59,7 +61,7 @@ # on the source files and if those files change, then new dependancies # need to be made and reloaded ifeq "$(shell test ! -f depend.mak && echo yes)" "yes" -ifeq "$(shell $(CC) $(CFLAGS) -M *.cpp > depend.mak)" "" +ifeq "$(shell $(CC) $(CFLAGS) $(INCLUDES) -M *.cpp > depend.mak)" "" endif endif include depend.mak --- Omni/XMLParser/libxml/Makefile.cflags Fri Nov 16 21:23:39 2001 +++ Omni/XMLParser/libxml/Makefile Tue Jan 22 14:16:30 2002 @@ -44,19 +44,21 @@ else CFLAGS = endif -CFLAGS += -Wall -I $(OMNI_INCLUDE_PATH) +CFLAGS += -Wall ifneq ($(strip $(DEBUG)),) CFLAGS += -g -DDEBUG=1 else CFLAGS += -O3 endif +INCLUDES := +INCLUDES += -I $(OMNI_INCLUDE_PATH) LFLAGS = -L $(OMNI_LIB_PATH) $(OMNI_LIBS) $(XML_LIBS) $(shell glib-config --libs gmodule) .SUFFIXES: .SUFFIXES: .cpp .hpp .o .exe .cpp.o: - $(CC) $(CFLAGS) -c $(*F).cpp + $(CC) $(CFLAGS) $(INCLUDES) -c $(*F).cpp all: parser @@ -91,7 +93,7 @@ # on the source files and if those files change, then new dependancies # need to be made and reloaded ifeq "$(shell test ! -f depend.mak && echo yes)" "yes" -ifeq "$(shell $(CC) $(CFLAGS) -M $(PARSER_CFILES:~=.cpp) > depend.mak)" "" +ifeq "$(shell $(CC) $(CFLAGS) $(INCLUDES) -M $(PARSER_CFILES:~=.cpp) > depend.mak)" "" endif endif include depend.mak --- Omni/XMLParser/xerces-c1_3_0-linux/Makefile.cflags Fri Nov 16 21:23:41 2001 +++ Omni/XMLParser/xerces-c1_3_0-linux/Makefile Tue Jan 22 14:16:30 2002 @@ -49,19 +49,21 @@ else CFLAGS = endif -CFLAGS += -Wall -I $(XML_INCLUDE_PATH) -I $(OMNI_INCLUDE_PATH) +CFLAGS += -Wall ifneq ($(strip $(DEBUG)),) CFLAGS += -g -DDEBUG=1 else CFLAGS += -O3 endif +INCLUDES := +INCLUDES += -I $(XML_INCLUDE_PATH) -I $(OMNI_INCLUDE_PATH) LFLAGS = -L $(OMNI_LIB_PATH) $(OMNI_LIBS) -L $(XML_LIB_PATH) $(XML_LIBS) $(shell glib-config --libs gmodule) .SUFFIXES: .SUFFIXES: .cpp .hpp .o .exe .cpp.o: - $(CC) $(CFLAGS) -c $(*F).cpp + $(CC) $(CFLAGS) $(INCLUDES) -c $(*F).cpp all: parser @@ -96,7 +98,7 @@ # on the source files and if those files change, then new dependancies # need to be made and reloaded ifeq "$(shell test ! -f depend.mak && echo yes)" "yes" -ifeq "$(shell $(CC) $(CFLAGS) -M $(PARSER_CFILES:~=.cpp) > depend.mak)" "" +ifeq "$(shell $(CC) $(CFLAGS) $(INCLUDES) -M $(PARSER_CFILES:~=.cpp) > depend.mak)" "" endif endif include depend.mak --- Omni/XMLParser/xml4c3_1_0-linux/Makefile.cflags Fri Nov 16 21:23:43 2001 +++ Omni/XMLParser/xml4c3_1_0-linux/Makefile Tue Jan 22 14:16:30 2002 @@ -45,17 +45,19 @@ else CFLAGS = endif -CFLAGS += -Wall -I $(XML_INCLUDE_PATH) -I $(OMNI_INCLUDE_PATH) +CFLAGS += -Wall ifdef DEBUG CFLAGS += -g -DDEBUG=1 endif +INCLUDES := +INCLUDES += -I $(XML_INCLUDE_PATH) -I $(OMNI_INCLUDE_PATH) LFLAGS = -L $(OMNI_LIB_PATH) $(OMNI_LIBS) -L $(XML_LIB_PATH) $(XML_LIBS) $(shell glib-config --libs gmodule) .SUFFIXES: .SUFFIXES: .cpp .hpp .o .exe .cpp.o: - $(CC) $(CFLAGS) -c $(*F).cpp + $(CC) $(CFLAGS) $(INCLUDES) -c $(*F).cpp all: parser @@ -90,7 +92,7 @@ # on the source files and if those files change, then new dependancies # need to be made and reloaded ifeq "$(shell test ! -f depend.mak && echo yes)" "yes" -ifeq "$(shell $(CC) $(CFLAGS) -M $(PARSER_CFILES:~=.cpp) > depend.mak)" "" +ifeq "$(shell $(CC) $(CFLAGS) $(INCLUDES) -M $(PARSER_CFILES:~=.cpp) > depend.mak)" "" endif endif include depend.mak --- Omni/XMLParser/Makefile.cflags Fri Nov 16 21:23:42 2001 +++ Omni/XMLParser/Makefile Tue Jan 22 14:16:30 2002 @@ -44,19 +44,21 @@ else CFLAGS = endif -CFLAGS += -Wall -I $(OMNI_INCLUDE_PATH) +CFLAGS += -Wall ifneq ($(strip $(DEBUG)),) CFLAGS += -g -DDEBUG=1 else CFLAGS += -O3 endif +INCLUDES := +INCLUDES += -I $(OMNI_INCLUDE_PATH) LFLAGS = -L $(OMNI_LIB_PATH) $(OMNI_LIBS) $(XML_LIBS) $(shell glib-config --libs gmodule) .SUFFIXES: .SUFFIXES: .cpp .hpp .o .exe .cpp.o: - $(CC) $(CFLAGS) -c $(*F).cpp + $(CC) $(CFLAGS) $(INCLUDES) -c $(*F).cpp all: parser @@ -91,7 +93,7 @@ # on the source files and if those files change, then new dependancies # need to be made and reloaded ifeq "$(shell test ! -f depend.mak && echo yes)" "yes" -ifeq "$(shell $(CC) $(CFLAGS) -M $(PARSER_CFILES:~=.cpp) > depend.mak)" "" +ifeq "$(shell $(CC) $(CFLAGS) $(INCLUDES) -M $(PARSER_CFILES:~=.cpp) > depend.mak)" "" endif endif include depend.mak --- Omni/UPDF/Makefile.cflags Thu Aug 16 22:35:51 2001 +++ Omni/UPDF/Makefile Tue Jan 22 14:16:30 2002 @@ -45,19 +45,21 @@ else CFLAGS = endif -CFLAGS += -Wall -I $(OMNI_INCLUDE_PATH) +CFLAGS += -Wall ifdef DEBUG CFLAGS += -g -DDEBUG=1 endif ifneq ($(origin USE_DYNAMIC_LINKING), undefined) CFLAGS += -DUSE_DYNAMIC_LINKING=1 endif +INCLUDES := +INCLUDES += -I $(OMNI_INCLUDE_PATH) .SUFFIXES: .SUFFIXES: .cpp .hpp .o .exe .cpp.o: - $(CC) $(CFLAGS) -c $(*F).cpp + $(CC) $(CFLAGS) $(INCLUDES) -c $(*F).cpp all: UPDFConverter ParameterConverterTester @@ -104,7 +106,7 @@ # on the source files and if those files change, then new dependancies # need to be made and reloaded ifeq "$(shell test ! -f depend.mak && echo yes)" "yes" -ifeq "$(shell $(CC) $(CFLAGS) -M $(PARSER_CFILES:~=.cpp) > depend.mak)" "" +ifeq "$(shell $(CC) $(CFLAGS) $(INCLUDES) -M $(PARSER_CFILES:~=.cpp) > depend.mak)" "" endif endif include depend.mak --- Omni/Foomatic/Makefile.cflags Tue Jan 22 15:13:23 2002 +++ Omni/Foomatic/Makefile Tue Jan 22 15:13:24 2002 @@ -50,7 +50,7 @@ # on the source files and if those files change, then new dependancies # need to be made and reloaded ifeq "$(shell test ! -f depend.mak && echo yes)" "yes" -ifeq "$(shell $(CC) $(CFLAGS) -M $(FOOMATIC_FILES:~=.cpp) > depend.mak)" "" +ifeq "$(shell $(CC) $(CFLAGS) $(INCLUDES) -M $(FOOMATIC_FILES:~=.cpp) > depend.mak)" "" endif endif include depend.mak --- Omni/Makefile.cflags Tue Jan 22 14:16:30 2002 +++ Omni/Makefile Tue Jan 22 14:16:30 2002 @@ -94,7 +94,8 @@ else CFLAGS += -O3 endif -CFLAGS += $(shell glib-config --cflags gmodule) +INCLUDES := +INCLUDES += $(shell glib-config --cflags gmodule) LFLAGS = -L . -l$(LIBRARYNAME) $(shell glib-config --libs gmodule) include version.mak @@ -103,7 +104,7 @@ .SUFFIXES: .cpp .hpp .o .exe .cpp.o: - $(CC) $(CFLAGS) -c $(*F).cpp + $(CC) $(CFLAGS) $(INCLUDES) -c $(*F).cpp all: sharedlibrary subdirs exes @@ -152,7 +153,7 @@ # on the source files and if those files change, then new dependancies # need to be made and reloaded ifeq "$(shell test ! -f depend.mak && echo yes)" "yes" -ifeq "$(shell $(CC) $(CFLAGS) -M $(DEVHELPERFILES:~=.cpp) OmniServer.cpp > depend.mak)" "" +ifeq "$(shell $(CC) $(CFLAGS) $(INCLUDES) -M $(DEVHELPERFILES:~=.cpp) OmniServer.cpp > depend.mak)" "" endif endif include depend.mak --- Omni/common.mak.cflags Fri Nov 16 21:23:44 2001 +++ Omni/common.mak Tue Jan 22 14:16:30 2002 @@ -54,14 +54,16 @@ DEBUG = RETAIL = retail=1 endif -CFLAGS = -Wall -I .. -I . -I ../hppcl3 +CFLAGS = -Wall ifneq ($(strip $(DEBUG)),) CFLAGS += -g -DDEBUG=1 else CFLAGS += -O3 endif CFLAGS += -fPIC -rdynamic -CFLAGS += $(shell glib-config --cflags gmodule) +INCLUDES := +INCLUDES += -I .. -I . -I ../hppcl3 +INCLUDES += $(shell glib-config --cflags gmodule) LFLAGS = -L $(OMNI_LIB_PATH) -l$(LIBRARYNAME) $(shell glib-config --libs gmodule) include $(OMNI_PATH)/version.mak @@ -70,7 +72,7 @@ .SUFFIXES: .cpp .hpp .o .exe .cpp.o: - $(CC) $(CFLAGS) -c $(*F).cpp + $(CC) $(CFLAGS) $(INCLUDES) -c $(*F).cpp ifeq ($(origin DEVICENAME), undefined) notall: # This should not be called by itself! |