Makefile shite

git-svn-id: https://svn.eduke32.com/eduke32@285 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-08-31 01:54:23 +00:00
parent d2f776519e
commit 138a4ab95f
29 changed files with 567 additions and 540 deletions

View file

@ -33,11 +33,11 @@ DXROOT=c:/sdks/directx/dx61
FMODROOTWIN=c:/sdks/fmodapi374win/api FMODROOTWIN=c:/sdks/fmodapi374win/api
# build locations - OBJ gets overridden to the game-specific objects dir # build locations - OBJ gets overridden to the game-specific objects dir
OBJ?=obj.gnu/ OBJ?=obj.gnu
SRC=src/ SRC=src
GAME=testgame/ GAME=testgame
RSRC=rsrc/ RSRC=rsrc
INC=include/ INC=include
# filename extensions - these won't need to change # filename extensions - these won't need to change
o=o o=o
@ -61,9 +61,9 @@ AR=ar
RANLIB=ranlib RANLIB=ranlib
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts -Wno-unused \ OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts -Wno-unused \
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS \ -funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS \
-DKSFORBUILD -I$(INC:/=) -DKSFORBUILD -I$(INC)
OURCXXFLAGS=-fno-exceptions -fno-rtti OURCXXFLAGS=-fno-exceptions -fno-rtti
GAMECFLAGS=-I../jfaud/inc -I$(GAME) GAMECFLAGS=-I../jfaud/inc -I$(GAME)/
LIBS= LIBS=
GAMELIBS=../jfaud/libjfaud.a #../jfaud/mpadec/libmpadec/libmpadec.a GAMELIBS=../jfaud/libjfaud.a #../jfaud/mpadec/libmpadec/libmpadec.a
ASFLAGS=-s #-g ASFLAGS=-s #-g
@ -72,40 +72,40 @@ EXESUFFIX=
include Makefile.shared include Makefile.shared
ifneq (0,$(USE_A_C)) ifneq (0,$(USE_A_C))
ENGINEOBJS=$(OBJ)a-c.$o ENGINEOBJS=$(OBJ)/a-c.$o
else else
ENGINEOBJS=$(OBJ)a.$o ENGINEOBJS=$(OBJ)/a.$o
endif endif
ENGINEOBJS+= \ ENGINEOBJS+= \
$(OBJ)baselayer.$o \ $(OBJ)/baselayer.$o \
$(OBJ)cache1d.$o \ $(OBJ)/cache1d.$o \
$(OBJ)compat.$o \ $(OBJ)/compat.$o \
$(OBJ)crc32.$o \ $(OBJ)/crc32.$o \
$(OBJ)defs.$o \ $(OBJ)/defs.$o \
$(OBJ)engine.$o \ $(OBJ)/engine.$o \
$(OBJ)glbuild.$o \ $(OBJ)/glbuild.$o \
$(OBJ)kplib.$o \ $(OBJ)/kplib.$o \
$(OBJ)lzf_c.$o \ $(OBJ)/lzf_c.$o \
$(OBJ)lzf_d.$o \ $(OBJ)/lzf_d.$o \
$(OBJ)md4.$o \ $(OBJ)/md4.$o \
$(OBJ)mmulti.$o \ $(OBJ)/mmulti.$o \
$(OBJ)osd.$o \ $(OBJ)/osd.$o \
$(OBJ)pragmas.$o \ $(OBJ)/pragmas.$o \
$(OBJ)scriptfile.$o \ $(OBJ)/scriptfile.$o \
$(OBJ)polymer.$o $(OBJ)/polymer.$o
EDITOROBJS=$(OBJ)build.$o \ EDITOROBJS=$(OBJ)/build.$o \
$(OBJ)config.$o $(OBJ)/config.$o
GAMEEXEOBJS=$(OBJ)game.$o \ GAMEEXEOBJS=$(OBJ)/game.$o \
$(OBJ)jfaud_sound.$o \ $(OBJ)/jfaud_sound.$o \
$(OBJ)config.$o \ $(OBJ)/config.$o \
$(OBJ)$(ENGINELIB) $(OBJ)/$(ENGINELIB)
EDITOREXEOBJS=$(OBJ)bstub.$o \ EDITOREXEOBJS=$(OBJ)/bstub.$o \
$(OBJ)$(EDITORLIB) \ $(OBJ)/$(EDITORLIB) \
$(OBJ)$(ENGINELIB) $(OBJ)/$(ENGINELIB)
# detect the platform # detect the platform
ifeq ($(PLATFORM),LINUX) ifeq ($(PLATFORM),LINUX)
@ -135,25 +135,25 @@ ifeq ($(PLATFORM),SYLLABLE)
endif endif
ifeq ($(RENDERTYPE),SDL) ifeq ($(RENDERTYPE),SDL)
ENGINEOBJS+= $(OBJ)sdlayer.$o ENGINEOBJS+= $(OBJ)/sdlayer.$o
OURCFLAGS+= $(subst -Dmain=SDL_main,,$(SDLCONFIG_CFLAGS)) OURCFLAGS+= $(subst -Dmain=SDL_main,,$(SDLCONFIG_CFLAGS))
ifeq (1,$(HAVE_GTK2)) ifeq (1,$(HAVE_GTK2))
OURCFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0) OURCFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
ENGINEOBJS+= $(OBJ)gtkbits.$o $(OBJ)dynamicgtk.$o ENGINEOBJS+= $(OBJ)/gtkbits.$o $(OBJ)/dynamicgtk.$o
EDITOROBJS+= $(OBJ)startgtk.editor.$o EDITOROBJS+= $(OBJ)/startgtk.editor.$o
GAMEEXEOBJS+= $(OBJ)game_banner.$o $(OBJ)startgtk.game.$o GAMEEXEOBJS+= $(OBJ)/game_banner.$o $(OBJ)/startgtk.game.$o
EDITOREXEOBJS+= $(OBJ)editor_banner.$o EDITOREXEOBJS+= $(OBJ)/editor_banner.$o
endif endif
GAMEEXEOBJS+= $(OBJ)game_icon.$o GAMEEXEOBJS+= $(OBJ)/game_icon.$o
EDITOREXEOBJS+= $(OBJ)build_icon.$o EDITOREXEOBJS+= $(OBJ)/build_icon.$o
endif endif
ifeq ($(RENDERTYPE),WIN) ifeq ($(RENDERTYPE),WIN)
ENGINEOBJS+= $(OBJ)winlayer.$o ENGINEOBJS+= $(OBJ)/winlayer.$o
EDITOROBJS+= $(OBJ)startwin.editor.$o EDITOROBJS+= $(OBJ)/startwin.editor.$o
GAMEEXEOBJS+= $(OBJ)gameres.$(res) $(OBJ)startwin.game.$o GAMEEXEOBJS+= $(OBJ)/gameres.$(res) $(OBJ)/startwin.game.$o
EDITOREXEOBJS+= $(OBJ)buildres.$(res) EDITOREXEOBJS+= $(OBJ)/buildres.$(res)
endif endif
ifneq (0,$(EFENCE)) ifneq (0,$(EFENCE))
@ -182,16 +182,16 @@ endif
UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX) UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX)
all: testgame$(EXESUFFIX) build$(EXESUFFIX) $(OBJ)$(ENGINELIB) $(OBJ)$(EDITORLIB) all: testgame$(EXESUFFIX) build$(EXESUFFIX) $(OBJ)/$(ENGINELIB) $(OBJ)/$(EDITORLIB)
utils: $(UTILS) utils: $(UTILS)
enginelib: $(OBJ)$(ENGINELIB) enginelib: $(OBJ)/$(ENGINELIB)
$(OBJ)$(ENGINELIB): $(ENGINEOBJS) $(OBJ)/$(ENGINELIB): $(ENGINEOBJS)
$(AR) rc $@ $^ $(AR) rc $@ $^
$(RANLIB) $@ $(RANLIB) $@
editorlib: $(OBJ)$(EDITORLIB) editorlib: $(OBJ)/$(EDITORLIB)
$(OBJ)$(EDITORLIB): $(EDITOROBJS) $(OBJ)/$(EDITORLIB): $(EDITOROBJS)
$(AR) rc $@ $^ $(AR) rc $@ $^
$(RANLIB) $@ $(RANLIB) $@
@ -201,60 +201,62 @@ testgame$(EXESUFFIX): $(GAMEEXEOBJS)
build$(EXESUFFIX): $(EDITOREXEOBJS) build$(EXESUFFIX): $(EDITOREXEOBJS)
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS)
pragmacheck$(EXESUFFIX): $(OBJ)pragmacheck.$o $(OBJ)pragmas.$o pragmacheck$(EXESUFFIX): $(OBJ)/pragmacheck.$o $(OBJ)/pragmas.$o
$(CC) $(subst -Dmain=app_main,,$(OURCFLAGS)) -o $@ $^ $(CC) $(subst -Dmain=app_main,,$(OURCFLAGS)) -o $@ $^
kextract$(EXESUFFIX): $(OBJ)kextract.$o $(OBJ)compat.$o kextract$(EXESUFFIX): $(OBJ)/kextract.$o $(OBJ)/compat.$o
$(CC) -o $@ $^ $(CC) -o $@ $^
kgroup$(EXESUFFIX): $(OBJ)kgroup.$o $(OBJ)compat.$o kgroup$(EXESUFFIX): $(OBJ)/kgroup.$o $(OBJ)/compat.$o
$(CC) -o $@ $^ $(CC) -o $@ $^
transpal$(EXESUFFIX): $(OBJ)transpal.$o $(OBJ)pragmas.$o $(OBJ)compat.$o transpal$(EXESUFFIX): $(OBJ)/transpal.$o $(OBJ)/pragmas.$o $(OBJ)/compat.$o
$(CC) -o $@ $^ $(CC) -o $@ $^
wad2art$(EXESUFFIX): $(OBJ)wad2art.$o $(OBJ)pragmas.$o $(OBJ)compat.$o wad2art$(EXESUFFIX): $(OBJ)/wad2art.$o $(OBJ)/pragmas.$o $(OBJ)/compat.$o
$(CC) -o $@ $^ $(CC) -o $@ $^
wad2map$(EXESUFFIX): $(OBJ)wad2map.$o $(OBJ)pragmas.$o $(OBJ)compat.$o wad2map$(EXESUFFIX): $(OBJ)/wad2map.$o $(OBJ)/pragmas.$o $(OBJ)/compat.$o
$(CC) -o $@ $^ $(CC) -o $@ $^
generateicon$(EXESUFFIX): $(OBJ)generateicon.$o $(OBJ)kplib.$o generateicon$(EXESUFFIX): $(OBJ)/generateicon.$o $(OBJ)/kplib.$o
$(CC) -o $@ $^ $(CC) -o $@ $^
cacheinfo$(EXESUFFIX): $(OBJ)cacheinfo.$o $(OBJ)compat.$o cacheinfo$(EXESUFFIX): $(OBJ)/cacheinfo.$o $(OBJ)/compat.$o
$(CC) -o $@ $^ $(CC) -o $@ $^
enumdisplay$(EXESUFFIX): src/misc/enumdisplay.c enumdisplay$(EXESUFFIX): src/misc/enumdisplay.c
$(CC) -g -Os -o $@ $^ -I$(DXROOT)/include -lgdi32 $(CC) -g -Os -o $@ $^ -I$(DXROOT)/include -lgdi32
mapdump$(EXESUFFIX): $(OBJ)/mapdump.$o
$(CC) -o $@ $^
# DEPENDENCIES # DEPENDENCIES
include Makefile.deps include Makefile.deps
# RULES # RULES
$(OBJ)%.$o: $(SRC)%.nasm $(OBJ)/%.$o: $(SRC)/%.nasm
$(AS) $(ASFLAGS) $< -o $@ $(AS) $(ASFLAGS) $< -o $@
$(OBJ)%.$o: $(SRC)%.c $(OBJ)/%.$o: $(SRC)/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1 $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
$(OBJ)%.$o: $(SRC)%.cpp $(OBJ)/%.$o: $(SRC)/%.cpp
$(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1 $(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
$(OBJ)%.$o: $(SRC)misc/%.rc $(OBJ)/%.$o: $(SRC)/misc/%.rc
$(RC) -i $< -o $@ --include-dir=$(INC) --include-dir=$(SRC) --include-dir=$(GAME) $(RC) -i $< -o $@ --include-dir=$(INC) --include-dir=$(SRC) --include-dir=$(GAME)
$(OBJ)%.$o: $(SRC)util/%.c $(OBJ)/%.$o: $(SRC)/util/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1 $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
$(OBJ)%.$o: $(RSRC)%.c $(OBJ)/%.$o: $(RSRC)/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1 $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
$(OBJ)%.$o: $(GAME)%.c $(OBJ)/%.$o: $(GAME)/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) $(GAMECFLAGS) -c $< -o $@ 2>&1 $(CC) $(CFLAGS) $(OURCFLAGS) $(GAMECFLAGS) -c $< -o $@ 2>&1
$(OBJ)%.$o: $(GAME)%.cpp $(OBJ)/%.$o: $(GAME)/%.cpp
$(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) $(GAMECFLAGS) -c $< -o $@ 2>&1 $(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) $(GAMECFLAGS) -c $< -o $@ 2>&1
$(OBJ)game_banner.$o: $(RSRC)game_banner.c $(OBJ)/game_banner.$o: $(RSRC)/game_banner.c
$(OBJ)editor_banner.$o: $(RSRC)editor_banner.c $(OBJ)/editor_banner.$o: $(RSRC)/editor_banner.c
$(RSRC)game_banner.c: $(RSRC)game.bmp $(RSRC)/game_banner.c: $(RSRC)/game.bmp
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@ echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@ gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
$(RSRC)editor_banner.c: $(RSRC)build.bmp $(RSRC)/editor_banner.c: $(RSRC)/build.bmp
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@ echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@ gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
@ -264,7 +266,7 @@ ifeq ($(PLATFORM),DARWIN)
cd osx/engine && xcodebuild -target All clean cd osx/engine && xcodebuild -target All clean
cd osx/game && xcodebuild -target All clean cd osx/game && xcodebuild -target All clean
else else
-rm -f $(OBJ)* -rm -f $(OBJ)/*
endif endif
veryclean: clean veryclean: clean

View file

@ -1,52 +1,52 @@
# Build Engine dependencies # Build Engine dependencies
# #
$(OBJ)a-c.$o: $(SRC)a-c.c $(INC)a.h $(OBJ)/a-c.$o: $(SRC)/a-c.c $(INC)/a.h
$(OBJ)a.$o: $(SRC)a.$(asm) $(OBJ)/a.$o: $(SRC)/a.$(asm)
$(OBJ)baselayer.$o: $(SRC)baselayer.c $(INC)compat.h $(INC)baselayer.h $(INC)build.h $(INC)osd.h $(OBJ)/baselayer.$o: $(SRC)/baselayer.c $(INC)/compat.h $(INC)/baselayer.h $(INC)/build.h $(INC)/osd.h
$(OBJ)build.$o: $(SRC)build.c $(INC)build.h $(INC)pragmas.h $(INC)compat.h $(INC)baselayer.h $(INC)editor.h $(OBJ)/build.$o: $(SRC)/build.c $(INC)/build.h $(INC)/pragmas.h $(INC)/compat.h $(INC)/baselayer.h $(INC)/editor.h
$(OBJ)cache1d.$o: $(SRC)cache1d.c $(INC)compat.h $(INC)cache1d.h $(INC)pragmas.h $(INC)baselayer.h $(OBJ)/cache1d.$o: $(SRC)/cache1d.c $(INC)/compat.h $(INC)/cache1d.h $(INC)/pragmas.h $(INC)/baselayer.h
$(OBJ)compat.$o: $(SRC)compat.c $(INC)compat.h $(OBJ)/compat.$o: $(SRC)/compat.c $(INC)/compat.h
$(OBJ)config.$o: $(SRC)config.c $(INC)compat.h $(INC)osd.h $(INC)editor.h $(OBJ)/config.$o: $(SRC)/config.c $(INC)/compat.h $(INC)/osd.h $(INC)/editor.h
$(OBJ)crc32.$o: $(SRC)crc32.c $(INC)crc32.h $(OBJ)/crc32.$o: $(SRC)/crc32.c $(INC)/crc32.h
$(OBJ)defs.$o: $(SRC)defs.c $(INC)build.h $(INC)baselayer.h $(INC)scriptfile.h $(INC)compat.h $(OBJ)/defs.$o: $(SRC)/defs.c $(INC)/build.h $(INC)/baselayer.h $(INC)/scriptfile.h $(INC)/compat.h
$(OBJ)engine.$o: $(SRC)engine.c $(SRC)polymost.c $(INC)kplib.h $(SRC)hightile.c $(SRC)mdsprite.c $(INC)md4.h $(INC)lzf.h $(INC)lzwnew.h $(INC)compat.h $(INC)build.h $(INC)pragmas.h $(INC)cache1d.h $(INC)a.h $(INC)osd.h $(INC)baselayer.h $(INC)polymer.h $(INC)polymost.h $(OBJ)/engine.$o: $(SRC)/engine.c $(SRC)/polymost.c $(INC)/kplib.h $(SRC)/hightile.c $(SRC)/mdsprite.c $(INC)/md4.h $(INC)/lzf.h $(INC)/lzwnew.h $(INC)/compat.h $(INC)/build.h $(INC)/pragmas.h $(INC)/cache1d.h $(INC)/a.h $(INC)/osd.h $(INC)/baselayer.h $(INC)/polymer.h $(INC)/polymost.h
$(OBJ)glbuild.$o: $(SRC)glbuild.c $(INC)glbuild.h $(INC)baselayer.h $(OBJ)/glbuild.$o: $(SRC)/glbuild.c $(INC)/glbuild.h $(INC)/baselayer.h
$(OBJ)kplib.$o: $(SRC)kplib.c $(INC)compat.h $(OBJ)/kplib.$o: $(SRC)/kplib.c $(INC)/compat.h
$(OBJ)lzf_c.$o: $(SRC)lzf_c.c $(SRC)lzfP.h $(OBJ)/lzf_c.$o: $(SRC)/lzf_c.c $(SRC)/lzfP.h
$(OBJ)lzf_d.$o: $(SRC)lzf_d.c $(SRC)lzfP.h $(OBJ)/lzf_d.$o: $(SRC)/lzf_d.c $(SRC)/lzfP.h
$(OBJ)lzwnew.$o: $(SRC)lzwnew.c $(OBJ)/lzwnew.$o: $(SRC)/lzwnew.c
$(OBJ)md4.$o: $(SRC)md4.c $(INC)md4.h $(INC)compat.h $(OBJ)/md4.$o: $(SRC)/md4.c $(INC)/md4.h $(INC)/compat.h
$(OBJ)mmulti_null.$o: $(SRC)mmulti_null.c $(INC)mmulti.h $(OBJ)/mmulti_null.$o: $(SRC)/mmulti_null.c $(INC)/mmulti.h
$(OBJ)mmulti.$o: $(SRC)mmulti.c $(OBJ)/mmulti.$o: $(SRC)/mmulti.c
$(OBJ)osd.$o: $(SRC)osd.c $(INC)build.h $(INC)osd.h $(INC)compat.h $(INC)baselayer.h $(OBJ)/osd.$o: $(SRC)/osd.c $(INC)/build.h $(INC)/osd.h $(INC)/compat.h $(INC)/baselayer.h
$(OBJ)pragmas.$o: $(SRC)pragmas.c $(INC)compat.h $(OBJ)/pragmas.$o: $(SRC)/pragmas.c $(INC)/compat.h
$(OBJ)scriptfile.$o: $(SRC)scriptfile.c $(INC)scriptfile.h $(INC)cache1d.h $(INC)compat.h $(OBJ)/scriptfile.$o: $(SRC)/scriptfile.c $(INC)/scriptfile.h $(INC)/cache1d.h $(INC)/compat.h
$(OBJ)sdlayer.$o: $(SRC)sdlayer.c $(INC)compat.h $(INC)sdlayer.h $(INC)baselayer.h $(INC)cache1d.h $(INC)pragmas.h $(INC)a.h $(INC)build.h $(INC)osd.h $(INC)glbuild.h $(OBJ)/sdlayer.$o: $(SRC)/sdlayer.c $(INC)/compat.h $(INC)/sdlayer.h $(INC)/baselayer.h $(INC)/cache1d.h $(INC)/pragmas.h $(INC)/a.h $(INC)/build.h $(INC)/osd.h $(INC)/glbuild.h
$(OBJ)sound.$o: $(SRC)sound.c $(INC)osd.h $(INC)compat.h $(INC)cache1d.h $(OBJ)/sound.$o: $(SRC)/sound.c $(INC)/osd.h $(INC)/compat.h $(INC)/cache1d.h
$(OBJ)winlayer.$o: $(SRC)winlayer.c $(INC)compat.h $(INC)winlayer.h $(INC)baselayer.h $(INC)pragmas.h $(INC)build.h $(INC)a.h $(INC)osd.h $(INC)dxdidf.h $(INC)glbuild.h $(OBJ)/winlayer.$o: $(SRC)/winlayer.c $(INC)/compat.h $(INC)/winlayer.h $(INC)/baselayer.h $(INC)/pragmas.h $(INC)/build.h $(INC)/a.h $(INC)/osd.h $(INC)/dxdidf.h $(INC)/glbuild.h
$(OBJ)gtkbits.$o: $(SRC)gtkbits.c $(INC)baselayer.h $(INC)build.h $(INC)dynamicgtk.h $(OBJ)/gtkbits.$o: $(SRC)/gtkbits.c $(INC)/baselayer.h $(INC)/build.h $(INC)/dynamicgtk.h
$(OBJ)dynamicgtk.$o: $(SRC)dynamicgtk.c $(INC)dynamicgtk.h $(OBJ)/dynamicgtk.$o: $(SRC)/dynamicgtk.c $(INC)/dynamicgtk.h
$(OBJ)polymer.$o: $(SRC)polymer.c $(INC)polymer.h $(INC)compat.h $(INC)build.h $(INC)glbuild.h $(INC)osd.h $(INC)polymost.h $(OBJ)/polymer.$o: $(SRC)/polymer.c $(INC)/polymer.h $(INC)/compat.h $(INC)/build.h $(INC)/glbuild.h $(INC)/osd.h $(INC)/polymost.h
# KenBuild test game # KenBuild test game
$(OBJ)game.$o: $(GAME)game.c $(INC)compat.h $(INC)build.h $(GAME)names.h $(INC)pragmas.h $(INC)cache1d.h $(GAME)game.h $(INC)osd.h $(INC)baselayer.h $(OBJ)/game.$o: $(GAME)/game.c $(INC)/compat.h $(INC)/build.h $(GAME)/names.h $(INC)/pragmas.h $(INC)/cache1d.h $(GAME)/game.h $(INC)/osd.h $(INC)/baselayer.h
$(OBJ)bstub.$o: $(GAME)bstub.c $(INC)compat.h $(INC)a.h $(INC)build.h $(INC)pragmas.h $(INC)baselayer.h $(GAME)names.h $(INC)osd.h $(INC)cache1d.h $(INC)editor.h $(OBJ)/bstub.$o: $(GAME)/bstub.c $(INC)/compat.h $(INC)/a.h $(INC)/build.h $(INC)/pragmas.h $(INC)/baselayer.h $(GAME)/names.h $(INC)/osd.h $(INC)/cache1d.h $(INC)/editor.h
$(OBJ)jfaud_sound.$o: $(GAME)jfaud_sound.cpp $(INC)osd.h $(INC)compat.h $(INC)cache1d.h $(OBJ)/jfaud_sound.$o: $(GAME)/jfaud_sound.cpp $(INC)/osd.h $(INC)/compat.h $(INC)/cache1d.h
$(OBJ)startwin.game.$o: $(GAME)startwin.game.c $(INC)build.h $(INC)editor.h $(INC)winlayer.h $(INC)compat.h $(GAME)startwin.game.h $(OBJ)/startwin.game.$o: $(GAME)/startwin.game.c $(INC)/build.h $(INC)/editor.h $(INC)/winlayer.h $(INC)/compat.h $(GAME)/startwin.game.h
$(OBJ)startgtk.game.$o: $(GAME)startgtk.game.c $(INC)baselayer.h $(INC)build.h $(INC)compat.h $(OBJ)/startgtk.game.$o: $(GAME)/startgtk.game.c $(INC)/baselayer.h $(INC)/build.h $(INC)/compat.h
$(OBJ)gameres.$(res): $(SRC)misc/gameres.rc $(GAME)startwin.game.h $(OBJ)/gameres.$(res): $(SRC)/misc/gameres.rc $(GAME)/startwin.game.h
$(OBJ)buildres.$(res): $(SRC)misc/buildres.rc $(INC)startwin.editor.h $(OBJ)/buildres.$(res): $(SRC)/misc/buildres.rc $(INC)/startwin.editor.h
$(OBJ)startwin.editor.$o: $(SRC)startwin.editor.c $(INC)build.h $(INC)editor.h $(INC)winlayer.h $(INC)compat.h $(INC)startwin.editor.h $(OBJ)/startwin.editor.$o: $(SRC)/startwin.editor.c $(INC)/build.h $(INC)/editor.h $(INC)/winlayer.h $(INC)/compat.h $(INC)/startwin.editor.h
$(OBJ)startgtk.editor.$o: $(SRC)startgtk.editor.c $(INC)baselayer.h $(INC)build.h $(INC)editor.h $(INC)compat.h $(OBJ)/startgtk.editor.$o: $(SRC)/startgtk.editor.c $(INC)/baselayer.h $(INC)/build.h $(INC)/editor.h $(INC)/compat.h
$(OBJ)game_icon.$o: $(RSRC)game_icon.c $(OBJ)/game_icon.$o: $(RSRC)game_icon.c
$(OBJ)build_icon.$o: $(RSRC)build_icon.c $(OBJ)/build_icon.$o: $(RSRC)build_icon.c
$(OBJ)kextract.$o: $(SRC)util/kextract.c $(INC)compat.h $(OBJ)/kextract.$o: $(SRC)/util/kextract.c $(INC)/compat.h
$(OBJ)kgroup.$o: $(SRC)util/kgroup.c $(INC)compat.h $(OBJ)/kgroup.$o: $(SRC)/util/kgroup.c $(INC)/compat.h
$(OBJ)transpal.$o: $(SRC)util/transpal.c $(INC)compat.h $(INC)pragmas.h $(OBJ)/transpal.$o: $(SRC)/util/transpal.c $(INC)/compat.h $(INC)/pragmas.h
$(OBJ)wad2art.$o: $(SRC)util/wad2art.c $(INC)compat.h $(INC)pragmas.h $(OBJ)/wad2art.$o: $(SRC)/util/wad2art.c $(INC)/compat.h $(INC)/pragmas.h
$(OBJ)wad2map.$o: $(SRC)util/wad2map.c $(INC)compat.h $(INC)pragmas.h $(OBJ)/wad2map.$o: $(SRC)/util/wad2map.c $(INC)/compat.h $(INC)/pragmas.h
$(OBJ)generateicon.$o: $(SRC)util/generateicon.c $(OBJ)/generateicon.$o: $(SRC)/util/generateicon.c
$(OBJ)cacheinfo.$o: $(SRC)util/cacheinfo.c $(INC)compat.h $(OBJ)/cacheinfo.$o: $(SRC)/util/cacheinfo.c $(INC)/compat.h

View file

@ -3,10 +3,10 @@
!include $(OVERRIDES) !include $(OVERRIDES)
!endif !endif
SRC=src\ # SRC=src
GAME=game\ # GAME=game
!ifndef OBJ !ifndef OBJ
OBJ=obj.msc\ # OBJ=obj.msc
!endif !endif
INC=include\ # INC=include\ #
!ifndef CFLAGS !ifndef CFLAGS
@ -26,8 +26,8 @@ FMODROOT=c:\sdks\fmodapi374win\api
# /D these to enable certain features of the port's compile process # /D these to enable certain features of the port's compile process
# USE_A_C This uses a C version of the classic renderer code rather # USE_A_C This uses a C version of the classic renderer code rather
# than the assembly version in A.ASM. # than the assembly version in A.ASM.
# If this is defined, alter the $(OBJ)a.$o in the # If this is defined, alter the $(OBJ)\a.$o in the
# ENGINEOBJS declaration to be $(OBJ)a-c.$o # ENGINEOBJS declaration to be $(OBJ)\a-c.$o
# NOASM When defined, uses C instead of Microsoft inline # NOASM When defined, uses C instead of Microsoft inline
# assembly for the features in PRAGMAS.H # assembly for the features in PRAGMAS.H
TARGETOPTS=#/DUSE_A_C #/DNOASM TARGETOPTS=#/DUSE_A_C #/DNOASM
@ -53,40 +53,40 @@ LIBS=fmodvc.lib #opengl32.lib
ASFLAGS=/nologo /coff ASFLAGS=/nologo /coff
EXESUFFIX=.exe EXESUFFIX=.exe
ENGINEOBJS=$(OBJ)a.$o \ ENGINEOBJS=$(OBJ)\a.$o \
$(OBJ)baselayer.$o \ $(OBJ)\baselayer.$o \
$(OBJ)cache1d.$o \ $(OBJ)\cache1d.$o \
$(OBJ)compat.$o \ $(OBJ)\compat.$o \
$(OBJ)crc32.$o \ $(OBJ)\crc32.$o \
$(OBJ)defs.$o \ $(OBJ)\defs.$o \
$(OBJ)engine.$o \ $(OBJ)\engine.$o \
$(OBJ)glbuild.$o \ $(OBJ)\glbuild.$o \
$(OBJ)kplib.$o \ $(OBJ)\kplib.$o \
$(OBJ)lzf_c.$o \ $(OBJ)\lzf_c.$o \
$(OBJ)lzf_d.$o \ $(OBJ)\lzf_d.$o \
$(OBJ)lzwnew.$o \ $(OBJ)\lzwnew.$o \
$(OBJ)md4.$o \ $(OBJ)\md4.$o \
$(OBJ)mmulti.$o \ $(OBJ)\mmulti.$o \
$(OBJ)osd.$o \ $(OBJ)\osd.$o \
$(OBJ)pragmas.$o \ $(OBJ)\pragmas.$o \
$(OBJ)scriptfile.$o \ $(OBJ)\scriptfile.$o \
$(OBJ)winlayer.$o $(OBJ)\winlayer.$o
EDITOROBJS=$(OBJ)build.$o \ EDITOROBJS=$(OBJ)\build.$o \
$(OBJ)startwin.editor.$o \ $(OBJ)\startwin.editor.$o \
$(OBJ)config.$o $(OBJ)\config.$o
GAMEEXEOBJS=$(OBJ)config.$o \ GAMEEXEOBJS=$(OBJ)\config.$o \
$(OBJ)game.$o \ $(OBJ)\game.$o \
$(OBJ)gameres.$(res) \ $(OBJ)\gameres.$(res) \
$(OBJ)startwin.game.$o \ $(OBJ)\startwin.game.$o \
$(OBJ)sound.$o \ $(OBJ)\sound.$o \
$(OBJ)$(ENGINELIB) $(OBJ)\$(ENGINELIB)
EDITOREXEOBJS=$(OBJ)bstub.$o \ EDITOREXEOBJS=$(OBJ)\bstub.$o \
$(OBJ)buildres.$(res) \ $(OBJ)\buildres.$(res) \
$(OBJ)$(EDITORLIB) \ $(OBJ)\$(EDITORLIB) \
$(OBJ)$(ENGINELIB) $(OBJ)\$(ENGINELIB)
RENDERTYPE=WIN RENDERTYPE=WIN
LIBS=$(LIBS) user32.lib gdi32.lib shell32.lib dxguid.lib wsock32.lib comctl32.lib LIBS=$(LIBS) user32.lib gdi32.lib shell32.lib dxguid.lib wsock32.lib comctl32.lib
@ -98,14 +98,14 @@ CFLAGS=$(CFLAGS) /DRENDERTYPE$(RENDERTYPE)=1
{$(SRC)}.masm{$(OBJ)}.$o: {$(SRC)}.masm{$(OBJ)}.$o:
$(AS) /c $(ASFLAGS) /Fo$@ $< $(AS) /c $(ASFLAGS) /Fo$@ $<
{$(SRC)tmp}.c{$(OBJ)}.$o: {$(SRC)\tmp}.c{$(OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $< $(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)util}.c{$(OBJ)}.$o: {$(SRC)\util}.c{$(OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $< $(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)misc}.rc{$(OBJ)}.$(res): {$(SRC)\misc}.rc{$(OBJ)}.$(res):
$(RC) /i$(INC) /i$(GAME) /fo$@ /r $< $(RC) /i$(INC)\ /i$(GAME)\ /fo$@ /r $<
{$(SRC)}.c{$(OBJ)}.$o: {$(SRC)}.c{$(OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $< $(CC) /c $(CFLAGS) /Fo$@ $<
@ -122,15 +122,15 @@ CFLAGS=$(CFLAGS) /DRENDERTYPE$(RENDERTYPE)=1
# TARGETS # TARGETS
UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2map$(EXESUFFIX) wad2map$(EXESUFFIX) UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2map$(EXESUFFIX) wad2map$(EXESUFFIX)
all: game$(EXESUFFIX) build$(EXESUFFIX) $(OBJ)$(ENGINELIB) $(OBJ)$(EDITORLIB) ; all: game$(EXESUFFIX) build$(EXESUFFIX) ;
utils: $(UTILS) ; utils: $(UTILS) ;
enginelib: $(OBJ)$(ENGINELIB) ; enginelib: $(OBJ)\$(ENGINELIB) ;
$(OBJ)$(ENGINELIB): $(ENGINEOBJS) $(OBJ)\$(ENGINELIB): $(ENGINEOBJS)
lib /out:$@ /nologo $** lib /out:$@ /nologo $**
editorlib: $(OBJ)$(EDITORLIB) ; editorlib: $(OBJ)\$(EDITORLIB) ;
$(OBJ)$(EDITORLIB): $(EDITOROBJS) $(OBJ)\$(EDITORLIB): $(EDITOROBJS)
lib /out:$@ /nologo $** lib /out:$@ /nologo $**
@ -141,19 +141,19 @@ build$(EXESUFFIX): $(EDITOREXEOBJS)
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib /LIBPATH:$(FMODROOT)\lib $(flags_link) /MAP $** $(LIBS) msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib /LIBPATH:$(FMODROOT)\lib $(flags_link) /MAP $** $(LIBS) msvcrt.lib
# the tools # the tools
kextract$(EXESUFFIX): $(OBJ)kextract.$o $(OBJ)compat.$o kextract$(EXESUFFIX): $(OBJ)\kextract.$o $(OBJ)\compat.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** msvcrt.lib
kgroup$(EXESUFFIX): $(OBJ)kgroup.$o $(OBJ)compat.$o kgroup$(EXESUFFIX): $(OBJ)\kgroup.$o $(OBJ)\compat.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** msvcrt.lib
transpal$(EXESUFFIX): $(OBJ)transpal.$o $(OBJ)pragmas.$o $(OBJ)compat.$o transpal$(EXESUFFIX): $(OBJ)\transpal.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** msvcrt.lib
wad2map$(EXESUFFIX): $(OBJ)wad2map.$o $(OBJ)pragmas.$o $(OBJ)compat.$o wad2map$(EXESUFFIX): $(OBJ)\wad2map.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** msvcrt.lib
wad2art$(EXESUFFIX): $(OBJ)wad2art.$o $(OBJ)pragmas.$o $(OBJ)compat.$o wad2art$(EXESUFFIX): $(OBJ)\wad2art.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** msvcrt.lib
# DEPENDENCIES # DEPENDENCIES
@ -163,5 +163,5 @@ wad2art$(EXESUFFIX): $(OBJ)wad2art.$o $(OBJ)pragmas.$o $(OBJ)compat.$o
clean: clean:
-del $(ENGINEOBJS) $(EDITOROBJS) $(GAMEEXEOBJS) $(EDITOREXEOBJS) -del $(ENGINEOBJS) $(EDITOROBJS) $(GAMEEXEOBJS) $(EDITOREXEOBJS)
veryclean: clean veryclean: clean
-del $(OBJ)$(ENGINELIB) $(OBJ)$(EDITORLIB) game$(EXESUFFIX) build$(EXESUFFIX) $(UTILS) -del $(OBJ)\$(ENGINELIB) $(OBJ)\$(EDITORLIB) game$(EXESUFFIX) build$(EXESUFFIX) $(UTILS)

View file

@ -62,6 +62,13 @@ ifeq ($(PLATFORM),WINDOWS)
RENDERTYPE ?= WIN RENDERTYPE ?= WIN
EXESUFFIX=.exe EXESUFFIX=.exe
LIBS+= -lmingwex -lwinmm -L$(DXROOT)/lib -lwsock32 -lcomctl32 #-lshfolder LIBS+= -lmingwex -lwinmm -L$(DXROOT)/lib -lwsock32 -lcomctl32 #-lshfolder
ifneq (0,$(USE_OPENGL))
LIBS+= -lglu32
endif
else
ifneq (0,$(USE_OPENGL))
LIBS+= -lGLU
endif
endif endif
ifeq ($(PLATFORM),BSD) ifeq ($(PLATFORM),BSD)
RENDERTYPE=SDL RENDERTYPE=SDL
@ -126,9 +133,6 @@ ifeq ($(RENDERTYPE),SDL)
else else
ifeq ($(RENDERTYPE),WIN) ifeq ($(RENDERTYPE),WIN)
LIBS+= -mwindows -ldxguid LIBS+= -mwindows -ldxguid
ifneq (0,$(USE_OPENGL))
LIBS+= -lglu32
endif
endif endif
endif endif

View file

@ -4,12 +4,12 @@
!include $(OVERRIDES) !include $(OVERRIDES)
!endif !endif
SRC=src\ SRC=src
GAME=game\ GAME=game
!ifndef OBJ !ifndef OBJ
OBJ=obj.watcom\ OBJ=obj.watcom
!endif !endif
INC=include\ INC=include
!ifndef CFLAGS !ifndef CFLAGS
CFLAGS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL -dKSFORBUILD CFLAGS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL -dKSFORBUILD
!endif !endif
@ -25,13 +25,14 @@ DXROOT=c:\sdks\directx\dx7
!ifdef __LOADDLL__ !ifdef __LOADDLL__
! loaddll wcc386 wccd386 ! loaddll wcc386 wccd386
! loaddll wpp386 wppd386
!endif !endif
# -d these to enable certain features of the port's compile process # -d these to enable certain features of the port's compile process
# USE_A_C This uses a C version of the classic renderer code rather # USE_A_C This uses a C version of the classic renderer code rather
# than the assembly version in A.ASM. # than the assembly version in A.ASM.
# If this is defined, alter the $(OBJ)a.$o in the # If this is defined, alter the $(OBJ)\a.$o in the
# ENGINEOBJS declaration to be $(OBJ)a-c.$o # ENGINEOBJS declaration to be $(OBJ)\a-c.$o
# NOASM When defined, uses C code instead of Watcom inline # NOASM When defined, uses C code instead of Watcom inline
# assembly for the features in PRAGMAS.H # assembly for the features in PRAGMAS.H
TARGETOPTS=#-dUSE_A_C #-dNOASM TARGETOPTS=#-dUSE_A_C #-dNOASM
@ -41,41 +42,41 @@ CXX=wpp386
AS=wasm AS=wasm
RC=wrc RC=wrc
CFLAGS+= -zq -5r -s -orb -fp5 $(TARGETOPTS) -d2 -dRENDERTYPEWIN=1 & CFLAGS+= -zq -5r -s -orb -fp5 $(TARGETOPTS) -d2 -dRENDERTYPEWIN=1 &
-i=watcomhax -i=$(INC) -i=$(SRC) -i=$(DXROOT)\include -i=..\jfaud\inc -i=$(INC) -i=$(SRC) -i=$(DXROOT)\include -i=..\jfaud\inc
GAMECFLAGS=-i=$(GAME) GAMECFLAGS=-i=$(GAME)\
LIBS=dxguid.lib wsock32.lib ..\jfaud\jfaud.lib winmm.lib #opengl32.lib LIBS=dxguid.lib wsock32.lib ..\jfaud\jfaud.lib winmm.lib #opengl32.lib
ASFLAGS=# -d1 ASFLAGS=# -d1
EXESUFFIX=.exe EXESUFFIX=.exe
ENGINEOBJS=$(OBJ)a.$o & ENGINEOBJS=$(OBJ)\a.$o &
$(OBJ)baselayer.$o & $(OBJ)\baselayer.$o &
$(OBJ)cache1d.$o & $(OBJ)\cache1d.$o &
$(OBJ)compat.$o & $(OBJ)\compat.$o &
$(OBJ)crc32.$o & $(OBJ)\crc32.$o &
$(OBJ)defs.$o & $(OBJ)\defs.$o &
$(OBJ)engine.$o & $(OBJ)\engine.$o &
$(OBJ)glbuild.$o & $(OBJ)\glbuild.$o &
$(OBJ)kplib.$o & $(OBJ)\kplib.$o &
$(OBJ)lzf_c.$o & $(OBJ)\lzf_c.$o &
$(OBJ)lzf_d.$o & $(OBJ)\lzf_d.$o &
$(OBJ)lzwnew.$o & $(OBJ)\lzwnew.$o &
$(OBJ)md4.$o & $(OBJ)\md4.$o &
$(OBJ)mmulti.$o & $(OBJ)\mmulti.$o &
$(OBJ)osd.$o & $(OBJ)\osd.$o &
$(OBJ)pragmas.$o & $(OBJ)\pragmas.$o &
$(OBJ)scriptfile.$o & $(OBJ)\scriptfile.$o &
$(OBJ)winlayer.$o $(OBJ)\winlayer.$o
EDITOROBJS=$(OBJ)build.$o & EDITOROBJS=$(OBJ)\build.$o &
$(OBJ)config.$o & $(OBJ)\config.$o &
$(OBJ)startwin.editor.$o $(OBJ)\startwin.editor.$o
GAMEEXEOBJS=$(OBJ)game.$o & GAMEEXEOBJS=$(OBJ)\game.$o &
$(OBJ)jfaud_sound.$o & $(OBJ)\jfaud_sound.$o &
$(OBJ)config.$o & $(OBJ)\config.$o &
$(OBJ)startwin.game.$o $(OBJ)\startwin.game.$o
EDITOREXEOBJS=$(OBJ)bstub.$o EDITOREXEOBJS=$(OBJ)\bstub.$o
# RULES # RULES
.EXTENSIONS: .wasm .res .rc .EXTENSIONS: .wasm .res .rc
@ -85,16 +86,16 @@ EDITOREXEOBJS=$(OBJ)bstub.$o
.cpp: $(SRC) .cpp: $(SRC)
.c: $(GAME) .c: $(GAME)
.cpp: $(GAME) .cpp: $(GAME)
.c: $(SRC)util/ .c: $(SRC)\util
.rc: $(SRC)misc/ .rc: $(SRC)\misc
.wasm.$o: .wasm.$o:
$(AS) $(ASFLAGS) -fo=$(OBJ).$o $[@ $(AS) $(ASFLAGS) -fo=$(OBJ)\.$o $[@
.c.$o: .c.$o:
$(CC) $(CFLAGS) -fo=$(OBJ).$o $[@ $(CC) $(CFLAGS) -fo=$(OBJ)\.$o $[@
.cpp.$o: .cpp.$o:
$(CXX) $(CFLAGS) $(GAMECFLAGS) -fo=$(OBJ).$o $[@ $(CXX) $(CFLAGS) $(GAMECFLAGS) -fo=$(OBJ)\.$o $[@
.rc.$(res): .rc.$(res):
$(RC) -i=$(SRC) -i=$(INC) -i=$(GAME) -fo=$^*.$(res) -r $[@ $(RC) -i=$(SRC) -i=$(INC) -i=$(GAME) -fo=$^*.$(res) -r $[@
@ -102,63 +103,63 @@ EDITOREXEOBJS=$(OBJ)bstub.$o
# TARGETS # TARGETS
UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX) UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX)
all: game$(EXESUFFIX) build$(EXESUFFIX) $(OBJ)$(ENGINELIB) $(OBJ)$(EDITORLIB) .SYMBOLIC all: game$(EXESUFFIX) build$(EXESUFFIX) .SYMBOLIC
%null %null
utils: $(UTILS) .SYMBOLIC utils: $(UTILS) .SYMBOLIC
%null %null
enginelib: $(OBJ)$(ENGINELIB) .SYMBOLIC enginelib: $(OBJ)\$(ENGINELIB) .SYMBOLIC
%null %null
$(OBJ)$(ENGINELIB): $(ENGINEOBJS) $(OBJ)\$(ENGINELIB): $(ENGINEOBJS)
%create $(OBJ)$(ENGINELIB).tmp %create $(OBJ)\$(ENGINELIB).tmp
for %i in ($(ENGINEOBJS)) do %append $(OBJ)$(ENGINELIB).tmp +%i for %i in ($(ENGINEOBJS)) do %append $(OBJ)\$(ENGINELIB).tmp +%i
wlib -b -n $^* @$(OBJ)$(ENGINELIB).tmp wlib -b -n $^* @$(OBJ)\$(ENGINELIB).tmp
erase $(OBJ)$(ENGINELIB).tmp erase $(OBJ)\$(ENGINELIB).tmp
editorlib: $(OBJ)$(EDITORLIB) .SYMBOLIC editorlib: $(OBJ)\$(EDITORLIB) .SYMBOLIC
%null %null
$(OBJ)$(EDITORLIB): $(EDITOROBJS) $(OBJ)\$(EDITORLIB): $(EDITOROBJS)
%create $(OBJ)$(EDITORLIB).tmp %create $(OBJ)\$(EDITORLIB).tmp
for %i in ($(EDITOROBJS)) do %append $(OBJ)$(EDITORLIB).tmp +%i for %i in ($(EDITOROBJS)) do %append $(OBJ)\$(EDITORLIB).tmp +%i
wlib -b -n $^* @$(OBJ)$(EDITORLIB).tmp wlib -b -n $^* @$(OBJ)\$(EDITORLIB).tmp
erase $(OBJ)$(EDITORLIB).tmp erase $(OBJ)\$(EDITORLIB).tmp
game$(EXESUFFIX): $(GAMEEXEOBJS) $(OBJ)gameres.$(res) $(OBJ)$(ENGINELIB) game$(EXESUFFIX): $(GAMEEXEOBJS) $(OBJ)\gameres.$(res) $(OBJ)\$(ENGINELIB)
wlink NAME $@ & wlink NAME $@ &
SYSTEM WIN95 & SYSTEM WIN95 &
DEBUG ALL & DEBUG ALL &
OPTION MAP & OPTION MAP &
FILE { $(GAMEEXEOBJS) } & FILE { $(GAMEEXEOBJS) } &
RESOURCE $(OBJ)gameres.$(res) & RESOURCE $(OBJ)\gameres.$(res) &
LIBPATH $(DXROOT)\lib & LIBPATH $(DXROOT)\lib &
LIBPATH $(FMODROOT)\lib & LIBPATH $(FMODROOT)\lib &
LIBPATH $(OBJ) & LIBPATH $(OBJ) &
LIBRARY { $(ENGINELIB) $(LIBS) } LIBRARY { $(ENGINELIB) $(LIBS) }
build$(EXESUFFIX): $(EDITOREXEOBJS) $(OBJ)buildres.$(res) $(OBJ)$(ENGINELIB) $(OBJ)$(EDITORLIB) build$(EXESUFFIX): $(EDITOREXEOBJS) $(OBJ)\buildres.$(res) $(OBJ)\$(ENGINELIB) $(OBJ)\$(EDITORLIB)
wlink NAME $@ & wlink NAME $@ &
SYSTEM WIN95 & SYSTEM WIN95 &
DEBUG ALL & DEBUG ALL &
OPTION MAP & OPTION MAP &
FILE { $(EDITOREXEOBJS) } & FILE { $(EDITOREXEOBJS) } &
RESOURCE $(OBJ)buildres.$(res) & RESOURCE $(OBJ)\buildres.$(res) &
LIBPATH $(DXROOT)\lib & LIBPATH $(DXROOT)\lib &
LIBPATH $(FMODROOT)\lib & LIBPATH $(FMODROOT)\lib &
LIBPATH $(OBJ) & LIBPATH $(OBJ) &
LIBRARY { $(ENGINELIB) $(EDITORLIB) $(LIBS) } LIBRARY { $(ENGINELIB) $(EDITORLIB) $(LIBS) }
kextract$(EXESUFFIX): $(OBJ)kextract.$o $(OBJ)compat.$o kextract$(EXESUFFIX): $(OBJ)\kextract.$o $(OBJ)\compat.$o
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< } wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
kgroup$(EXESUFFIX): $(OBJ)kgroup.$o $(OBJ)compat.$o kgroup$(EXESUFFIX): $(OBJ)\kgroup.$o $(OBJ)\compat.$o
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< } wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
transpal$(EXESUFFIX): $(OBJ)transpal.$o $(OBJ)pragmas.$o $(OBJ)compat.$o transpal$(EXESUFFIX): $(OBJ)\transpal.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< } wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
wad2art$(EXESUFFIX): $(OBJ)wad2art.$o $(OBJ)pragmas.$o $(OBJ)compat.$o wad2art$(EXESUFFIX): $(OBJ)\wad2art.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< } wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
wad2map$(EXESUFFIX): $(OBJ)wad2map.$o $(OBJ)pragmas.$o $(OBJ)compat.$o wad2map$(EXESUFFIX): $(OBJ)\wad2map.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< } wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
# DEPENDENCIES # DEPENDENCIES
@ -166,5 +167,5 @@ wad2map$(EXESUFFIX): $(OBJ)wad2map.$o $(OBJ)pragmas.$o $(OBJ)compat.$o
# PHONIES # PHONIES
clean: .SYMBOLIC clean: .SYMBOLIC
-erase /q $(OBJ)* game$(EXESUFFIX) build$(EXESUFFIX) $(UTILS) *.err -erase /q $(OBJ)\* game$(EXESUFFIX) build$(EXESUFFIX) $(UTILS) *.err

View file

@ -11,19 +11,35 @@
// library will need to wrap these functions with suitable emulations. // library will need to wrap these functions with suitable emulations.
#define __compat_h_macrodef__ #define __compat_h_macrodef__
#if defined(__WATCOMC__) && ((__WATCOMC__ -0) < 1230)
# define SCREWED_UP_CPP
#endif
#ifdef __cplusplus #ifdef __cplusplus
# include <cstdarg> # ifdef SCREWED_UP_CPP
// Old OpenWatcoms need some help
# include "watcomhax/cstdarg"
# ifdef __compat_h_macrodef__
# include "watcomhax/cstdio"
# include "watcomhax/cstring"
# include "watcomhax/cstdlib"
# include "watcomhax/ctime"
# endif
# else
# include <cstdarg>
# ifdef __compat_h_macrodef__
# include <cstdio>
# include <cstring>
# include <cstdlib>
# include <ctime>
# endif
# endif
#else #else
# include <stdarg.h> # include <stdarg.h>
#endif #endif
#ifdef __compat_h_macrodef__ #ifdef __compat_h_macrodef__
# ifdef __cplusplus # ifndef __cplusplus
# include <cstdio>
# include <cstring>
# include <cstdlib>
# include <ctime>
# else
# include <stdio.h> # include <stdio.h>
# include <string.h> # include <string.h>
# include <stdlib.h> # include <stdlib.h>
@ -144,6 +160,11 @@ typedef unsigned long long uint64;
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
# ifndef SCREWED_UP_CPP
using namespace std;
# endif
extern "C" { extern "C" {
#endif #endif
@ -272,13 +293,13 @@ int Bclosedir(BDIR *dir);
#ifdef __compat_h_macrodef__ #ifdef __compat_h_macrodef__
# define BFILE FILE typedef FILE BFILE;
# define bsize_t size_t # define bsize_t size_t
# define bssize_t ssize_t # define bssize_t ssize_t
#else #else
typedef void BFILE; typedef void BFILE;
typedef unsigned long bsize_t; typedef unsigned long bsize_t;
typedef signed long bssize_t; typedef signed long bssize_t;
#endif #endif

View file

@ -124,7 +124,7 @@ int polymer_updategeometry(short sectnum)
// This callback is called by the tesselator when it detects an intersection between contours (HELLO ROTATING SPOTLIGHT IN E1L1). // This callback is called by the tesselator when it detects an intersection between contours (HELLO ROTATING SPOTLIGHT IN E1L1).
// In this case, we create a new temporary vertex at the intersection point which will be freed after the polygon is drawn. // In this case, we create a new temporary vertex at the intersection point which will be freed after the polygon is drawn.
void __stdcall polymer_tesscombine(GLdouble v[3], GLdouble *data[4], GLfloat weight[4], GLdouble **out) void polymer_tesscombine(GLdouble v[3], GLdouble *data[4], GLfloat weight[4], GLdouble **out)
{ {
GLdouble *ptr; GLdouble *ptr;
@ -141,7 +141,7 @@ void __stdcall polymer_tesscombine(GLdouble v[3], GLdouble *data[4], GLfloa
} }
// This callback is called by the tesselator whenever it raises an error. // This callback is called by the tesselator whenever it raises an error.
void __stdcall polymer_tesserror(GLenum error) void polymer_tesserror(GLenum error)
{ {
if (pr_verbosity >= 1) OSD_Printf("PR : Tesselation error number %i reported : %s.\n", error, gluErrorString(errno)); if (pr_verbosity >= 1) OSD_Printf("PR : Tesselation error number %i reported : %s.\n", error, gluErrorString(errno));
} }

View file

@ -3840,6 +3840,7 @@ if (tspr->cstat&2) { if (!(tspr->cstat&512)) method = 2+4; else method = 3+4; }
break; break;
} }
if (((tspr->cstat&2) || (gltexmayhavealpha(tspr->picnum,tspr->pal))) && ((tspr->cstat&48) != 0)) if (((tspr->cstat&2) || (gltexmayhavealpha(tspr->picnum,tspr->pal))) && ((tspr->cstat&48) != 0))
if (((tspr->cstat&2) || (gltexmayhavealpha(tspr->picnum,tspr->pal))) && ((tspr->cstat&48) != 0))
bglDepthMask(0); bglDepthMask(0);
#endif #endif

View file

@ -92,7 +92,7 @@ static void ReleaseOpenGL(void);
static void UninitOpenGL(void); static void UninitOpenGL(void);
static int SetupOpenGL(int width, int height, int bitspp); static int SetupOpenGL(int width, int height, int bitspp);
static BOOL RegisterWindowClass(void); static BOOL RegisterWindowClass(void);
static BOOL CreateAppWindow(int modenum, char *wtitle); static BOOL CreateAppWindow(int modenum);
static void DestroyAppWindow(void); static void DestroyAppWindow(void);
static void SaveSystemColours(void); static void SaveSystemColours(void);
static void SetBWSystemColours(void); static void SetBWSystemColours(void);
@ -1786,7 +1786,7 @@ int setvideomode(int x, int y, int c, int fs)
initprintf("Setting video mode %dx%d (%d-bit %s)\n", initprintf("Setting video mode %dx%d (%d-bit %s)\n",
x,y,c, ((fs&1) ? "fullscreen" : "windowed")); x,y,c, ((fs&1) ? "fullscreen" : "windowed"));
if (CreateAppWindow(modenum, apptitle)) return -1; if (CreateAppWindow(modenum)) return -1;
if (!gammabrightness) { if (!gammabrightness) {
float f = 1.0 + ((float)curbrightness / 10.0); float f = 1.0 + ((float)curbrightness / 10.0);
@ -2035,6 +2035,7 @@ void showframe(int w)
bglPushMatrix(); bglPushMatrix();
bglLoadIdentity(); bglLoadIdentity();
bglDisable(GL_ALPHA_TEST);
bglDisable(GL_DEPTH_TEST); bglDisable(GL_DEPTH_TEST);
bglDisable(GL_ALPHA_TEST); bglDisable(GL_ALPHA_TEST);
bglDisable(GL_TEXTURE_2D); bglDisable(GL_TEXTURE_2D);
@ -2859,7 +2860,7 @@ static int SetupOpenGL(int width, int height, int bitspp)
// //
// CreateAppWindow() -- create the application window // CreateAppWindow() -- create the application window
// //
static BOOL CreateAppWindow(int modenum, char *wtitle) static BOOL CreateAppWindow(int modenum)
{ {
RECT rect; RECT rect;
int w, h, x, y, stylebits = 0, stylebitsex = 0; int w, h, x, y, stylebits = 0, stylebitsex = 0;
@ -2956,7 +2957,7 @@ static BOOL CreateAppWindow(int modenum, char *wtitle)
} }
SetWindowPos(hWindow, HWND_TOP, x, y, w, h, 0); SetWindowPos(hWindow, HWND_TOP, x, y, w, h, 0);
SetWindowText(hWindow, wtitle); SetWindowText(hWindow, apptitle);
ShowWindow(hWindow, SW_SHOWNORMAL); ShowWindow(hWindow, SW_SHOWNORMAL);
SetForegroundWindow(hWindow); SetForegroundWindow(hWindow);
SetFocus(hWindow); SetFocus(hWindow);

View file

@ -16,11 +16,11 @@ JFAUD?=0
# build locations # build locations
SRC=source/ SRC=source
RSRC=rsrc/ RSRC=rsrc
EROOT=../build/ EROOT=../build
ESRC=$(EROOT)src/ ESRC=$(EROOT)/src
EINC=$(EROOT)include/ EINC=$(EROOT)/include
INC=$(SRC) INC=$(SRC)
o=o o=o
@ -37,7 +37,7 @@ CXX=g++
# -Werror-implicit-function-declaration # -Werror-implicit-function-declaration
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts -Wunused \ OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts -Wunused \
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -DNOCOPYPROTECT \ -funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -DNOCOPYPROTECT \
-I$(INC:/=) -I$(EINC:/=) -I$(SRC)jmact -I$(SRC)jaudiolib -I../jfaud/inc -I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(SRC)/jaudiolib -I../jfaud/inc
OURCXXFLAGS=-fno-exceptions -fno-rtti OURCXXFLAGS=-fno-exceptions -fno-rtti
LIBS=-lm LIBS=-lm
ifneq (0,$(JFAUD)) ifneq (0,$(JFAUD))
@ -48,68 +48,68 @@ endif
NASMFLAGS=-s #-g NASMFLAGS=-s #-g
EXESUFFIX= EXESUFFIX=
include $(EROOT)Makefile.shared include $(EROOT)/Makefile.shared
ifeq ($(PLATFORM),LINUX) ifeq ($(PLATFORM),LINUX)
OBJ=obj.nix/ OBJ=obj.nix
EOBJ=eobj.nix/ EOBJ=eobj.nix
NASMFLAGS+= -f elf NASMFLAGS+= -f elf
else else
OBJ=obj/ OBJ=obj
EOBJ=eobj/ EOBJ=eobj
endif endif
JMACTOBJ=$(OBJ)util_lib.$o \ JMACTOBJ=$(OBJ)/util_lib.$o \
$(OBJ)file_lib.$o \ $(OBJ)/file_lib.$o \
$(OBJ)control.$o \ $(OBJ)/control.$o \
$(OBJ)keyboard.$o \ $(OBJ)/keyboard.$o \
$(OBJ)mouse.$o \ $(OBJ)/mouse.$o \
$(OBJ)mathutil.$o \ $(OBJ)/mathutil.$o \
$(OBJ)scriplib.$o $(OBJ)/scriplib.$o
AUDIOLIB_FX_STUB=$(OBJ)audiolib_fxstub.$o AUDIOLIB_FX_STUB=$(OBJ)/audiolib_fxstub.$o
AUDIOLIB_MUSIC_STUB=$(OBJ)audiolib_musicstub.$o AUDIOLIB_MUSIC_STUB=$(OBJ)/audiolib_musicstub.$o
AUDIOLIB_JFAUD=$(OBJ)jfaud_sounds.$o AUDIOLIB_JFAUD=$(OBJ)/jfaud_sounds.$o
AUDIOLIB_FX=$(OBJ)mv_mix.$o \ AUDIOLIB_FX=$(OBJ)/mv_mix.$o \
$(OBJ)mv_mix16.$o \ $(OBJ)/mv_mix16.$o \
$(OBJ)mvreverb.$o \ $(OBJ)/mvreverb.$o \
$(OBJ)pitch.$o \ $(OBJ)/pitch.$o \
$(OBJ)multivoc.$o \ $(OBJ)/multivoc.$o \
$(OBJ)ll_man.$o \ $(OBJ)/ll_man.$o \
$(OBJ)fx_man.$o \ $(OBJ)/fx_man.$o \
$(OBJ)dsoundout.$o $(OBJ)/dsoundout.$o
AUDIOLIB_MUSIC=$(OBJ)midi.$o \ AUDIOLIB_MUSIC=$(OBJ)/midi.$o \
$(OBJ)mpu401.$o \ $(OBJ)/mpu401.$o \
$(OBJ)music.$o $(OBJ)/music.$o
GAMEOBJS=$(OBJ)game.$o \ GAMEOBJS=$(OBJ)/game.$o \
$(OBJ)actors.$o \ $(OBJ)/actors.$o \
$(OBJ)anim.$o \ $(OBJ)/anim.$o \
$(OBJ)animlib.$o \ $(OBJ)/animlib.$o \
$(OBJ)config.$o \ $(OBJ)/config.$o \
$(OBJ)gamedef.$o \ $(OBJ)/gamedef.$o \
$(OBJ)gameexec.$o \ $(OBJ)/gameexec.$o \
$(OBJ)global.$o \ $(OBJ)/global.$o \
$(OBJ)menus.$o \ $(OBJ)/menus.$o \
$(OBJ)namesdyn.$o \ $(OBJ)/namesdyn.$o \
$(OBJ)player.$o \ $(OBJ)/player.$o \
$(OBJ)premap.$o \ $(OBJ)/premap.$o \
$(OBJ)savegame.$o \ $(OBJ)/savegame.$o \
$(OBJ)sector.$o \ $(OBJ)/sector.$o \
$(OBJ)rts.$o \ $(OBJ)/rts.$o \
$(OBJ)testcd.$o \ $(OBJ)/testcd.$o \
$(OBJ)osdfuncs.$o \ $(OBJ)/osdfuncs.$o \
$(OBJ)osdcmds.$o \ $(OBJ)/osdcmds.$o \
$(OBJ)grpscan.$o \ $(OBJ)/grpscan.$o \
$(JMACTOBJ) $(JMACTOBJ)
EDITOROBJS=$(OBJ)astub.$o EDITOROBJS=$(OBJ)/astub.$o
ifeq ($(PLATFORM),WINDOWS) ifeq ($(PLATFORM),WINDOWS)
OURCFLAGS+= -DUNDERSCORES -I$(DXROOT)/include OURCFLAGS+= -DUNDERSCORES -I$(DXROOT)/include
NASMFLAGS+= -DUNDERSCORES -f win32 NASMFLAGS+= -DUNDERSCORES -f win32
GAMEOBJS+= $(OBJ)gameres.$o $(OBJ)winbits.$o $(OBJ)startwin.game.$o GAMEOBJS+= $(OBJ)/gameres.$o $(OBJ)/winbits.$o $(OBJ)/startwin.game.$o
EDITOROBJS+= $(OBJ)buildres.$o EDITOROBJS+= $(OBJ)/buildres.$o
endif endif
ifeq ($(RENDERTYPE),SDL) ifeq ($(RENDERTYPE),SDL)
@ -118,24 +118,24 @@ ifeq ($(RENDERTYPE),SDL)
ifneq (0,$(JFAUD)) ifneq (0,$(JFAUD))
AUDIOLIBOBJ=$(AUDIOLIB_JFAUD) AUDIOLIBOBJ=$(AUDIOLIB_JFAUD)
else else
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC_STUB) $(AUDIOLIB_FX_STUB) $(OBJ)sounds.$o AUDIOLIBOBJ=$(AUDIOLIB_MUSIC_STUB) $(AUDIOLIB_FX_STUB) $(OBJ)/sounds.$o
endif endif
ifeq (1,$(HAVE_GTK2)) ifeq (1,$(HAVE_GTK2))
OURCFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0) OURCFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
GAMEOBJS+= $(OBJ)game_banner.$o $(OBJ)startgtk.game.$o GAMEOBJS+= $(OBJ)/game_banner.$o $(OBJ)/startgtk.game.$o
EDITOROBJS+= $(OBJ)editor_banner.$o EDITOROBJS+= $(OBJ)/editor_banner.$o
endif endif
GAMEOBJS+= $(OBJ)game_icon.$o GAMEOBJS+= $(OBJ)/game_icon.$o
EDITOROBJS+= $(OBJ)build_icon.$o EDITOROBJS+= $(OBJ)/build_icon.$o
endif endif
ifeq ($(RENDERTYPE),WIN) ifeq ($(RENDERTYPE),WIN)
ifneq (0,$(JFAUD)) ifneq (0,$(JFAUD))
AUDIOLIBOBJ=$(AUDIOLIB_JFAUD) AUDIOLIBOBJ=$(AUDIOLIB_JFAUD)
else else
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)sounds.$o AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)/sounds.$o
endif endif
endif endif
@ -143,7 +143,7 @@ GAMEOBJS+= $(AUDIOLIBOBJ)
OURCFLAGS+= $(BUILDCFLAGS) OURCFLAGS+= $(BUILDCFLAGS)
OURCXXFLAGS+= $(BUILDCFLAGS) OURCXXFLAGS+= $(BUILDCFLAGS)
.PHONY: clean all engine $(EOBJ)$(ENGINELIB) $(EOBJ)$(EDITORLIB) .PHONY: clean all engine $(EOBJ)/$(ENGINELIB) $(EOBJ)/$(EDITORLIB)
# TARGETS # TARGETS
@ -165,19 +165,19 @@ else
all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
endif endif
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)$(ENGINELIB) eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)/$(ENGINELIB)
$(CC) -o $@ $^ $(JFAUDLIBS) $(LIBS) $(STDCPPLIB) -Wl,-Map=$@.map $(CC) -o $@ $^ $(JFAUDLIBS) $(LIBS) $(STDCPPLIB) -Wl,-Map=$@.map
-rm eduke32.sym$(EXESUFFIX) -rm eduke32.sym$(EXESUFFIX)
cp eduke32$(EXESUFFIX) eduke32.sym$(EXESUFFIX) cp eduke32$(EXESUFFIX) eduke32.sym$(EXESUFFIX)
strip eduke32$(EXESUFFIX) strip eduke32$(EXESUFFIX)
mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)$(EDITORLIB) $(EOBJ)$(ENGINELIB) mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)/$(EDITORLIB) $(EOBJ)/$(ENGINELIB)
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) -Wl,-Map=$@.map $(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) -Wl,-Map=$@.map
-rm mapster32.sym$(EXESUFFIX) -rm mapster32.sym$(EXESUFFIX)
cp mapster32$(EXESUFFIX) mapster32.sym$(EXESUFFIX) cp mapster32$(EXESUFFIX) mapster32.sym$(EXESUFFIX)
strip mapster32$(EXESUFFIX) strip mapster32$(EXESUFFIX)
duke3d_w32$(EXESUFFIX): $(OBJ)wrapper.$o duke3d_w32$(EXESUFFIX): $(OBJ)/wrapper.$o
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ -Wl $(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ -Wl
strip duke3d_w32$(EXESUFFIX) strip duke3d_w32$(EXESUFFIX)
@ -186,49 +186,49 @@ include Makefile.deps
.PHONY: enginelib editorlib .PHONY: enginelib editorlib
enginelib editorlib: enginelib editorlib:
-mkdir $(EOBJ) -mkdir $(EOBJ)
$(MAKE) -C $(EROOT) "OBJ=$(CURDIR)/$(EOBJ)" \ $(MAKE) -C $(EROOT)/ "OBJ=$(CURDIR)/$(EOBJ)" \
SUPERBUILD=$(SUPERBUILD) POLYMOST=$(POLYMOST) \ SUPERBUILD=$(SUPERBUILD) POLYMOST=$(POLYMOST) \
USE_OPENGL=$(USE_OPENGL) USE_A_C=$(USE_A_C) \ USE_OPENGL=$(USE_OPENGL) USE_A_C=$(USE_A_C) \
NOASM=$(NOASM) RELEASE=$(RELEASE) $@ NOASM=$(NOASM) RELEASE=$(RELEASE) $@
$(EOBJ)$(ENGINELIB): enginelib $(EOBJ)/$(ENGINELIB): enginelib
$(EOBJ)$(EDITORLIB): editorlib $(EOBJ)/$(EDITORLIB): editorlib
# RULES # RULES
$(OBJ)%.$o: $(SRC)%.nasm $(OBJ)/%.$o: $(SRC)/%.nasm
nasm $(NASMFLAGS) $< -o $@ nasm $(NASMFLAGS) $< -o $@
$(OBJ)%.$o: $(SRC)jaudiolib/%.nasm $(OBJ)/%.$o: $(SRC)/jaudiolib/%.nasm
nasm $(NASMFLAGS) $< -o $@ nasm $(NASMFLAGS) $< -o $@
$(OBJ)%.$o: $(SRC)%.c $(OBJ)/%.$o: $(SRC)/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1 $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
$(OBJ)%.$o: $(SRC)%.cpp $(OBJ)/%.$o: $(SRC)/%.cpp
$(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1 $(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
$(OBJ)%.$o: $(SRC)jmact/%.c $(OBJ)/%.$o: $(SRC)/jmact/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1 $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
$(OBJ)%.$o: $(SRC)jaudiolib/%.c $(OBJ)/%.$o: $(SRC)/jaudiolib/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1 $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
ifeq (1,$(JFAUD)) ifeq (1,$(JFAUD))
$(OBJ)%.$o: $(SRC)misc/%.rc $(OBJ)/%.$o: $(SRC)/misc/%.rc
windres -i $< -o $@ --include-dir=$(EINC). --include-dir=$(SRC). -DJFAUD windres -i $< -o $@ --include-dir=$(EINC) --include-dir=$(SRC) -DJFAUD
else else
$(OBJ)%.$o: $(SRC)misc/%.rc $(OBJ)/%.$o: $(SRC)/misc/%.rc
windres -i $< -o $@ --include-dir=$(EINC). --include-dir=$(SRC). windres -i $< -o $@ --include-dir=$(EINC) --include-dir=$(SRC)
endif endif
$(OBJ)%.$o: $(SRC)util/%.c $(OBJ)/%.$o: $(SRC)/util/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1 $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
$(OBJ)%.$o: $(RSRC)%.c $(OBJ)/%.$o: $(RSRC)/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1 $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
$(OBJ)game_banner.$o: $(RSRC)game_banner.c $(OBJ)/game_banner.$o: $(RSRC)/game_banner.c
$(OBJ)editor_banner.$o: $(RSRC)editor_banner.c $(OBJ)/editor_banner.$o: $(RSRC)/editor_banner.c
$(RSRC)game_banner.c: $(RSRC)game.bmp $(RSRC)/game_banner.c: $(RSRC)/game.bmp
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@ echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@ gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
$(RSRC)editor_banner.c: $(RSRC)build.bmp $(RSRC)/editor_banner.c: $(RSRC)/build.bmp
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@ echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@ gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
@ -237,11 +237,11 @@ clean:
ifeq ($(PLATFORM),DARWIN) ifeq ($(PLATFORM),DARWIN)
cd osx && xcodebuild -target All clean cd osx && xcodebuild -target All clean
else else
-rm -f $(OBJ)* eduke32$(EXESUFFIX) eduke32.sym$(EXESUFFIX) mapster32$(EXESUFFIX) mapster32.sym$(EXESUFFIX) core* duke3d_w32$(EXESUFFIX) -rm -f $(OBJ)/* eduke32$(EXESUFFIX) eduke32.sym$(EXESUFFIX) mapster32$(EXESUFFIX) mapster32.sym$(EXESUFFIX) core* duke3d_w32$(EXESUFFIX)
endif endif
veryclean: clean veryclean: clean
ifeq ($(PLATFORM),DARWIN) ifeq ($(PLATFORM),DARWIN)
else else
-rm -f $(EOBJ)* -rm -f $(EOBJ)/*
endif endif

View file

@ -1,64 +1,64 @@
duke3d_h=$(EINC)build.h $(EINC)pragmas.h $(EINC)compat.h $(EINC)cache1d.h $(EINC)baselayer.h $(SRC)jmact/types.h $(SRC)jmact/file_lib.h $(SRC)jmact/util_lib.h $(SRC)jmact/keyboard.h $(SRC)jmact/control.h $(INC)develop.h $(INC)gamedefs.h $(INC)function.h $(INC)config.h $(INC)sounds.h $(INC)rts.h $(INC)_rts.h $(INC)soundefs.h $(SRC)jaudiolib/fx_man.h $(SRC)jaudiolib/music.h $(INC)namesdyn.h $(INC)funct.h $(INC)duke3d.h $(EINC)mmulti.h duke3d_h=$(EINC)/build.h $(EINC)/pragmas.h $(EINC)/compat.h $(EINC)/cache1d.h $(EINC)/baselayer.h $(SRC)/jmact/types.h $(SRC)/jmact/file_lib.h $(SRC)/jmact/util_lib.h $(SRC)/jmact/keyboard.h $(SRC)/jmact/control.h $(INC)/develop.h $(INC)/gamedefs.h $(INC)/function.h $(INC)/config.h $(INC)/sounds.h $(INC)/rts.h $(INC)/_rts.h $(INC)/soundefs.h $(SRC)/jaudiolib/fx_man.h $(SRC)/jaudiolib/music.h $(INC)/namesdyn.h $(INC)/funct.h $(INC)/duke3d.h $(EINC)/mmulti.h
gamedef_h=$(SRC)gamedef.h gamedef_h=$(SRC)/gamedef.h
$(OBJ)game.$o: $(SRC)*.c $(SRC)jmact/scriplib.h $(duke3d_h) $(INC)osdfuncs.h $(INC)osdcmds.h $(INC)grpscan.h $(OBJ)/game.$o: $(SRC)/*.c $(SRC)/jmact/scriplib.h $(duke3d_h) $(INC)/osdfuncs.h $(INC)/osdcmds.h $(INC)/grpscan.h
$(OBJ)actors.$o: $(SRC)actors.c $(duke3d_h) $(OBJ)/actors.$o: $(SRC)/actors.c $(duke3d_h)
$(OBJ)anim.$o: $(SRC)anim.c $(duke3d_h) $(SRC)jmact/animlib.h $(OBJ)/anim.$o: $(SRC)/anim.c $(duke3d_h) $(SRC)/jmact/animlib.h
$(OBJ)gamedef.$o: $(SRC)gamedef.c $(duke3d_h) $(gamedef_h) $(OBJ)/gamedef.$o: $(SRC)/gamedef.c $(duke3d_h) $(gamedef_h)
$(OBJ)gameexec.$o: $(SRC)gameexec.c $(duke3d_h) $(gamedef_h) $(OBJ)/gameexec.$o: $(SRC)/gameexec.c $(duke3d_h) $(gamedef_h)
$(OBJ)global.$o: $(SRC)global.c $(duke3d_h) $(OBJ)/global.$o: $(SRC)/global.c $(duke3d_h)
$(OBJ)menus.$o: $(SRC)menus.c $(duke3d_h) $(SRC)jmact/mouse.h $(OBJ)/menus.$o: $(SRC)/menus.c $(duke3d_h) $(SRC)/jmact/mouse.h
$(OBJ)namesdyn.$o: $(SRC)namesdyn.c $(duke3d_h) $(OBJ)/namesdyn.$o: $(SRC)/namesdyn.c $(duke3d_h)
$(OBJ)player.$o: $(SRC)player.c $(duke3d_h) $(OBJ)/player.$o: $(SRC)/player.c $(duke3d_h)
$(OBJ)premap.$o: $(SRC)premap.c $(duke3d_h) $(EINC)osd.h $(OBJ)/premap.$o: $(SRC)/premap.c $(duke3d_h) $(EINC)/osd.h
$(OBJ)savegame.$o: $(SRC)savegame.c $(duke3d_h) $(OBJ)/savegame.$o: $(SRC)/savegame.c $(duke3d_h)
$(OBJ)sector.$o: $(SRC)sector.c $(duke3d_h) $(OBJ)/sector.$o: $(SRC)/sector.c $(duke3d_h)
$(OBJ)sounds.$o: $(SRC)sounds.c $(duke3d_h) $(OBJ)/sounds.$o: $(SRC)/sounds.c $(duke3d_h)
$(OBJ)jfaud_sounds.$o: $(SRC)jfaud_sounds.cpp $(duke3d_h) $(EINC)osd.h $(OBJ)/jfaud_sounds.$o: $(SRC)/jfaud_sounds.cpp $(duke3d_h) $(EINC)/osd.h
$(OBJ)rts.$o: $(SRC)rts.c $(duke3d_h) $(OBJ)/rts.$o: $(SRC)/rts.c $(duke3d_h)
$(OBJ)config.$o: $(SRC)config.c $(duke3d_h) $(SRC)jmact/scriplib.h $(INC)_functio.h $(OBJ)/config.$o: $(SRC)/config.c $(duke3d_h) $(SRC)/jmact/scriplib.h $(INC)/_functio.h
$(OBJ)testcd.$o: $(SRC)testcd.c $(OBJ)/testcd.$o: $(SRC)/testcd.c
$(OBJ)winbits.$o: $(SRC)winbits.c $(OBJ)/winbits.$o: $(SRC)/winbits.c
$(OBJ)osdfuncs.$o: $(SRC)names.h $(EINC)build.h $(OBJ)/osdfuncs.$o: $(SRC)/names.h $(EINC)/build.h
$(OBJ)osdcmds.$o: $(SRC)osdcmds.c $(INC)osdcmds.h $(EINC)osd.h $(duke3d_h) $(OBJ)/osdcmds.$o: $(SRC)/osdcmds.c $(INC)/osdcmds.h $(EINC)/osd.h $(duke3d_h)
$(OBJ)astub.$o: $(SRC)astub.c $(EINC)build.h $(EINC)pragmas.h $(EINC)compat.h $(EINC)editor.h $(OBJ)/astub.$o: $(SRC)/astub.c $(EINC)/build.h $(EINC)/pragmas.h $(EINC)/compat.h $(EINC)/editor.h
$(OBJ)game_icon.$o: $(RSRC)game_icon.c $(OBJ)/game_icon.$o: $(RSRC)/game_icon.c
$(OBJ)build_icon.$o: $(RSRC)build_icon.c $(OBJ)/build_icon.$o: $(RSRC)/build_icon.c
$(OBJ)grpscan.$o: $(SRC)grpscan.c $(EINC)compat.h $(EINC)baselayer.h $(EINC)scriptfile.h $(EINC)cache1d.h $(EINC)crc32.h $(INC)grpscan.h $(OBJ)/grpscan.$o: $(SRC)/grpscan.c $(EINC)/compat.h $(EINC)/baselayer.h $(EINC)/scriptfile.h $(EINC)/cache1d.h $(EINC)/crc32.h $(INC)/grpscan.h
$(OBJ)gameres.$o: $(SRC)misc/gameres.rc $(SRC)startwin.game.h $(RSRC)game.bmp $(RSRC)game_icon.ico $(OBJ)/gameres.$o: $(SRC)/misc/gameres.rc $(SRC)/startwin.game.h $(RSRC)/game.bmp $(RSRC)/game_icon.ico
$(OBJ)buildres.$o: $(SRC)misc/buildres.rc $(EINC)startwin.editor.h $(RSRC)build.bmp $(RSRC)build_icon.ico $(OBJ)/buildres.$o: $(SRC)/misc/buildres.rc $(EINC)/startwin.editor.h $(RSRC)/build.bmp $(RSRC)/build_icon.ico
$(OBJ)startwin.game.$o: $(SRC)startwin.game.c $(duke3d_h) $(EINC)build.h $(EINC)winlayer.h $(EINC)compat.h $(INC)grpscan.h $(OBJ)/startwin.game.$o: $(SRC)/startwin.game.c $(duke3d_h) $(EINC)/build.h $(EINC)/winlayer.h $(EINC)/compat.h $(INC)/grpscan.h
$(OBJ)startgtk.game.$o: $(SRC)startgtk.game.c $(duke3d_h) $(EINC)dynamicgtk.h $(EINC)build.h $(EINC)baselayer.h $(EINC)compat.h $(OBJ)/startgtk.game.$o: $(SRC)/startgtk.game.c $(duke3d_h) $(EINC)/dynamicgtk.h $(EINC)/build.h $(EINC)/baselayer.h $(EINC)/compat.h
# jMACT objects # jMACT objects
$(OBJ)animlib.$o: $(SRC)jmact/animlib.c $(SRC)jmact/types.h $(INC)develop.h $(SRC)jmact/util_lib.h $(SRC)jmact/animlib.h $(EINC)compat.h $(OBJ)/animlib.$o: $(SRC)/jmact/animlib.c $(SRC)/jmact/types.h $(INC)/develop.h $(SRC)/jmact/util_lib.h $(SRC)/jmact/animlib.h $(EINC)/compat.h
$(OBJ)util_lib.$o: $(SRC)jmact/util_lib.c $(SRC)jmact/util_lib.h $(SRC)jmact/types.h $(EINC)compat.h $(OBJ)/util_lib.$o: $(SRC)/jmact/util_lib.c $(SRC)/jmact/util_lib.h $(SRC)/jmact/types.h $(EINC)/compat.h
$(OBJ)file_lib.$o: $(SRC)jmact/file_lib.c $(SRC)jmact/file_lib.h $(SRC)jmact/types.h $(OBJ)/file_lib.$o: $(SRC)/jmact/file_lib.c $(SRC)/jmact/file_lib.h $(SRC)/jmact/types.h
$(OBJ)control.$o: $(SRC)jmact/control.c $(SRC)jmact/types.h $(SRC)jmact/control.h $(SRC)jmact/keyboard.h $(SRC)jmact/mouse.h $(EINC)baselayer.h $(OBJ)/control.$o: $(SRC)/jmact/control.c $(SRC)/jmact/types.h $(SRC)/jmact/control.h $(SRC)/jmact/keyboard.h $(SRC)/jmact/mouse.h $(EINC)/baselayer.h
$(OBJ)keyboard.$o: $(SRC)jmact/keyboard.c $(SRC)jmact/types.h $(SRC)jmact/keyboard.h $(EINC)compat.h $(EINC)baselayer.h $(OBJ)/keyboard.$o: $(SRC)/jmact/keyboard.c $(SRC)/jmact/types.h $(SRC)/jmact/keyboard.h $(EINC)/compat.h $(EINC)/baselayer.h
$(OBJ)mouse.$o: $(SRC)jmact/mouse.c $(SRC)jmact/types.h $(SRC)jmact/mouse.h $(EINC)baselayer.h $(OBJ)/mouse.$o: $(SRC)/jmact/mouse.c $(SRC)/jmact/types.h $(SRC)/jmact/mouse.h $(EINC)/baselayer.h
$(OBJ)mathutil.$o: $(SRC)jmact/mathutil.c $(SRC)jmact/types.h $(OBJ)/mathutil.$o: $(SRC)/jmact/mathutil.c $(SRC)/jmact/types.h
$(OBJ)scriplib.$o: $(SRC)jmact/scriplib.c $(SRC)jmact/scriplib.h $(SRC)jmact/util_lib.h $(SRC)jmact/_scrplib.h $(SRC)jmact/types.h $(EINC)compat.h $(OBJ)/scriplib.$o: $(SRC)/jmact/scriplib.c $(SRC)/jmact/scriplib.h $(SRC)/jmact/util_lib.h $(SRC)/jmact/_scrplib.h $(SRC)/jmact/types.h $(EINC)/compat.h
# jAudioLib objects # jAudioLib objects
$(OBJ)audiolib_fxstub.$o: $(SRC)jaudiolib/audiolib_fxstub.c $(SRC)jaudiolib/fx_man.h $(OBJ)/audiolib_fxstub.$o: $(SRC)/jaudiolib/audiolib_fxstub.c $(SRC)/jaudiolib/fx_man.h
$(OBJ)audiolib_musicstub.$o: $(SRC)jaudiolib/audiolib_musicstub.c $(SRC)jaudiolib/music.h $(OBJ)/audiolib_musicstub.$o: $(SRC)/jaudiolib/audiolib_musicstub.c $(SRC)/jaudiolib/music.h
$(OBJ)audiolib_fx_fmod.$o: $(SRC)jaudiolib/audiolib_fx_fmod.c $(SRC)jaudiolib/fx_man_fmod.h $(INC)duke3d.h $(OBJ)/audiolib_fx_fmod.$o: $(SRC)/jaudiolib/audiolib_fx_fmod.c $(SRC)/jaudiolib/fx_man_fmod.h $(INC)/duke3d.h
$(OBJ)mv_mix.$o: $(SRC)jaudiolib/mv_mix.nasm $(OBJ)/mv_mix.$o: $(SRC)/jaudiolib/mv_mix.nasm
$(OBJ)mv_mix16.$o: $(SRC)jaudiolib/mv_mix16.nasm $(OBJ)/mv_mix16.$o: $(SRC)/jaudiolib/mv_mix16.nasm
$(OBJ)mvreverb.$o: $(SRC)jaudiolib/mvreverb.nasm $(OBJ)/mvreverb.$o: $(SRC)/jaudiolib/mvreverb.nasm
$(OBJ)pitch.$o: $(SRC)jaudiolib/pitch.c $(SRC)jaudiolib/pitch.h $(OBJ)/pitch.$o: $(SRC)/jaudiolib/pitch.c $(SRC)/jaudiolib/pitch.h
$(OBJ)multivoc.$o: $(SRC)jaudiolib/multivoc.c $(SRC)jaudiolib/usrhooks.h $(SRC)jaudiolib/linklist.h $(SRC)jaudiolib/pitch.h $(SRC)jaudiolib/multivoc.h $(SRC)jaudiolib/_multivc.h $(OBJ)/multivoc.$o: $(SRC)/jaudiolib/multivoc.c $(SRC)/jaudiolib/usrhooks.h $(SRC)/jaudiolib/linklist.h $(SRC)/jaudiolib/pitch.h $(SRC)/jaudiolib/multivoc.h $(SRC)/jaudiolib/_multivc.h
$(OBJ)fx_man.$o: $(SRC)jaudiolib/fx_man.c $(SRC)jaudiolib/multivoc.h $(SRC)jaudiolib/ll_man.h $(SRC)jaudiolib/fx_man.h $(OBJ)/fx_man.$o: $(SRC)/jaudiolib/fx_man.c $(SRC)/jaudiolib/multivoc.h $(SRC)/jaudiolib/ll_man.h $(SRC)/jaudiolib/fx_man.h
$(OBJ)dsoundout.$o: $(SRC)jaudiolib/dsoundout.c $(SRC)jaudiolib/dsoundout.h $(OBJ)/dsoundout.$o: $(SRC)/jaudiolib/dsoundout.c $(SRC)/jaudiolib/dsoundout.h
$(OBJ)midi.$o: $(SRC)jaudiolib/midi.c $(SRC)jaudiolib/standard.h $(SRC)jaudiolib/usrhooks.h $(SRC)jaudiolib/music.h $(SRC)jaudiolib/_midi.h $(SRC)jaudiolib/midi.h $(OBJ)/midi.$o: $(SRC)/jaudiolib/midi.c $(SRC)/jaudiolib/standard.h $(SRC)/jaudiolib/usrhooks.h $(SRC)/jaudiolib/music.h $(SRC)/jaudiolib/_midi.h $(SRC)/jaudiolib/midi.h
$(OBJ)mpu401.$o: $(SRC)jaudiolib/mpu401.c $(SRC)jaudiolib/mpu401.h $(OBJ)/mpu401.$o: $(SRC)/jaudiolib/mpu401.c $(SRC)/jaudiolib/mpu401.h
$(OBJ)music.$o: $(SRC)jaudiolib/music.c $(SRC)jaudiolib/music.h $(SRC)jaudiolib/midi.h $(SRC)jaudiolib/mpu401.h $(OBJ)/music.$o: $(SRC)/jaudiolib/music.c $(SRC)/jaudiolib/music.h $(SRC)/jaudiolib/midi.h $(SRC)/jaudiolib/mpu401.h

View file

@ -1,10 +1,10 @@
# EDuke32 Makefile for Watcom Make # EDuke32 Makefile for Watcom Make
SRC=source\ # SRC=source
OBJ=obj\ # OBJ=obj
EROOT=..\build\ # EROOT=..\build
EINC=$(EROOT)include\ # EINC=$(EROOT)\include
EOBJ=eobj\ # EOBJ=eobj
INC=$(SRC) INC=$(SRC)
o=obj o=obj
@ -30,7 +30,7 @@ CC=cl
AS=ml AS=ml
LINK=link /opt:nowin98 /nologo /opt:ref LINK=link /opt:nowin98 /nologo /opt:ref
CFLAGS= /MD /J /nologo $(flags_cl) \ CFLAGS= /MD /J /nologo $(flags_cl) \
/I$(INC) /I$(EINC) /I$(SRC)jmact /I$(SRC)jaudiolib /I..\jfaud\inc \ /I$(INC) /I$(EINC)\ /I$(SRC)\jmact /I$(SRC)\jaudiolib /I..\jfaud\inc \
/DNOCOPYPROTECT $(ENGINEOPTS) \ /DNOCOPYPROTECT $(ENGINEOPTS) \
/I$(DXROOT)\include /DRENDERTYPEWIN=1 /I$(DXROOT)\include /DRENDERTYPEWIN=1
LIBS=user32.lib gdi32.lib shell32.lib dxguid.lib winmm.lib wsock32.lib comctl32.lib \ LIBS=user32.lib gdi32.lib shell32.lib dxguid.lib winmm.lib wsock32.lib comctl32.lib \
@ -40,115 +40,115 @@ LIBS=user32.lib gdi32.lib shell32.lib dxguid.lib winmm.lib wsock32.lib comctl32.
ASFLAGS=/nologo /coff ASFLAGS=/nologo /coff
EXESUFFIX=.exe EXESUFFIX=.exe
JMACTOBJ=$(OBJ)util_lib.$o \ JMACTOBJ=$(OBJ)\util_lib.$o \
$(OBJ)file_lib.$o \ $(OBJ)\file_lib.$o \
$(OBJ)control.$o \ $(OBJ)\control.$o \
$(OBJ)keyboard.$o \ $(OBJ)\keyboard.$o \
$(OBJ)mouse.$o \ $(OBJ)\mouse.$o \
$(OBJ)mathutil.$o \ $(OBJ)\mathutil.$o \
$(OBJ)scriplib.$o $(OBJ)\scriplib.$o
#AUDIOLIB_FX=$(OBJ)jaudiolib_fxstub.$o #AUDIOLIB_FX=$(OBJ)\jaudiolib_fxstub.$o
#AUDIOLIB_MUSIC=$(OBJ)jaudiolib_musicstub.$o #AUDIOLIB_MUSIC=$(OBJ)\jaudiolib_musicstub.$o
#AUDIOLIB_FX=$(OBJ)jaudiolib_fx_fmod.$o #AUDIOLIB_FX=$(OBJ)\jaudiolib_fx_fmod.$o
AUDIOLIB_JFAUD=$(OBJ)jfaud_sounds.$o AUDIOLIB_JFAUD=$(OBJ)\jfaud_sounds.$o
AUDIOLIB_FX=$(OBJ)mv_mix.$o \ AUDIOLIB_FX=$(OBJ)\mv_mix.$o \
$(OBJ)mv_mix16.$o \ $(OBJ)\mv_mix16.$o \
$(OBJ)mvreverb.$o \ $(OBJ)\mvreverb.$o \
$(OBJ)pitch.$o \ $(OBJ)\pitch.$o \
$(OBJ)multivoc.$o \ $(OBJ)\multivoc.$o \
$(OBJ)ll_man.$o \ $(OBJ)\ll_man.$o \
$(OBJ)fx_man.$o \ $(OBJ)\fx_man.$o \
$(OBJ)dsoundout.$o $(OBJ)\dsoundout.$o
AUDIOLIB_MUSIC=$(OBJ)midi.$o \ AUDIOLIB_MUSIC=$(OBJ)\midi.$o \
$(OBJ)mpu401.$o \ $(OBJ)\mpu401.$o \
$(OBJ)music.$o $(OBJ)\music.$o
#AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)sounds.$o #AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)\sounds.$o
AUDIOLIBOBJ=$(AUDIOLIB_JFAUD) AUDIOLIBOBJ=$(AUDIOLIB_JFAUD)
GAMEOBJS=$(OBJ)game.$o \ GAMEOBJS=$(OBJ)\game.$o \
$(OBJ)actors.$o \ $(OBJ)\actors.$o \
$(OBJ)anim.$o \ $(OBJ)\anim.$o \
$(OBJ)gamedef.$o \ $(OBJ)\gamedef.$o \
$(OBJ)gameexec.$o \ $(OBJ)\gameexec.$o \
$(OBJ)global.$o \ $(OBJ)\global.$o \
$(OBJ)menus.$o \ $(OBJ)\menus.$o \
$(OBJ)namesdyn.$o \ $(OBJ)\namesdyn.$o \
$(OBJ)player.$o \ $(OBJ)\player.$o \
$(OBJ)premap.$o \ $(OBJ)\premap.$o \
$(OBJ)savegame.$o \ $(OBJ)\savegame.$o \
$(OBJ)sector.$o \ $(OBJ)\sector.$o \
$(OBJ)rts.$o \ $(OBJ)\rts.$o \
$(OBJ)config.$o \ $(OBJ)\config.$o \
$(OBJ)animlib.$o\ $(OBJ)\animlib.$o\
$(OBJ)testcd.$o \ $(OBJ)\testcd.$o \
$(OBJ)osdfuncs.$o \ $(OBJ)\osdfuncs.$o \
$(OBJ)osdcmds.$o \ $(OBJ)\osdcmds.$o \
$(OBJ)grpscan.$o \ $(OBJ)\grpscan.$o \
$(OBJ)winbits.$o \ $(OBJ)\winbits.$o \
$(OBJ)gameres.res \ $(OBJ)\gameres.res \
$(OBJ)startwin.game.$o \ $(OBJ)\startwin.game.$o \
$(JMACTOBJ) \ $(JMACTOBJ) \
$(AUDIOLIBOBJ) $(AUDIOLIBOBJ)
EDITOROBJS=$(OBJ)astub.$o \ EDITOROBJS=$(OBJ)\astub.$o \
$(OBJ)buildres.res $(OBJ)\buildres.res
# RULES # RULES
.SUFFIXES: .masm .SUFFIXES: .masm
{$(SRC)}.masm{$(OBJ)}.$o: {$(SRC)\}.masm{$(OBJ)\}.$o:
$(AS) /c $(ASFLAGS) /Fo$@ $< $(AS) /c $(ASFLAGS) /Fo$@ $<
{$(SRC)jaudiolib}.masm{$(OBJ)}.$o: {$(SRC)\jaudiolib}.masm{$(OBJ)\}.$o:
$(AS) /c $(ASFLAGS) /Fo$@ $< $(AS) /c $(ASFLAGS) /Fo$@ $<
{$(SRC)jmact}.c{$(OBJ)}.$o: {$(SRC)\jmact}.c{$(OBJ)\}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $< $(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)jaudiolib}.c{$(OBJ)}.$o: {$(SRC)\jaudiolib}.c{$(OBJ)\}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $< $(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)util}.c{$(OBJ)}.$o: {$(SRC)\util}.c{$(OBJ)\}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $< $(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)}.c{$(OBJ)}.$o: {$(SRC)\}.c{$(OBJ)\}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $< $(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)}.cpp{$(OBJ)}.$o: {$(SRC)\}.cpp{$(OBJ)\}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $< $(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)misc}.rc{$(OBJ)}.res: {$(SRC)\misc}.rc{$(OBJ)\}.res:
$(RC) /i$(EINC) /i$(SRC) /fo$@ /r $< $(RC) /i$(EINC)\ /i$(SRC)\ /fo$@ /r $<
# TARGETS # TARGETS
all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) ; all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) ;
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)$(ENGINELIB) eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)\$(ENGINELIB)
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib $(flags_link) /MAP $** $(LIBS) msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib $(flags_link) /MAP $** $(LIBS) msvcrt.lib
mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)$(ENGINELIB) $(EOBJ)$(EDITORLIB) mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)\$(ENGINELIB) $(EOBJ)\$(EDITORLIB)
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib $(flags_link) /MAP $** $(LIBS) msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib $(flags_link) /MAP $** $(LIBS) msvcrt.lib
!include Makefile.deps !include Makefile.deps
enginelib editorlib: AlwaysBuild enginelib editorlib: AlwaysBuild
-mkdir $(EOBJ) -mkdir $(EOBJ)\
echo OBJ=$(MAKEDIR)\$(EOBJ) > $(EOBJ)overrides.mak echo OBJ=$(MAKEDIR)\$(EOBJ)\ > $(EOBJ)\overrides.mak
echo CFLAGS=$(ENGINEOPTS) >> $(EOBJ)overrides.mak echo CFLAGS=$(ENGINEOPTS) >> $(EOBJ)\overrides.mak
cd $(EROOT) cd $(EROOT)\
nmake /f Makefile.msvc "OVERRIDES=$(MAKEDIR)\$(EOBJ)overrides.mak" $@ nmake /f Makefile.msvc "OVERRIDES=$(MAKEDIR)\$(EOBJ)\overrides.mak" $@
cd $(MAKEDIR) cd $(MAKEDIR)
AlwaysBuild: ; AlwaysBuild: ;
$(EOBJ)$(EDITORLIB): editorlib ; $(EOBJ)\$(EDITORLIB): editorlib ;
$(EOBJ)$(ENGINELIB): enginelib ; $(EOBJ)\$(ENGINELIB): enginelib ;
# PHONIES # PHONIES
clean: clean:
-del $(OBJ)* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) -del $(OBJ)\* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
veryclean: clean veryclean: clean
-del $(EOBJ)* -del $(EOBJ)\*

View file

@ -1,10 +1,10 @@
# EDuke32 Makefile for Watcom Make # EDuke32 Makefile for Watcom Make
SRC=source\ SRC=source
OBJ=obj\ OBJ=obj
EROOT=..\build\ EROOT=..\build
EINC=$(EROOT)include\ EINC=$(EROOT)\include
EOBJ=eobj\ EOBJ=eobj
INC=$(SRC) INC=$(SRC)
o=obj o=obj
@ -22,82 +22,82 @@ ENGINEOPTS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL
CC=wcc386 CC=wcc386
CXX=wpp386 CXX=wpp386
CFLAGS= -zq -5r -s -orb -fp5 -d2 -db & CFLAGS= -zq -5r -s -orb -fp5 -d2 -db &
-i=watcomhax -i=$(INC) -i=$(EINC) -i=$(SRC)jmact -i=$(SRC)jaudiolib -i=$(DXROOT)\include & -i=$(INC) -i=$(EINC) -i=$(SRC)\jmact -i=$(SRC)\jaudiolib -i=$(DXROOT)\include &
-dRENDERTYPEWIN=1 -dNOCOPYPROTECT $(ENGINEOPTS) -i=..\jfaud\inc -dRENDERTYPEWIN=1 -dNOCOPYPROTECT $(ENGINEOPTS) -i=..\jfaud\inc
LIBS=wsock32.lib dxguid.lib ..\jfaud\jfaud.lib winmm.lib #opengl32.lib LIBS=wsock32.lib dxguid.lib ..\jfaud\jfaud.lib winmm.lib #opengl32.lib
WASMFLAGS=-d1 WASMFLAGS=-d1
EXESUFFIX=.exe EXESUFFIX=.exe
JMACTOBJ=$(OBJ)util_lib.$o & JMACTOBJ=$(OBJ)\util_lib.$o &
$(OBJ)file_lib.$o & $(OBJ)\file_lib.$o &
$(OBJ)control.$o & $(OBJ)\control.$o &
$(OBJ)keyboard.$o & $(OBJ)\keyboard.$o &
$(OBJ)mouse.$o & $(OBJ)\mouse.$o &
$(OBJ)mathutil.$o & $(OBJ)\mathutil.$o &
$(OBJ)scriplib.$o $(OBJ)\scriplib.$o
JAUDIOLIB_FX_STUB=$(OBJ)jaudiolib_fxstub.$o JAUDIOLIB_FX_STUB=$(OBJ)\jaudiolib_fxstub.$o
JAUDIOLIB_MUSIC_STUB=$(OBJ)jaudiolib_musicstub.$o JAUDIOLIB_MUSIC_STUB=$(OBJ)\jaudiolib_musicstub.$o
JAUDIOLIB_JFAUD=$(OBJ)jfaud_sounds.$o JAUDIOLIB_JFAUD=$(OBJ)\jfaud_sounds.$o
JAUDIOLIB_FX=$(OBJ)mv_mix.$o & JAUDIOLIB_FX=$(OBJ)\mv_mix.$o &
$(OBJ)mv_mix16.$o & $(OBJ)\mv_mix16.$o &
$(OBJ)mvreverb.$o & $(OBJ)\mvreverb.$o &
$(OBJ)pitch.$o & $(OBJ)\pitch.$o &
$(OBJ)multivoc.$o & $(OBJ)\multivoc.$o &
$(OBJ)ll_man.$o & $(OBJ)\ll_man.$o &
$(OBJ)fx_man.$o & $(OBJ)\fx_man.$o &
$(OBJ)dsoundout.$o $(OBJ)\dsoundout.$o
JAUDIOLIB_MUSIC=$(OBJ)midi.$o & JAUDIOLIB_MUSIC=$(OBJ)\midi.$o &
$(OBJ)mpu401.$o & $(OBJ)\mpu401.$o &
$(OBJ)music.$o $(OBJ)\music.$o
#JAUDIOLIBOBJ=$(JAUDIOLIB_MUSIC) $(JAUDIOLIB_FX) $(OBJ)sounds.$o #JAUDIOLIBOBJ=$(JAUDIOLIB_MUSIC) $(JAUDIOLIB_FX) $(OBJ)\sounds.$o
#JAUDIOLIBOBJ=$(JAUDIOLIB_MUSIC_STUB) $(JAUDIOLIB_FX_STUB) $(OBJ)sounds.$o #JAUDIOLIBOBJ=$(JAUDIOLIB_MUSIC_STUB) $(JAUDIOLIB_FX_STUB) $(OBJ)\sounds.$o
JAUDIOLIBOBJ=$(JAUDIOLIB_JFAUD) JAUDIOLIBOBJ=$(JAUDIOLIB_JFAUD)
GAMEOBJS=$(OBJ)game.$o & GAMEOBJS=$(OBJ)\game.$o &
$(OBJ)actors.$o & $(OBJ)\actors.$o &
$(OBJ)anim.$o & $(OBJ)\anim.$o &
$(OBJ)gamedef.$o & $(OBJ)\gamedef.$o &
$(OBJ)gameexec.$o & $(OBJ)\gameexec.$o &
$(OBJ)global.$o & $(OBJ)\global.$o &
$(OBJ)menus.$o & $(OBJ)\menus.$o &
$(OBJ)namesdyn.$o & $(OBJ)\namesdyn.$o &
$(OBJ)player.$o & $(OBJ)\player.$o &
$(OBJ)premap.$o & $(OBJ)\premap.$o &
$(OBJ)savegame.$o & $(OBJ)\savegame.$o &
$(OBJ)sector.$o & $(OBJ)\sector.$o &
$(OBJ)rts.$o & $(OBJ)\rts.$o &
$(OBJ)config.$o & $(OBJ)\config.$o &
$(OBJ)animlib.$o & $(OBJ)\animlib.$o &
$(OBJ)testcd.$o & $(OBJ)\testcd.$o &
$(OBJ)osdfuncs.$o & $(OBJ)\osdfuncs.$o &
$(OBJ)osdcmds.$o & $(OBJ)\osdcmds.$o &
$(OBJ)winbits.$o & $(OBJ)\winbits.$o &
$(OBJ)startwin.game.$o & $(OBJ)\startwin.game.$o &
$(JMACTOBJ) & $(JMACTOBJ) &
$(JAUDIOLIBOBJ) $(JAUDIOLIBOBJ)
EDITOROBJS=$(OBJ)astub.$o EDITOROBJS=$(OBJ)\astub.$o
# RULES # RULES
.EXTENSIONS: .wasm .res .rc .EXTENSIONS: .wasm .res .rc
.wasm: $(SRC) .wasm: $(SRC)\
.wasm: $(SRC)jaudiolib/ .wasm: $(SRC)\jaudiolib
.c: $(SRC) .c: $(SRC)\
.cpp: $(SRC) .cpp: $(SRC)\
.c: $(SRC)jmact/ .c: $(SRC)\jmact
.c: $(SRC)jaudiolib/ .c: $(SRC)\jaudiolib
.c: $(SRC)util/ .c: $(SRC)\util
.rc: $(SRC)misc/ .rc: $(SRC)\misc
.wasm.$o: .wasm.$o:
wasm $(WASMFLAGS) -fo=$(OBJ).$o $[@ wasm $(WASMFLAGS) -fo=$(OBJ)\.$o $[@
.c.$o: .c.$o:
$(CC) $(CFLAGS) -fo=$(OBJ).$o $[@ $(CC) $(CFLAGS) -fo=$(OBJ)\.$o $[@
.cpp.$o: .cpp.$o:
$(CXX) $(CFLAGS) -fo=$(OBJ).$o $[@ $(CXX) $(CFLAGS) -fo=$(OBJ)\.$o $[@
.rc.res: .rc.res:
wrc -i=$(EINC) -i=$(SRC) -fo=$^*.res -r $[@ wrc -i=$(EINC) -i=$(SRC) -fo=$^*.res -r $[@
@ -107,22 +107,22 @@ EDITOROBJS=$(OBJ)astub.$o
all: eduke32$(EXESUFFIX) build$(EXESUFFIX) .SYMBOLIC all: eduke32$(EXESUFFIX) build$(EXESUFFIX) .SYMBOLIC
%null %null
eduke32$(EXESUFFIX): $(GAMEOBJS) $(OBJ)gameres.res $(EOBJ)$(ENGINELIB) eduke32$(EXESUFFIX): $(GAMEOBJS) $(OBJ)\gameres.res $(EOBJ)\$(ENGINELIB)
wlink NAME $@ & wlink NAME $@ &
SYSTEM WIN95 & SYSTEM WIN95 &
DEBUG ALL & DEBUG ALL &
FILE { $(GAMEOBJS) $(ENGINEOBJS) } & FILE { $(GAMEOBJS) $(ENGINEOBJS) } &
RESOURCE $(OBJ)gameres.res & RESOURCE $(OBJ)\gameres.res &
LIBPATH $(DXROOT)\lib & LIBPATH $(DXROOT)\lib &
LIBPATH $(EOBJ) & LIBPATH $(EOBJ) &
LIBRARY { $(ENGINELIB) $(LIBS) } LIBRARY { $(ENGINELIB) $(LIBS) }
mapster32$(EXESUFFIX): $(EDITOROBJS) $(OBJ)buildres.res $(EOBJ)$(ENGINELIB) $(EOBJ)$(EDITORLIB) mapster32$(EXESUFFIX): $(EDITOROBJS) $(OBJ)\buildres.res $(EOBJ)\$(ENGINELIB) $(EOBJ)\$(EDITORLIB)
wlink NAME $@ & wlink NAME $@ &
SYSTEM WIN95 & SYSTEM WIN95 &
DEBUG ALL & DEBUG ALL &
FILE { $(EDITOROBJS) } & FILE { $(EDITOROBJS) } &
RESOURCE $(OBJ)buildres.res & RESOURCE $(OBJ)\buildres.res &
LIBPATH $(DXROOT)\lib & LIBPATH $(DXROOT)\lib &
LIBPATH $(EOBJ) & LIBPATH $(EOBJ) &
LIBRARY { $(LIBS) $(ENGINELIB) $(EDITORLIB) } LIBRARY { $(LIBS) $(ENGINELIB) $(EDITORLIB) }
@ -132,18 +132,18 @@ mapster32$(EXESUFFIX): $(EDITOROBJS) $(OBJ)buildres.res $(EOBJ)$(ENGINELIB) $(EO
cwd=$+ $(%cwd) $- cwd=$+ $(%cwd) $-
enginelib editorlib: .SYMBOLIC enginelib editorlib: .SYMBOLIC
-mkdir $(EOBJ) -mkdir $(EOBJ)
%write $(EOBJ)overrides.mak OBJ=$(cwd)\$(EOBJ) %write $(EOBJ)\overrides.mak OBJ=$(cwd)\$(EOBJ)
%write $(EOBJ)overrides.mak CFLAGS=$(ENGINEOPTS) %write $(EOBJ)\overrides.mak CFLAGS=$(ENGINEOPTS)
cd $(EROOT) cd $(EROOT)
wmake -f Makefile.watcom OVERRIDES=$(cwd)\$(EOBJ)overrides.mak $@ wmake -f Makefile.watcom OVERRIDES=$(cwd)\$(EOBJ)\overrides.mak $@
cd $(cwd) cd $(cwd)
$(EOBJ)$(EDITORLIB): editorlib .SYMBOLIC $(EOBJ)\$(EDITORLIB): editorlib .SYMBOLIC
$(EOBJ)$(ENGINELIB): enginelib .SYMBOLIC $(EOBJ)\$(ENGINELIB): enginelib .SYMBOLIC
# PHONIES # PHONIES
clean: .SYMBOLIC clean: .SYMBOLIC
-del $(OBJ)* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) -del /q $(OBJ)\* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
veryclean: clean .SYMBOLIC veryclean: clean .SYMBOLIC
-del $(EOBJ)* -del /q $(EOBJ)\*

View file

@ -4568,6 +4568,7 @@ SKIPJIBS:
if (tw == CON_ESHOOTVAR || tw == CON_EZSHOOTVAR) if (tw == CON_ESHOOTVAR || tw == CON_EZSHOOTVAR)
SetGameVarID(g_iReturnVarID, lReturn, g_i, g_p); SetGameVarID(g_iReturnVarID, lReturn, g_i, g_p);
} }
hittype[g_i].temp_data[9]=0;
break; break;
} }

View file

@ -55,7 +55,11 @@ typedef uint64 uint64_t;
static JFAudMixerChannel::Filter DefaultFilter = JFAudMixerChannel::FilterNearest; static JFAudMixerChannel::Filter DefaultFilter = JFAudMixerChannel::FilterNearest;
static int osdcmd_setsoundfilter(const osdfuncparm_t *parm); static int osdcmd_setsoundfilter(const osdfuncparm_t *parm);
#include <cmath> #ifdef SCREWED_UP_CPP
# include "watcomhax/cmath"
#else
# include <cmath>
#endif
class KenFile : public JFAudFile { class KenFile : public JFAudFile {
private: private:

View file

@ -1 +0,0 @@
#include <errno.h>

View file

@ -1,2 +0,0 @@
#include <math.h>
#define M_PI 3.14159265358979323846

View file

@ -1 +0,0 @@
#include <stdarg.h>

View file

@ -1 +0,0 @@
#include <stdio.h>

View file

@ -1 +0,0 @@
#include <stdlib.h>

View file

@ -1 +0,0 @@
#include <string.h>

View file

@ -1 +0,0 @@
#include <time.h>