define common build flags so they can easily be changed for all tools
authorThomas Bluemel <thomas@reactsoft.com>
Mon, 1 Aug 2005 10:58:28 +0000 (10:58 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Mon, 1 Aug 2005 10:58:28 +0000 (10:58 +0000)
svn path=/trunk/; revision=16941

18 files changed:
reactos/tools/bin2c.mak
reactos/tools/bin2res/bin2res.mak
reactos/tools/buildno/buildno.mak
reactos/tools/cabman/cabman.mak
reactos/tools/cdmake/cdmake.c
reactos/tools/cdmake/cdmake.mak
reactos/tools/gendib/gendib.mak
reactos/tools/mkhive/mkhive.mak
reactos/tools/nci/nci.mak
reactos/tools/rbuild/rbuild.mak
reactos/tools/rsym.mak
reactos/tools/tools.mak
reactos/tools/unicode/unicode.mak
reactos/tools/widl/widl.mak
reactos/tools/winebuild/winebuild.mak
reactos/tools/wmc/wmc.mak
reactos/tools/wpp/wpp.mak
reactos/tools/wrc/wrc.mak

index b47869b..d3a5993 100644 (file)
@@ -15,9 +15,9 @@ BIN2C_SOURCES = \
 BIN2C_OBJECTS = \
        $(addprefix $(INTERMEDIATE_), $(BIN2C_SOURCES:.c=.o))
 
-BIN2C_HOST_CFLAGS = -g -Werror -Wall
+BIN2C_HOST_CFLAGS = $(TOOLS_CFLAGS)
 
-BIN2C_HOST_LFLAGS = -g
+BIN2C_HOST_LFLAGS = $(TOOLS_LFLAGS)
 
 .PHONY: bin2c
 bin2c: $(BIN2C_TARGET)
index 3d9dad2..9c21091 100644 (file)
@@ -26,9 +26,9 @@ BIN2RES_SOURCES = $(addprefix $(BIN2RES_BASE_), \
 BIN2RES_OBJECTS = \
        $(addprefix $(INTERMEDIATE_), $(BIN2RES_SOURCES:.c=.o))
 
-BIN2RES_HOST_CFLAGS = -Iinclude/wine -D__REACTOS__ -g -Werror -Wall
+BIN2RES_HOST_CFLAGS = -Iinclude/wine -D__REACTOS__ $(TOOLS_CFLAGS)
 
-BIN2RES_HOST_LFLAGS = -g
+BIN2RES_HOST_LFLAGS = $(TOOLS_LFLAGS)
 
 $(BIN2RES_TARGET): $(BIN2RES_OBJECTS) | $(BIN2RES_OUT)
        $(ECHO_LD)
index 1e4c36b..78e740a 100644 (file)
@@ -28,9 +28,9 @@ BUILDNO_SOURCES = $(addprefix $(BUILDNO_BASE_), \
 BUILDNO_OBJECTS = \
   $(addprefix $(INTERMEDIATE_), $(BUILDNO_SOURCES:.cpp=.o))
 
-BUILDNO_HOST_CFLAGS = -Iinclude/reactos -g -Werror -Wall
+BUILDNO_HOST_CXXFLAGS = -Iinclude/reactos $(TOOLS_CPPFLAGS)
 
-BUILDNO_HOST_LFLAGS = -g
+BUILDNO_HOST_LFLAGS = $(TOOLS_LFLAGS)
 
 $(BUILDNO_TARGET): $(BUILDNO_OBJECTS) | $(BUILDNO_OUT)
        $(ECHO_LD)
@@ -38,19 +38,19 @@ $(BUILDNO_TARGET): $(BUILDNO_OBJECTS) | $(BUILDNO_OUT)
 
 $(BUILDNO_INT_)buildno.o: $(BUILDNO_BASE_)buildno.cpp | $(BUILDNO_INT)
        $(ECHO_CC)
-       ${host_gpp} $(BUILDNO_HOST_CFLAGS) -c $< -o $@
+       ${host_gpp} $(BUILDNO_HOST_CXXFLAGS) -c $< -o $@
 
 $(BUILDNO_INT_)exception.o: $(BUILDNO_BASE_)exception.cpp | $(BUILDNO_INT)
        $(ECHO_CC)
-       ${host_gpp} $(BUILDNO_HOST_CFLAGS) -c $< -o $@
+       ${host_gpp} $(BUILDNO_HOST_CXXFLAGS) -c $< -o $@
 
 $(BUILDNO_INT_)ssprintf.o: $(BUILDNO_BASE_)ssprintf.cpp | $(BUILDNO_INT)
        $(ECHO_CC)
-       ${host_gpp} $(BUILDNO_HOST_CFLAGS) -c $< -o $@
+       ${host_gpp} $(BUILDNO_HOST_CXXFLAGS) -c $< -o $@
 
 $(BUILDNO_INT_)XML.o: $(BUILDNO_BASE_)XML.cpp | $(BUILDNO_INT)
        $(ECHO_CC)
-       ${host_gpp} $(BUILDNO_HOST_CFLAGS) -c $< -o $@
+       ${host_gpp} $(BUILDNO_HOST_CXXFLAGS) -c $< -o $@
 
 .PHONY: buildno_clean
 buildno_clean:
index 240a910..3fb72b9 100755 (executable)
@@ -29,11 +29,11 @@ CABMAN_SOURCES = $(addprefix $(CABMAN_BASE_), \
 CABMAN_OBJECTS = \
   $(addprefix $(INTERMEDIATE_), $(CABMAN_SOURCES:.cxx=.o))
 
-CABMAN_HOST_CFLAGS = -Iinclude/reactos -Ilib/zlib -g -Werror -Wall
+CABMAN_HOST_CXXFLAGS = -Iinclude/reactos -Ilib/zlib $(TOOLS_CXXFLAGS)
 
 CABMAN_HOST_LIBS = $(ZLIB_HOST_TARGET)
 
-CABMAN_HOST_LFLAGS = -g $(CABMAN_HOST_LIBS)
+CABMAN_HOST_LFLAGS = $(TOOLS_LFLAGS) $(CABMAN_HOST_LIBS)
 
 .PHONY: cabman
 cabman: $(CABMAN_TARGET)
@@ -44,23 +44,23 @@ $(CABMAN_TARGET): $(CABMAN_OBJECTS) $(CABMAN_HOST_LIBS) | $(CABMAN_OUT)
 
 $(CABMAN_INT_)cabinet.o: $(CABMAN_BASE_)cabinet.cxx | $(CABMAN_INT)
        $(ECHO_CC)
-       ${host_gpp} $(CABMAN_HOST_CFLAGS) -c $< -o $@
+       ${host_gpp} $(CABMAN_HOST_CXXFLAGS) -c $< -o $@
 
 $(CABMAN_INT_)dfp.o: $(CABMAN_BASE_)dfp.cxx | $(CABMAN_INT)
        $(ECHO_CC)
-       ${host_gpp} $(CABMAN_HOST_CFLAGS) -c $< -o $@
+       ${host_gpp} $(CABMAN_HOST_CXXFLAGS) -c $< -o $@
 
 $(CABMAN_INT_)main.o: $(CABMAN_BASE_)main.cxx | $(CABMAN_INT)
        $(ECHO_CC)
-       ${host_gpp} $(CABMAN_HOST_CFLAGS) -c $< -o $@
+       ${host_gpp} $(CABMAN_HOST_CXXFLAGS) -c $< -o $@
 
 $(CABMAN_INT_)mszip.o: $(CABMAN_BASE_)mszip.cxx | $(CABMAN_INT)
        $(ECHO_CC)
-       ${host_gpp} $(CABMAN_HOST_CFLAGS) -c $< -o $@
+       ${host_gpp} $(CABMAN_HOST_CXXFLAGS) -c $< -o $@
 
 $(CABMAN_INT_)raw.o: $(CABMAN_BASE_)raw.cxx | $(CABMAN_INT)
        $(ECHO_CC)
-       ${host_gpp} $(CABMAN_HOST_CFLAGS) -c $< -o $@
+       ${host_gpp} $(CABMAN_HOST_CXXFLAGS) -c $< -o $@
 
 .PHONY: cabman_clean
 cabman_clean:
index 483d616..5ed51d6 100644 (file)
@@ -423,6 +423,9 @@ write_directory_record(PDIR_RECORD d,
         if (d->extension_on_cd[0] != 0)
           identifier_size += 1 + strlen(d->extension_on_cd);
         break;
+      default:
+        identifier_size = 1;
+        break;
     }
   }
   record_size = 33 + identifier_size;
index 7f5131e..085b814 100644 (file)
@@ -26,9 +26,9 @@ CDMAKE_SOURCES = $(addprefix $(CDMAKE_BASE_), \
 CDMAKE_OBJECTS = \
        $(addprefix $(INTERMEDIATE_), $(CDMAKE_SOURCES:.c=.o))
 
-CDMAKE_HOST_CFLAGS = -Iinclude -g -Werror -Wall
+CDMAKE_HOST_CFLAGS = -Iinclude $(TOOLS_CFLAGS)
 
-CDMAKE_HOST_LFLAGS = -g
+CDMAKE_HOST_LFLAGS = $(TOOLS_LFLAGS)
 
 .PHONY: cdmake
 cdmake: $(CDMAKE_TARGET)
index 4bd1af5..b0a044f 100644 (file)
@@ -24,9 +24,9 @@ GENDIB_SOURCES = \
 GENDIB_OBJECTS = \
     $(addprefix $(INTERMEDIATE_), $(GENDIB_SOURCES:.c=.o))
 
-GENDIB_HOST_CFLAGS = -g -Werror -Wall
+GENDIB_HOST_CFLAGS = $(TOOLS_CFLAGS)
 
-GENDIB_HOST_LFLAGS = -g
+GENDIB_HOST_LFLAGS = $(TOOLS_LFLAGS)
 
 $(GENDIB_TARGET): $(GENDIB_OBJECTS) | $(GENDIB_OUT)
        $(ECHO_LD)
index 5354d59..6f1e225 100644 (file)
@@ -29,9 +29,9 @@ MKHIVE_SOURCES = $(addprefix $(MKHIVE_BASE_), \
 MKHIVE_OBJECTS = \\r
        $(addprefix $(INTERMEDIATE_), $(MKHIVE_SOURCES:.c=.o))\r
 \r
-MKHIVE_HOST_CFLAGS = -g -Werror -Wall\r
+MKHIVE_HOST_CFLAGS = $(TOOLS_CFLAGS)\r
 \r
-MKHIVE_HOST_LFLAGS = -g\r
+MKHIVE_HOST_LFLAGS = $(TOOLS_LFLAGS)\r
 \r
 .PHONY: mkhive\r
 mkhive: $(MKHIVE_TARGET)\r
index 26e1ae6..f0d14a0 100644 (file)
@@ -24,9 +24,9 @@ NCI_SOURCES = \
 NCI_OBJECTS = \
     $(addprefix $(INTERMEDIATE_), $(NCI_SOURCES:.c=.o))
 
-NCI_HOST_CFLAGS = -Iinclude -g -Werror -Wall
+NCI_HOST_CFLAGS = -Iinclude $(TOOLS_CFLAGS)
 
-NCI_HOST_LFLAGS = -g
+NCI_HOST_LFLAGS = $(TOOLS_LFLAGS)
 
 $(NCI_TARGET): $(NCI_OBJECTS) | $(NCI_OUT)
        $(ECHO_LD)
index 61a0684..e7a5c2b 100644 (file)
@@ -215,9 +215,9 @@ RBUILD_TEST_OBJECTS = \
        $(RBUILD_COMMON_OBJECTS) \
        $(RBUILD_TEST_SPECIAL_OBJECTS)
 
-RBUILD_HOST_CXXFLAGS = -g -I$(RBUILD_BASE) -Werror -Wall
+RBUILD_HOST_CXXFLAGS = -I$(RBUILD_BASE) $(TOOLS_CPPFLAGS)
 
-RBUILD_HOST_LFLAGS = -g
+RBUILD_HOST_LFLAGS = $(TOOLS_LFLAGS)
 
 .PHONY: rbuild
 rbuild: $(RBUILD_TARGET)
index 2dc03f9..ad6b383 100644 (file)
@@ -16,9 +16,9 @@ RSYM_SOURCES = \
 RSYM_OBJECTS = \
        $(addprefix $(INTERMEDIATE_), $(RSYM_SOURCES:.c=.o))
 
-RSYM_HOST_CFLAGS = -g -Werror -Wall
+RSYM_HOST_CFLAGS = $(TOOLS_CFLAGS)
 
-RSYM_HOST_LFLAGS = -g
+RSYM_HOST_LFLAGS = $(TOOLS_LFLAGS)
 
 .PHONY: rsym
 rsym: $(RSYM_TARGET)
index feb8eec..15150d2 100644 (file)
@@ -5,6 +5,10 @@ TOOLS_INT_ = $(TOOLS_INT)$(SEP)
 TOOLS_OUT = $(OUTPUT_)$(TOOLS_BASE)
 TOOLS_OUT_ = $(TOOLS_OUT)$(SEP)
 
+TOOLS_CFLAGS = -Werror -Wall -Wpointer-arith -Wno-strict-aliasing
+TOOLS_CPPFLAGS = -Werror -Wall -Wpointer-arith
+TOOLS_LFLAGS =
+
 $(TOOLS_INT): | $(INTERMEDIATE)
        $(ECHO_MKDIR)
        ${mkdir} $@
index 5d5334c..0842635 100644 (file)
@@ -97,7 +97,8 @@ UNICODE_OBJECTS = \
 UNICODE_HOST_CFLAGS = \
        -D__USE_W32API -DWINVER=0x501 -DWINE_UNICODE_API= \
        -Dwchar_t="unsigned short" -D_WCHAR_T_DEFINED \
-       -I$(UNICODE_BASE) -Iinclude/wine -Iw32api/include
+       -I$(UNICODE_BASE) -Iinclude/wine -Iw32api/include \
+       $(TOOLS_CFLAGS)
 
 .PHONY: unicode
 unicode: $(UNICODE_TARGET)
index d552051..7c12473 100644 (file)
@@ -53,12 +53,12 @@ WIDL_SOURCES = $(addprefix $(WIDL_BASE_), \
 WIDL_OBJECTS = \
   $(addprefix $(INTERMEDIATE_), $(WIDL_SOURCES:.c=.o))
 
-WIDL_HOST_CFLAGS = -g -Werror -Wall \
+WIDL_HOST_CFLAGS = $(TOOLS_CFLAGS) \
        -DINT16=SHORT -D__USE_W32API -DYYDEBUG=1 \
        -I$(WIDL_BASE) -I$(WPP_BASE) \
        -Iinclude/wine -Iinclude -Iw32api/include
 
-WIDL_HOST_LFLAGS = -g
+WIDL_HOST_LFLAGS = $(TOOLS_LFLAGS)
 
 WIDL_LIBS = $(WPP_TARGET)
 
index ca90c91..0ba4d91 100644 (file)
@@ -32,9 +32,9 @@ WINEBUILD_SOURCES = $(addprefix $(WINEBUILD_BASE_), \
 WINEBUILD_OBJECTS = \\r
   $(addprefix $(INTERMEDIATE_), $(WINEBUILD_SOURCES:.c=.o))\r
 \r
-WINEBUILD_HOST_CFLAGS = -D__USE_W32API -Iinclude/wine\r
+WINEBUILD_HOST_CFLAGS = $(TOOLS_CFLAGS) -D__USE_W32API -Iinclude -Iinclude/wine\r
 \r
-WINEBUILD_HOST_LFLAGS = -g\r
+WINEBUILD_HOST_LFLAGS = $(TOOLS_LFLAGS)\r
 \r
 .PHONY: winebuild\r
 winebuild: $(WINEBUILD_TARGET)\r
index c8ad33f..63c67d1 100644 (file)
@@ -32,9 +32,9 @@ WMC_SOURCES = $(addprefix $(WMC_BASE_), \
 WMC_OBJECTS = \
   $(addprefix $(INTERMEDIATE_), $(WMC_SOURCES:.c=.o))
 
-WMC_HOST_CXXFLAGS = -I$(WMC_BASE) -g -Werror -Wall
+WMC_HOST_CFLAGS = -I$(WMC_BASE) $(TOOLS_CFLAGS)
 
-WMC_HOST_LFLAGS = -g
+WMC_HOST_LFLAGS = $(TOOLS_LFLAGS)
 
 .PHONY: wmc
 wmc: $(WMC_TARGET)
@@ -45,35 +45,35 @@ $(WMC_TARGET): $(WMC_OBJECTS) | $(WMC_OUT)
 
 $(WMC_INT_)getopt.o: $(WMC_BASE_)getopt.c | $(WMC_INT)
        $(ECHO_CC)
-       ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $< -o $@
+       ${host_gcc} $(WMC_HOST_CFLAGS) -c $< -o $@
 
 $(WMC_INT_)lang.o: $(WMC_BASE_)lang.c | $(WMC_INT)
        $(ECHO_CC)
-       ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $< -o $@
+       ${host_gcc} $(WMC_HOST_CFLAGS) -c $< -o $@
 
 $(WMC_INT_)mcl.o: $(WMC_BASE_)mcl.c | $(WMC_INT)
        $(ECHO_CC)
-       ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $< -o $@
+       ${host_gcc} $(WMC_HOST_CFLAGS) -c $< -o $@
 
 $(WMC_INT_)utils.o: $(WMC_BASE_)utils.c | $(WMC_INT)
        $(ECHO_CC)
-       ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $< -o $@
+       ${host_gcc} $(WMC_HOST_CFLAGS) -c $< -o $@
 
 $(WMC_INT_)wmc.o: $(WMC_BASE_)wmc.c | $(WMC_INT)
        $(ECHO_CC)
-       ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $< -o $@
+       ${host_gcc} $(WMC_HOST_CFLAGS) -c $< -o $@
 
 $(WMC_INT_)write.o: $(WMC_BASE_)write.c | $(WMC_INT)
        $(ECHO_CC)
-       ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $< -o $@
+       ${host_gcc} $(WMC_HOST_CFLAGS) -c $< -o $@
 
 $(WMC_INT_)y_tab.o: $(WMC_BASE_)y_tab.c | $(WMC_INT)
        $(ECHO_CC)
-       ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $< -o $@
+       ${host_gcc} $(WMC_HOST_CFLAGS) -c $< -o $@
 
 $(WMC_INT_)misc.o: $(WMC_BASE_)misc.c | $(WMC_INT)
        $(ECHO_CC)
-       ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $< -o $@
+       ${host_gcc} $(WMC_HOST_CFLAGS) -c $< -o $@
 
 .PHONY: wmc_clean
 wmc_clean:
index 5e27146..404996d 100644 (file)
@@ -28,7 +28,7 @@ WPP_SOURCES = $(addprefix $(WPP_BASE_), \
 WPP_OBJECTS = \
     $(addprefix $(INTERMEDIATE_), $(WPP_SOURCES:.c=.o))
 
-WPP_HOST_CFLAGS = -D__USE_W32API -I$(WPP_BASE) -Iinclude -Iinclude/wine -g
+WPP_HOST_CFLAGS = -D__USE_W32API -I$(WPP_BASE) -Iinclude -Iinclude/wine $(TOOLS_CFLAGS)
 
 .PHONY: wpp
 wpp: $(WPP_TARGET)
index 8a782f8..c8ba46b 100644 (file)
@@ -52,13 +52,13 @@ WRC_SOURCES = $(addprefix $(WRC_BASE_), \
 WRC_OBJECTS = \
   $(addprefix $(INTERMEDIATE_), $(WRC_SOURCES:.c=.o))
 
-WRC_HOST_CFLAGS = -I$(WRC_BASE) -g -Werror -Wall \
+WRC_HOST_CFLAGS = -I$(WRC_BASE) $(TOOLS_CFLAGS) \
                   -D__USE_W32API -DWINE_UNICODE_API= \
                   -Dwchar_t="unsigned short" -D_WCHAR_T_DEFINED \
                   -I$(UNICODE_BASE) -I$(WPP_BASE) \
                   -Iinclude/wine -Iinclude -Iw32api/include
 
-WRC_HOST_LFLAGS = -g
+WRC_HOST_LFLAGS = $(TOOLS_LFLAGS)
 
 WRC_LIBS = $(UNICODE_TARGET) $(WPP_TARGET)