Buildtools: More Makefile changes, including bringing Makefile.msvc up to date.

git-svn-id: https://svn.eduke32.com/eduke32@2474 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2012-03-14 06:26:29 +00:00
parent 67f946bdd8
commit 658c5448fe
3 changed files with 58 additions and 22 deletions

View file

@ -173,8 +173,8 @@ OURCFLAGS+= $(BUILDCFLAGS)
# TARGETS
UTILOBJS=$(OBJ)/kextract.$o $(OBJ)/kgroup.$o $(OBJ)/transpal.$o $(OBJ)/wad2art.$o $(OBJ)/wad2map.$o $(OBJ)/md2tool.$o \
$(OBJ)/generateicon.$o $(OBJ)/cacheinfo.$o $(OBJ)/arttool.$o $(OBJ)/givedepth.$o $(OBJ)/mkpalette.$o \
$(OBJ)/compat.$o $(OBJ)/pragmas.$o
$(OBJ)/generateicon.$o $(OBJ)/cacheinfo.$o $(OBJ)/enumdisplay.$o $(OBJ)/arttool.$o $(OBJ)/givedepth.$o $(OBJ)/mkpalette.$o \
$(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(OBJ)/pragmas.$o $(OBJ)/kplib.$o $(OBJ)/cache1d.$o
UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX) md2tool$(EXESUFFIX) \
generateicon$(EXESUFFIX) cacheinfo$(EXESUFFIX) arttool$(EXESUFFIX) givedepth$(EXESUFFIX) mkpalette$(EXESUFFIX)
@ -223,15 +223,16 @@ wad2map$(EXESUFFIX): $(OBJ)/wad2map.$o $(OBJ)/pragmas.$o $(OBJ)/compat.$o $(OBJ)
md2tool$(EXESUFFIX): $(OBJ)/md2tool.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
generateicon$(EXESUFFIX): $(OBJ)/generateicon.$o $(OBJ)/compat.$o $(OBJ)/pragmas.$o $(OBJ)/kplib.$o $(OBJ)/cache1d.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
generateicon$(EXESUFFIX): $(OBJ)/generateicon.$o $(OBJ)/compat.$o $(OBJ)/pragmas.$o $(OBJ)/kplib.$o \
$(OBJ)/cache1d.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
cacheinfo$(EXESUFFIX): $(OBJ)/cacheinfo.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
enumdisplay$(EXESUFFIX): src/misc/enumdisplay.c
enumdisplay$(EXESUFFIX): $(OBJ)/enumdisplay.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -g -Os -o $@ $^ $(UTILLIBS) -I$(DXROOT)/include -lgdi32; then $(ONESTEP_OK); fi
if $(CC) -o $@ $^ $(UTILLIBS) -I$(DXROOT)/include -lgdi32; then $(ONESTEP_OK); fi
arttool$(EXESUFFIX): $(OBJ)/arttool.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CXX) -o $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
@ -270,6 +271,10 @@ $(OBJ)/%.$o: $(SRC)/%.cxx
$(COMPILE_STATUS)
if $(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/misc/%.c
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/misc/%.rc
$(COMPILE_STATUS)
if $(RC) -i $< -o $@ --include-dir=$(INC) --include-dir=$(SRC); then $(COMPILE_OK); else $(COMPILE_FAILED); fi
@ -308,7 +313,7 @@ clean:
echo -n "" > $(OBJ)/keep.me
cleanutils:
-rm -f $(UTILS) $(UTILOBJS)
-rm -f $(UTILS) $(UTILOBJS) $(UTILADDOBJS)
veryclean: clean cleanutils
-rm -f $(ENGINELIB) $(EDITORLIB)

View file

@ -47,6 +47,7 @@ $(OBJ)/wad2map.$o: $(SRC)/util/wad2map.c $(INC)/compat.h $(INC)/pragmas.h
$(OBJ)/md2tool.$o: $(SRC)/util/md2tool.c $(INC)/compat.h $(INC)/build.h $(INC)/glbuild.h $(INC)/mdsprite.h
$(OBJ)/generateicon.$o: $(SRC)/util/generateicon.c $(INC)/kplib.h $(INC)/compat.h
$(OBJ)/cacheinfo.$o: $(SRC)/util/cacheinfo.c $(INC)/compat.h
$(OBJ)/enumdisplay.$o: $(SRC)/misc/enumdisplay.c
$(OBJ)/arttool.$o: $(SRC)/util/arttool.cc
$(OBJ)/givedepth.$o: $(SRC)/util/givedepth.c
$(OBJ)/mkpalette.$o: $(SRC)/util/mkpalette.c

View file

@ -107,13 +107,19 @@ CFLAGS=$(CFLAGS) /DRENDERTYPE$(RENDERTYPE)=1 /W2
{$(SRC)}.c{$(OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)}.cc{$(OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)}.cpp{$(OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
# TARGETS
UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX)
{$(SRC)}.cxx{$(OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
all: $(OBJ)/$(ENGINELIB) $(OBJ)/$(EDITORLIB);
# TARGETS
UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX) md2tool$(EXESUFFIX) generateicon$(EXESUFFIX) cacheinfo$(EXESUFFIX) arttool$(EXESUFFIX) givedepth$(EXESUFFIX) mkpalette$(EXESUFFIX)
all: $(OBJ)\$(ENGINELIB) $(OBJ)\$(EDITORLIB);
utils: $(UTILS) ;
enginelib: $(OBJ)\$(ENGINELIB) ;
@ -125,23 +131,47 @@ $(OBJ)\$(EDITORLIB): $(EDITOROBJS)
lib $(flags_lib) /out:$@ /nologo $**
# the tools
kextract$(EXESUFFIX): $(OBJ)\kextract.$o $(OBJ)\compat.$o $(OBJ)\nedmalloc.$o
kextract$(EXESUFFIX): $(OBJ)\kextract.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o $(OBJ)\nedmalloc.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
kgroup$(EXESUFFIX): $(OBJ)\kgroup.$o $(OBJ)\compat.$o $(OBJ)\nedmalloc.$o
kgroup$(EXESUFFIX): $(OBJ)\kgroup.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o $(OBJ)\nedmalloc.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
transpal$(EXESUFFIX): $(OBJ)\transpal.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)\nedmalloc.$o
transpal$(EXESUFFIX): $(OBJ)\transpal.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o $(OBJ)\nedmalloc.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
wad2map$(EXESUFFIX): $(OBJ)\wad2map.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)\nedmalloc.$o
wad2map$(EXESUFFIX): $(OBJ)\wad2map.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o $(OBJ)\nedmalloc.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
wad2art$(EXESUFFIX): $(OBJ)\wad2art.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)\nedmalloc.$o
wad2art$(EXESUFFIX): $(OBJ)\wad2art.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o $(OBJ)\nedmalloc.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
md2tool$(EXESUFFIX): $(OBJ)\md2tool.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o $(OBJ)\nedmalloc.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
generateicon$(EXESUFFIX): $(OBJ)\generateicon.$o $(OBJ)\compat.$o $(OBJ)\pragmas.$o $(OBJ)\kplib.$o $(OBJ)\cache1d.$o $(OBJ)\compat_tools.$o $(OBJ)\nedmalloc.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
cacheinfo$(EXESUFFIX): $(OBJ)\cacheinfo.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o $(OBJ)\nedmalloc.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
arttool$(EXESUFFIX): $(OBJ)\arttool.$o $(OBJ)\nedmalloc.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
givedepth$(EXESUFFIX): $(OBJ)\givedepth.$o $(OBJ)\nedmalloc.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
mkpalette$(EXESUFFIX): $(OBJ)\mkpalette.$o $(OBJ)\nedmalloc.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
@ -150,7 +180,7 @@ wad2art$(EXESUFFIX): $(OBJ)\wad2art.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)
# PHONIES
clean:
-del /Q $(ENGINEOBJS) $(EDITOROBJS) $(OBJ)\kextract.$o $(OBJ)\kgroup.$o $(OBJ)\transpal.$o $(OBJ)\wad2map.$o $(OBJ)\wad2art.$o
-del /Q $(ENGINEOBJS) $(EDITOROBJS) $(OBJ)\kextract.$o $(OBJ)\kgroup.$o $(OBJ)\transpal.$o $(OBJ)\wad2art.$o $(OBJ)\wad2map.$o $(OBJ)\md2tool.$o $(OBJ)\generateicon.$o $(OBJ)\cacheinfo.$o $(OBJ)\arttool.$o $(OBJ)\givedepth.$o $(OBJ)\mkpalette.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o $(OBJ)\pragmas.$o $(OBJ)\kplib.$o $(OBJ)\cache1d.$o $(OBJ)\nedmalloc.$o
veryclean: clean
-del /Q $(OBJ)\$(ENGINELIB) $(OBJ)\$(EDITORLIB) $(UTILS) *.map *.manifest *.pdb