define common build flags so they can easily be changed for all tools

svn path=/trunk/; revision=16941
This commit is contained in:
Thomas Bluemel 2005-08-01 10:58:28 +00:00
parent 0bd9fc8ef1
commit 50398b7a03
18 changed files with 55 additions and 47 deletions

View 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)

View 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)

View 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:

View file

@ -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:

View 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;

View 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)

View 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)

View file

@ -29,9 +29,9 @@ MKHIVE_SOURCES = $(addprefix $(MKHIVE_BASE_), \
MKHIVE_OBJECTS = \
$(addprefix $(INTERMEDIATE_), $(MKHIVE_SOURCES:.c=.o))
MKHIVE_HOST_CFLAGS = -g -Werror -Wall
MKHIVE_HOST_CFLAGS = $(TOOLS_CFLAGS)
MKHIVE_HOST_LFLAGS = -g
MKHIVE_HOST_LFLAGS = $(TOOLS_LFLAGS)
.PHONY: mkhive
mkhive: $(MKHIVE_TARGET)

View 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)

View 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)

View 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)

View 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} $@

View 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)

View 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)

View file

@ -32,9 +32,9 @@ WINEBUILD_SOURCES = $(addprefix $(WINEBUILD_BASE_), \
WINEBUILD_OBJECTS = \
$(addprefix $(INTERMEDIATE_), $(WINEBUILD_SOURCES:.c=.o))
WINEBUILD_HOST_CFLAGS = -D__USE_W32API -Iinclude/wine
WINEBUILD_HOST_CFLAGS = $(TOOLS_CFLAGS) -D__USE_W32API -Iinclude -Iinclude/wine
WINEBUILD_HOST_LFLAGS = -g
WINEBUILD_HOST_LFLAGS = $(TOOLS_LFLAGS)
.PHONY: winebuild
winebuild: $(WINEBUILD_TARGET)

View 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:

View 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)

View 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)