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

View file

@ -1,52 +1,52 @@
# Build Engine dependencies
#
$(OBJ)a-c.$o: $(SRC)a-c.c $(INC)a.h
$(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)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)compat.$o: $(SRC)compat.c $(INC)compat.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)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)glbuild.$o: $(SRC)glbuild.c $(INC)glbuild.h $(INC)baselayer.h
$(OBJ)kplib.$o: $(SRC)kplib.c $(INC)compat.h
$(OBJ)lzf_c.$o: $(SRC)lzf_c.c $(SRC)lzfP.h
$(OBJ)lzf_d.$o: $(SRC)lzf_d.c $(SRC)lzfP.h
$(OBJ)lzwnew.$o: $(SRC)lzwnew.c
$(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.$o: $(SRC)mmulti.c
$(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)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)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)gtkbits.$o: $(SRC)gtkbits.c $(INC)baselayer.h $(INC)build.h $(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)/a-c.$o: $(SRC)/a-c.c $(INC)/a.h
$(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)/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)/compat.$o: $(SRC)/compat.c $(INC)/compat.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)/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)/glbuild.$o: $(SRC)/glbuild.c $(INC)/glbuild.h $(INC)/baselayer.h
$(OBJ)/kplib.$o: $(SRC)/kplib.c $(INC)/compat.h
$(OBJ)/lzf_c.$o: $(SRC)/lzf_c.c $(SRC)/lzfP.h
$(OBJ)/lzf_d.$o: $(SRC)/lzf_d.c $(SRC)/lzfP.h
$(OBJ)/lzwnew.$o: $(SRC)/lzwnew.c
$(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.$o: $(SRC)/mmulti.c
$(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)/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)/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)/gtkbits.$o: $(SRC)/gtkbits.c $(INC)/baselayer.h $(INC)/build.h $(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
# 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)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)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)/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)/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)/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)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)startgtk.editor.$o: $(SRC)startgtk.editor.c $(INC)baselayer.h $(INC)build.h $(INC)editor.h $(INC)compat.h
$(OBJ)/gameres.$(res): $(SRC)/misc/gameres.rc $(GAME)/startwin.game.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)/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)build_icon.$o: $(RSRC)build_icon.c
$(OBJ)/game_icon.$o: $(RSRC)game_icon.c
$(OBJ)/build_icon.$o: $(RSRC)build_icon.c
$(OBJ)kextract.$o: $(SRC)util/kextract.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)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)generateicon.$o: $(SRC)util/generateicon.c
$(OBJ)cacheinfo.$o: $(SRC)util/cacheinfo.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)/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)/wad2map.$o: $(SRC)/util/wad2map.c $(INC)/compat.h $(INC)/pragmas.h
$(OBJ)/generateicon.$o: $(SRC)/util/generateicon.c
$(OBJ)/cacheinfo.$o: $(SRC)/util/cacheinfo.c $(INC)/compat.h

View file

@ -3,10 +3,10 @@
!include $(OVERRIDES)
!endif
SRC=src\ #
GAME=game\ #
SRC=src
GAME=game
!ifndef OBJ
OBJ=obj.msc\ #
OBJ=obj.msc
!endif
INC=include\ #
!ifndef CFLAGS
@ -26,8 +26,8 @@ FMODROOT=c:\sdks\fmodapi374win\api
# /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
# than the assembly version in A.ASM.
# If this is defined, alter the $(OBJ)a.$o in the
# ENGINEOBJS declaration to be $(OBJ)a-c.$o
# If this is defined, alter the $(OBJ)\a.$o in the
# ENGINEOBJS declaration to be $(OBJ)\a-c.$o
# NOASM When defined, uses C instead of Microsoft inline
# assembly for the features in PRAGMAS.H
TARGETOPTS=#/DUSE_A_C #/DNOASM
@ -53,40 +53,40 @@ LIBS=fmodvc.lib #opengl32.lib
ASFLAGS=/nologo /coff
EXESUFFIX=.exe
ENGINEOBJS=$(OBJ)a.$o \
$(OBJ)baselayer.$o \
$(OBJ)cache1d.$o \
$(OBJ)compat.$o \
$(OBJ)crc32.$o \
$(OBJ)defs.$o \
$(OBJ)engine.$o \
$(OBJ)glbuild.$o \
$(OBJ)kplib.$o \
$(OBJ)lzf_c.$o \
$(OBJ)lzf_d.$o \
$(OBJ)lzwnew.$o \
$(OBJ)md4.$o \
$(OBJ)mmulti.$o \
$(OBJ)osd.$o \
$(OBJ)pragmas.$o \
$(OBJ)scriptfile.$o \
$(OBJ)winlayer.$o
ENGINEOBJS=$(OBJ)\a.$o \
$(OBJ)\baselayer.$o \
$(OBJ)\cache1d.$o \
$(OBJ)\compat.$o \
$(OBJ)\crc32.$o \
$(OBJ)\defs.$o \
$(OBJ)\engine.$o \
$(OBJ)\glbuild.$o \
$(OBJ)\kplib.$o \
$(OBJ)\lzf_c.$o \
$(OBJ)\lzf_d.$o \
$(OBJ)\lzwnew.$o \
$(OBJ)\md4.$o \
$(OBJ)\mmulti.$o \
$(OBJ)\osd.$o \
$(OBJ)\pragmas.$o \
$(OBJ)\scriptfile.$o \
$(OBJ)\winlayer.$o
EDITOROBJS=$(OBJ)build.$o \
$(OBJ)startwin.editor.$o \
$(OBJ)config.$o
EDITOROBJS=$(OBJ)\build.$o \
$(OBJ)\startwin.editor.$o \
$(OBJ)\config.$o
GAMEEXEOBJS=$(OBJ)config.$o \
$(OBJ)game.$o \
$(OBJ)gameres.$(res) \
$(OBJ)startwin.game.$o \
$(OBJ)sound.$o \
$(OBJ)$(ENGINELIB)
GAMEEXEOBJS=$(OBJ)\config.$o \
$(OBJ)\game.$o \
$(OBJ)\gameres.$(res) \
$(OBJ)\startwin.game.$o \
$(OBJ)\sound.$o \
$(OBJ)\$(ENGINELIB)
EDITOREXEOBJS=$(OBJ)bstub.$o \
$(OBJ)buildres.$(res) \
$(OBJ)$(EDITORLIB) \
$(OBJ)$(ENGINELIB)
EDITOREXEOBJS=$(OBJ)\bstub.$o \
$(OBJ)\buildres.$(res) \
$(OBJ)\$(EDITORLIB) \
$(OBJ)\$(ENGINELIB)
RENDERTYPE=WIN
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:
$(AS) /c $(ASFLAGS) /Fo$@ $<
{$(SRC)tmp}.c{$(OBJ)}.$o:
{$(SRC)\tmp}.c{$(OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)util}.c{$(OBJ)}.$o:
{$(SRC)\util}.c{$(OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)misc}.rc{$(OBJ)}.$(res):
$(RC) /i$(INC) /i$(GAME) /fo$@ /r $<
{$(SRC)\misc}.rc{$(OBJ)}.$(res):
$(RC) /i$(INC)\ /i$(GAME)\ /fo$@ /r $<
{$(SRC)}.c{$(OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
@ -122,15 +122,15 @@ CFLAGS=$(CFLAGS) /DRENDERTYPE$(RENDERTYPE)=1
# TARGETS
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) ;
enginelib: $(OBJ)$(ENGINELIB) ;
$(OBJ)$(ENGINELIB): $(ENGINEOBJS)
enginelib: $(OBJ)\$(ENGINELIB) ;
$(OBJ)\$(ENGINELIB): $(ENGINEOBJS)
lib /out:$@ /nologo $**
editorlib: $(OBJ)$(EDITORLIB) ;
$(OBJ)$(EDITORLIB): $(EDITOROBJS)
editorlib: $(OBJ)\$(EDITORLIB) ;
$(OBJ)\$(EDITORLIB): $(EDITOROBJS)
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
# 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
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
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
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
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
# DEPENDENCIES
@ -163,5 +163,5 @@ wad2art$(EXESUFFIX): $(OBJ)wad2art.$o $(OBJ)pragmas.$o $(OBJ)compat.$o
clean:
-del $(ENGINEOBJS) $(EDITOROBJS) $(GAMEEXEOBJS) $(EDITOREXEOBJS)
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
EXESUFFIX=.exe
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
ifeq ($(PLATFORM),BSD)
RENDERTYPE=SDL
@ -126,9 +133,6 @@ ifeq ($(RENDERTYPE),SDL)
else
ifeq ($(RENDERTYPE),WIN)
LIBS+= -mwindows -ldxguid
ifneq (0,$(USE_OPENGL))
LIBS+= -lglu32
endif
endif
endif

View file

@ -4,12 +4,12 @@
!include $(OVERRIDES)
!endif
SRC=src\
GAME=game\
SRC=src
GAME=game
!ifndef OBJ
OBJ=obj.watcom\
OBJ=obj.watcom
!endif
INC=include\
INC=include
!ifndef CFLAGS
CFLAGS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL -dKSFORBUILD
!endif
@ -25,13 +25,14 @@ DXROOT=c:\sdks\directx\dx7
!ifdef __LOADDLL__
! loaddll wcc386 wccd386
! loaddll wpp386 wppd386
!endif
# -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
# than the assembly version in A.ASM.
# If this is defined, alter the $(OBJ)a.$o in the
# ENGINEOBJS declaration to be $(OBJ)a-c.$o
# If this is defined, alter the $(OBJ)\a.$o in the
# ENGINEOBJS declaration to be $(OBJ)\a-c.$o
# NOASM When defined, uses C code instead of Watcom inline
# assembly for the features in PRAGMAS.H
TARGETOPTS=#-dUSE_A_C #-dNOASM
@ -41,41 +42,41 @@ CXX=wpp386
AS=wasm
RC=wrc
CFLAGS+= -zq -5r -s -orb -fp5 $(TARGETOPTS) -d2 -dRENDERTYPEWIN=1 &
-i=watcomhax -i=$(INC) -i=$(SRC) -i=$(DXROOT)\include -i=..\jfaud\inc
GAMECFLAGS=-i=$(GAME)
-i=$(INC) -i=$(SRC) -i=$(DXROOT)\include -i=..\jfaud\inc
GAMECFLAGS=-i=$(GAME)\
LIBS=dxguid.lib wsock32.lib ..\jfaud\jfaud.lib winmm.lib #opengl32.lib
ASFLAGS=# -d1
EXESUFFIX=.exe
ENGINEOBJS=$(OBJ)a.$o &
$(OBJ)baselayer.$o &
$(OBJ)cache1d.$o &
$(OBJ)compat.$o &
$(OBJ)crc32.$o &
$(OBJ)defs.$o &
$(OBJ)engine.$o &
$(OBJ)glbuild.$o &
$(OBJ)kplib.$o &
$(OBJ)lzf_c.$o &
$(OBJ)lzf_d.$o &
$(OBJ)lzwnew.$o &
$(OBJ)md4.$o &
$(OBJ)mmulti.$o &
$(OBJ)osd.$o &
$(OBJ)pragmas.$o &
$(OBJ)scriptfile.$o &
$(OBJ)winlayer.$o
ENGINEOBJS=$(OBJ)\a.$o &
$(OBJ)\baselayer.$o &
$(OBJ)\cache1d.$o &
$(OBJ)\compat.$o &
$(OBJ)\crc32.$o &
$(OBJ)\defs.$o &
$(OBJ)\engine.$o &
$(OBJ)\glbuild.$o &
$(OBJ)\kplib.$o &
$(OBJ)\lzf_c.$o &
$(OBJ)\lzf_d.$o &
$(OBJ)\lzwnew.$o &
$(OBJ)\md4.$o &
$(OBJ)\mmulti.$o &
$(OBJ)\osd.$o &
$(OBJ)\pragmas.$o &
$(OBJ)\scriptfile.$o &
$(OBJ)\winlayer.$o
EDITOROBJS=$(OBJ)build.$o &
$(OBJ)config.$o &
$(OBJ)startwin.editor.$o
EDITOROBJS=$(OBJ)\build.$o &
$(OBJ)\config.$o &
$(OBJ)\startwin.editor.$o
GAMEEXEOBJS=$(OBJ)game.$o &
$(OBJ)jfaud_sound.$o &
$(OBJ)config.$o &
$(OBJ)startwin.game.$o
GAMEEXEOBJS=$(OBJ)\game.$o &
$(OBJ)\jfaud_sound.$o &
$(OBJ)\config.$o &
$(OBJ)\startwin.game.$o
EDITOREXEOBJS=$(OBJ)bstub.$o
EDITOREXEOBJS=$(OBJ)\bstub.$o
# RULES
.EXTENSIONS: .wasm .res .rc
@ -85,16 +86,16 @@ EDITOREXEOBJS=$(OBJ)bstub.$o
.cpp: $(SRC)
.c: $(GAME)
.cpp: $(GAME)
.c: $(SRC)util/
.rc: $(SRC)misc/
.c: $(SRC)\util
.rc: $(SRC)\misc
.wasm.$o:
$(AS) $(ASFLAGS) -fo=$(OBJ).$o $[@
$(AS) $(ASFLAGS) -fo=$(OBJ)\.$o $[@
.c.$o:
$(CC) $(CFLAGS) -fo=$(OBJ).$o $[@
$(CC) $(CFLAGS) -fo=$(OBJ)\.$o $[@
.cpp.$o:
$(CXX) $(CFLAGS) $(GAMECFLAGS) -fo=$(OBJ).$o $[@
$(CXX) $(CFLAGS) $(GAMECFLAGS) -fo=$(OBJ)\.$o $[@
.rc.$(res):
$(RC) -i=$(SRC) -i=$(INC) -i=$(GAME) -fo=$^*.$(res) -r $[@
@ -102,63 +103,63 @@ EDITOREXEOBJS=$(OBJ)bstub.$o
# TARGETS
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
utils: $(UTILS) .SYMBOLIC
%null
enginelib: $(OBJ)$(ENGINELIB) .SYMBOLIC
enginelib: $(OBJ)\$(ENGINELIB) .SYMBOLIC
%null
$(OBJ)$(ENGINELIB): $(ENGINEOBJS)
%create $(OBJ)$(ENGINELIB).tmp
for %i in ($(ENGINEOBJS)) do %append $(OBJ)$(ENGINELIB).tmp +%i
wlib -b -n $^* @$(OBJ)$(ENGINELIB).tmp
erase $(OBJ)$(ENGINELIB).tmp
$(OBJ)\$(ENGINELIB): $(ENGINEOBJS)
%create $(OBJ)\$(ENGINELIB).tmp
for %i in ($(ENGINEOBJS)) do %append $(OBJ)\$(ENGINELIB).tmp +%i
wlib -b -n $^* @$(OBJ)\$(ENGINELIB).tmp
erase $(OBJ)\$(ENGINELIB).tmp
editorlib: $(OBJ)$(EDITORLIB) .SYMBOLIC
editorlib: $(OBJ)\$(EDITORLIB) .SYMBOLIC
%null
$(OBJ)$(EDITORLIB): $(EDITOROBJS)
%create $(OBJ)$(EDITORLIB).tmp
for %i in ($(EDITOROBJS)) do %append $(OBJ)$(EDITORLIB).tmp +%i
wlib -b -n $^* @$(OBJ)$(EDITORLIB).tmp
erase $(OBJ)$(EDITORLIB).tmp
$(OBJ)\$(EDITORLIB): $(EDITOROBJS)
%create $(OBJ)\$(EDITORLIB).tmp
for %i in ($(EDITOROBJS)) do %append $(OBJ)\$(EDITORLIB).tmp +%i
wlib -b -n $^* @$(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 $@ &
SYSTEM WIN95 &
DEBUG ALL &
OPTION MAP &
FILE { $(GAMEEXEOBJS) } &
RESOURCE $(OBJ)gameres.$(res) &
RESOURCE $(OBJ)\gameres.$(res) &
LIBPATH $(DXROOT)\lib &
LIBPATH $(FMODROOT)\lib &
LIBPATH $(OBJ) &
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 $@ &
SYSTEM WIN95 &
DEBUG ALL &
OPTION MAP &
FILE { $(EDITOREXEOBJS) } &
RESOURCE $(OBJ)buildres.$(res) &
RESOURCE $(OBJ)\buildres.$(res) &
LIBPATH $(DXROOT)\lib &
LIBPATH $(FMODROOT)\lib &
LIBPATH $(OBJ) &
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 { $< }
kgroup$(EXESUFFIX): $(OBJ)kgroup.$o $(OBJ)compat.$o
kgroup$(EXESUFFIX): $(OBJ)\kgroup.$o $(OBJ)\compat.$o
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 { $< }
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 { $< }
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 { $< }
# DEPENDENCIES
@ -166,5 +167,5 @@ wad2map$(EXESUFFIX): $(OBJ)wad2map.$o $(OBJ)pragmas.$o $(OBJ)compat.$o
# PHONIES
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.
#define __compat_h_macrodef__
#if defined(__WATCOMC__) && ((__WATCOMC__ -0) < 1230)
# define SCREWED_UP_CPP
#endif
#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
# include <stdarg.h>
#endif
#ifdef __compat_h_macrodef__
# ifdef __cplusplus
# include <cstdio>
# include <cstring>
# include <cstdlib>
# include <ctime>
# else
# ifndef __cplusplus
# include <stdio.h>
# include <string.h>
# include <stdlib.h>
@ -144,6 +160,11 @@ typedef unsigned long long uint64;
#endif
#ifdef __cplusplus
# ifndef SCREWED_UP_CPP
using namespace std;
# endif
extern "C" {
#endif
@ -272,13 +293,13 @@ int Bclosedir(BDIR *dir);
#ifdef __compat_h_macrodef__
# define BFILE FILE
typedef FILE BFILE;
# define bsize_t size_t
# define bssize_t ssize_t
#else
typedef void BFILE;
typedef unsigned long bsize_t;
typedef signed long bssize_t;
typedef void BFILE;
typedef unsigned long bsize_t;
typedef signed long bssize_t;
#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).
// 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;
@ -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.
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));
}

View file

@ -3840,6 +3840,7 @@ if (tspr->cstat&2) { if (!(tspr->cstat&512)) method = 2+4; else method = 3+4; }
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))
bglDepthMask(0);
#endif

View file

@ -92,7 +92,7 @@ static void ReleaseOpenGL(void);
static void UninitOpenGL(void);
static int SetupOpenGL(int width, int height, int bitspp);
static BOOL RegisterWindowClass(void);
static BOOL CreateAppWindow(int modenum, char *wtitle);
static BOOL CreateAppWindow(int modenum);
static void DestroyAppWindow(void);
static void SaveSystemColours(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",
x,y,c, ((fs&1) ? "fullscreen" : "windowed"));
if (CreateAppWindow(modenum, apptitle)) return -1;
if (CreateAppWindow(modenum)) return -1;
if (!gammabrightness) {
float f = 1.0 + ((float)curbrightness / 10.0);
@ -2035,6 +2035,7 @@ void showframe(int w)
bglPushMatrix();
bglLoadIdentity();
bglDisable(GL_ALPHA_TEST);
bglDisable(GL_DEPTH_TEST);
bglDisable(GL_ALPHA_TEST);
bglDisable(GL_TEXTURE_2D);
@ -2859,7 +2860,7 @@ static int SetupOpenGL(int width, int height, int bitspp)
//
// CreateAppWindow() -- create the application window
//
static BOOL CreateAppWindow(int modenum, char *wtitle)
static BOOL CreateAppWindow(int modenum)
{
RECT rect;
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);
SetWindowText(hWindow, wtitle);
SetWindowText(hWindow, apptitle);
ShowWindow(hWindow, SW_SHOWNORMAL);
SetForegroundWindow(hWindow);
SetFocus(hWindow);

View file

@ -16,11 +16,11 @@ JFAUD?=0
# build locations
SRC=source/
RSRC=rsrc/
EROOT=../build/
ESRC=$(EROOT)src/
EINC=$(EROOT)include/
SRC=source
RSRC=rsrc
EROOT=../build
ESRC=$(EROOT)/src
EINC=$(EROOT)/include
INC=$(SRC)
o=o
@ -37,7 +37,7 @@ CXX=g++
# -Werror-implicit-function-declaration
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts -Wunused \
-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
LIBS=-lm
ifneq (0,$(JFAUD))
@ -48,68 +48,68 @@ endif
NASMFLAGS=-s #-g
EXESUFFIX=
include $(EROOT)Makefile.shared
include $(EROOT)/Makefile.shared
ifeq ($(PLATFORM),LINUX)
OBJ=obj.nix/
EOBJ=eobj.nix/
OBJ=obj.nix
EOBJ=eobj.nix
NASMFLAGS+= -f elf
else
OBJ=obj/
EOBJ=eobj/
OBJ=obj
EOBJ=eobj
endif
JMACTOBJ=$(OBJ)util_lib.$o \
$(OBJ)file_lib.$o \
$(OBJ)control.$o \
$(OBJ)keyboard.$o \
$(OBJ)mouse.$o \
$(OBJ)mathutil.$o \
$(OBJ)scriplib.$o
JMACTOBJ=$(OBJ)/util_lib.$o \
$(OBJ)/file_lib.$o \
$(OBJ)/control.$o \
$(OBJ)/keyboard.$o \
$(OBJ)/mouse.$o \
$(OBJ)/mathutil.$o \
$(OBJ)/scriplib.$o
AUDIOLIB_FX_STUB=$(OBJ)audiolib_fxstub.$o
AUDIOLIB_MUSIC_STUB=$(OBJ)audiolib_musicstub.$o
AUDIOLIB_JFAUD=$(OBJ)jfaud_sounds.$o
AUDIOLIB_FX=$(OBJ)mv_mix.$o \
$(OBJ)mv_mix16.$o \
$(OBJ)mvreverb.$o \
$(OBJ)pitch.$o \
$(OBJ)multivoc.$o \
$(OBJ)ll_man.$o \
$(OBJ)fx_man.$o \
$(OBJ)dsoundout.$o
AUDIOLIB_MUSIC=$(OBJ)midi.$o \
$(OBJ)mpu401.$o \
$(OBJ)music.$o
AUDIOLIB_FX_STUB=$(OBJ)/audiolib_fxstub.$o
AUDIOLIB_MUSIC_STUB=$(OBJ)/audiolib_musicstub.$o
AUDIOLIB_JFAUD=$(OBJ)/jfaud_sounds.$o
AUDIOLIB_FX=$(OBJ)/mv_mix.$o \
$(OBJ)/mv_mix16.$o \
$(OBJ)/mvreverb.$o \
$(OBJ)/pitch.$o \
$(OBJ)/multivoc.$o \
$(OBJ)/ll_man.$o \
$(OBJ)/fx_man.$o \
$(OBJ)/dsoundout.$o
AUDIOLIB_MUSIC=$(OBJ)/midi.$o \
$(OBJ)/mpu401.$o \
$(OBJ)/music.$o
GAMEOBJS=$(OBJ)game.$o \
$(OBJ)actors.$o \
$(OBJ)anim.$o \
$(OBJ)animlib.$o \
$(OBJ)config.$o \
$(OBJ)gamedef.$o \
$(OBJ)gameexec.$o \
$(OBJ)global.$o \
$(OBJ)menus.$o \
$(OBJ)namesdyn.$o \
$(OBJ)player.$o \
$(OBJ)premap.$o \
$(OBJ)savegame.$o \
$(OBJ)sector.$o \
$(OBJ)rts.$o \
$(OBJ)testcd.$o \
$(OBJ)osdfuncs.$o \
$(OBJ)osdcmds.$o \
$(OBJ)grpscan.$o \
GAMEOBJS=$(OBJ)/game.$o \
$(OBJ)/actors.$o \
$(OBJ)/anim.$o \
$(OBJ)/animlib.$o \
$(OBJ)/config.$o \
$(OBJ)/gamedef.$o \
$(OBJ)/gameexec.$o \
$(OBJ)/global.$o \
$(OBJ)/menus.$o \
$(OBJ)/namesdyn.$o \
$(OBJ)/player.$o \
$(OBJ)/premap.$o \
$(OBJ)/savegame.$o \
$(OBJ)/sector.$o \
$(OBJ)/rts.$o \
$(OBJ)/testcd.$o \
$(OBJ)/osdfuncs.$o \
$(OBJ)/osdcmds.$o \
$(OBJ)/grpscan.$o \
$(JMACTOBJ)
EDITOROBJS=$(OBJ)astub.$o
EDITOROBJS=$(OBJ)/astub.$o
ifeq ($(PLATFORM),WINDOWS)
OURCFLAGS+= -DUNDERSCORES -I$(DXROOT)/include
NASMFLAGS+= -DUNDERSCORES -f win32
GAMEOBJS+= $(OBJ)gameres.$o $(OBJ)winbits.$o $(OBJ)startwin.game.$o
EDITOROBJS+= $(OBJ)buildres.$o
GAMEOBJS+= $(OBJ)/gameres.$o $(OBJ)/winbits.$o $(OBJ)/startwin.game.$o
EDITOROBJS+= $(OBJ)/buildres.$o
endif
ifeq ($(RENDERTYPE),SDL)
@ -118,24 +118,24 @@ ifeq ($(RENDERTYPE),SDL)
ifneq (0,$(JFAUD))
AUDIOLIBOBJ=$(AUDIOLIB_JFAUD)
else
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC_STUB) $(AUDIOLIB_FX_STUB) $(OBJ)sounds.$o
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC_STUB) $(AUDIOLIB_FX_STUB) $(OBJ)/sounds.$o
endif
ifeq (1,$(HAVE_GTK2))
OURCFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
GAMEOBJS+= $(OBJ)game_banner.$o $(OBJ)startgtk.game.$o
EDITOROBJS+= $(OBJ)editor_banner.$o
GAMEOBJS+= $(OBJ)/game_banner.$o $(OBJ)/startgtk.game.$o
EDITOROBJS+= $(OBJ)/editor_banner.$o
endif
GAMEOBJS+= $(OBJ)game_icon.$o
EDITOROBJS+= $(OBJ)build_icon.$o
GAMEOBJS+= $(OBJ)/game_icon.$o
EDITOROBJS+= $(OBJ)/build_icon.$o
endif
ifeq ($(RENDERTYPE),WIN)
ifneq (0,$(JFAUD))
AUDIOLIBOBJ=$(AUDIOLIB_JFAUD)
else
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)sounds.$o
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)/sounds.$o
endif
endif
@ -143,7 +143,7 @@ GAMEOBJS+= $(AUDIOLIBOBJ)
OURCFLAGS+= $(BUILDCFLAGS)
OURCXXFLAGS+= $(BUILDCFLAGS)
.PHONY: clean all engine $(EOBJ)$(ENGINELIB) $(EOBJ)$(EDITORLIB)
.PHONY: clean all engine $(EOBJ)/$(ENGINELIB) $(EOBJ)/$(EDITORLIB)
# TARGETS
@ -165,19 +165,19 @@ else
all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
endif
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)$(ENGINELIB)
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)/$(ENGINELIB)
$(CC) -o $@ $^ $(JFAUDLIBS) $(LIBS) $(STDCPPLIB) -Wl,-Map=$@.map
-rm eduke32.sym$(EXESUFFIX)
cp eduke32$(EXESUFFIX) eduke32.sym$(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
-rm mapster32.sym$(EXESUFFIX)
cp mapster32$(EXESUFFIX) mapster32.sym$(EXESUFFIX)
strip mapster32$(EXESUFFIX)
duke3d_w32$(EXESUFFIX): $(OBJ)wrapper.$o
duke3d_w32$(EXESUFFIX): $(OBJ)/wrapper.$o
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ -Wl
strip duke3d_w32$(EXESUFFIX)
@ -186,49 +186,49 @@ include Makefile.deps
.PHONY: enginelib editorlib
enginelib editorlib:
-mkdir $(EOBJ)
$(MAKE) -C $(EROOT) "OBJ=$(CURDIR)/$(EOBJ)" \
$(MAKE) -C $(EROOT)/ "OBJ=$(CURDIR)/$(EOBJ)" \
SUPERBUILD=$(SUPERBUILD) POLYMOST=$(POLYMOST) \
USE_OPENGL=$(USE_OPENGL) USE_A_C=$(USE_A_C) \
NOASM=$(NOASM) RELEASE=$(RELEASE) $@
$(EOBJ)$(ENGINELIB): enginelib
$(EOBJ)$(EDITORLIB): editorlib
$(EOBJ)/$(ENGINELIB): enginelib
$(EOBJ)/$(EDITORLIB): editorlib
# RULES
$(OBJ)%.$o: $(SRC)%.nasm
$(OBJ)/%.$o: $(SRC)/%.nasm
nasm $(NASMFLAGS) $< -o $@
$(OBJ)%.$o: $(SRC)jaudiolib/%.nasm
$(OBJ)/%.$o: $(SRC)/jaudiolib/%.nasm
nasm $(NASMFLAGS) $< -o $@
$(OBJ)%.$o: $(SRC)%.c
$(OBJ)/%.$o: $(SRC)/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
$(OBJ)%.$o: $(SRC)%.cpp
$(OBJ)/%.$o: $(SRC)/%.cpp
$(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
$(OBJ)%.$o: $(SRC)jaudiolib/%.c
$(OBJ)/%.$o: $(SRC)/jaudiolib/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
ifeq (1,$(JFAUD))
$(OBJ)%.$o: $(SRC)misc/%.rc
windres -i $< -o $@ --include-dir=$(EINC). --include-dir=$(SRC). -DJFAUD
$(OBJ)/%.$o: $(SRC)/misc/%.rc
windres -i $< -o $@ --include-dir=$(EINC) --include-dir=$(SRC) -DJFAUD
else
$(OBJ)%.$o: $(SRC)misc/%.rc
windres -i $< -o $@ --include-dir=$(EINC). --include-dir=$(SRC).
$(OBJ)/%.$o: $(SRC)/misc/%.rc
windres -i $< -o $@ --include-dir=$(EINC) --include-dir=$(SRC)
endif
$(OBJ)%.$o: $(SRC)util/%.c
$(OBJ)/%.$o: $(SRC)/util/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
$(OBJ)%.$o: $(RSRC)%.c
$(OBJ)/%.$o: $(RSRC)/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ 2>&1
$(OBJ)game_banner.$o: $(RSRC)game_banner.c
$(OBJ)editor_banner.$o: $(RSRC)editor_banner.c
$(RSRC)game_banner.c: $(RSRC)game.bmp
$(OBJ)/game_banner.$o: $(RSRC)/game_banner.c
$(OBJ)/editor_banner.$o: $(RSRC)/editor_banner.c
$(RSRC)/game_banner.c: $(RSRC)/game.bmp
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@
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>" > $@
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
@ -237,11 +237,11 @@ clean:
ifeq ($(PLATFORM),DARWIN)
cd osx && xcodebuild -target All clean
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
veryclean: clean
ifeq ($(PLATFORM),DARWIN)
else
-rm -f $(EOBJ)*
-rm -f $(EOBJ)/*
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
gamedef_h=$(SRC)gamedef.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
$(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)anim.$o: $(SRC)anim.c $(duke3d_h) $(SRC)jmact/animlib.h
$(OBJ)gamedef.$o: $(SRC)gamedef.c $(duke3d_h) $(gamedef_h)
$(OBJ)gameexec.$o: $(SRC)gameexec.c $(duke3d_h) $(gamedef_h)
$(OBJ)global.$o: $(SRC)global.c $(duke3d_h)
$(OBJ)menus.$o: $(SRC)menus.c $(duke3d_h) $(SRC)jmact/mouse.h
$(OBJ)namesdyn.$o: $(SRC)namesdyn.c $(duke3d_h)
$(OBJ)player.$o: $(SRC)player.c $(duke3d_h)
$(OBJ)premap.$o: $(SRC)premap.c $(duke3d_h) $(EINC)osd.h
$(OBJ)savegame.$o: $(SRC)savegame.c $(duke3d_h)
$(OBJ)sector.$o: $(SRC)sector.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)rts.$o: $(SRC)rts.c $(duke3d_h)
$(OBJ)config.$o: $(SRC)config.c $(duke3d_h) $(SRC)jmact/scriplib.h $(INC)_functio.h
$(OBJ)testcd.$o: $(SRC)testcd.c
$(OBJ)winbits.$o: $(SRC)winbits.c
$(OBJ)osdfuncs.$o: $(SRC)names.h $(EINC)build.h
$(OBJ)osdcmds.$o: $(SRC)osdcmds.c $(INC)osdcmds.h $(EINC)osd.h $(duke3d_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)/anim.$o: $(SRC)/anim.c $(duke3d_h) $(SRC)/jmact/animlib.h
$(OBJ)/gamedef.$o: $(SRC)/gamedef.c $(duke3d_h) $(gamedef_h)
$(OBJ)/gameexec.$o: $(SRC)/gameexec.c $(duke3d_h) $(gamedef_h)
$(OBJ)/global.$o: $(SRC)/global.c $(duke3d_h)
$(OBJ)/menus.$o: $(SRC)/menus.c $(duke3d_h) $(SRC)/jmact/mouse.h
$(OBJ)/namesdyn.$o: $(SRC)/namesdyn.c $(duke3d_h)
$(OBJ)/player.$o: $(SRC)/player.c $(duke3d_h)
$(OBJ)/premap.$o: $(SRC)/premap.c $(duke3d_h) $(EINC)/osd.h
$(OBJ)/savegame.$o: $(SRC)/savegame.c $(duke3d_h)
$(OBJ)/sector.$o: $(SRC)/sector.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)/rts.$o: $(SRC)/rts.c $(duke3d_h)
$(OBJ)/config.$o: $(SRC)/config.c $(duke3d_h) $(SRC)/jmact/scriplib.h $(INC)/_functio.h
$(OBJ)/testcd.$o: $(SRC)/testcd.c
$(OBJ)/winbits.$o: $(SRC)/winbits.c
$(OBJ)/osdfuncs.$o: $(SRC)/names.h $(EINC)/build.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)build_icon.$o: $(RSRC)build_icon.c
$(OBJ)/game_icon.$o: $(RSRC)/game_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)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)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)/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)/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)/startgtk.game.$o: $(SRC)/startgtk.game.c $(duke3d_h) $(EINC)/dynamicgtk.h $(EINC)/build.h $(EINC)/baselayer.h $(EINC)/compat.h
# 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)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)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)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)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)/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)/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)/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)/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
# jAudioLib objects
$(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_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_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_mix16.$o: $(SRC)jaudiolib/mv_mix16.nasm
$(OBJ)mvreverb.$o: $(SRC)jaudiolib/mvreverb.nasm
$(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)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)/mv_mix.$o: $(SRC)/jaudiolib/mv_mix.nasm
$(OBJ)/mv_mix16.$o: $(SRC)/jaudiolib/mv_mix16.nasm
$(OBJ)/mvreverb.$o: $(SRC)/jaudiolib/mvreverb.nasm
$(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)/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)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)music.$o: $(SRC)jaudiolib/music.c $(SRC)jaudiolib/music.h $(SRC)jaudiolib/midi.h $(SRC)jaudiolib/mpu401.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)/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
SRC=source\ #
OBJ=obj\ #
EROOT=..\build\ #
EINC=$(EROOT)include\ #
EOBJ=eobj\ #
SRC=source
OBJ=obj
EROOT=..\build
EINC=$(EROOT)\include
EOBJ=eobj
INC=$(SRC)
o=obj
@ -30,7 +30,7 @@ CC=cl
AS=ml
LINK=link /opt:nowin98 /nologo /opt:ref
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) \
/I$(DXROOT)\include /DRENDERTYPEWIN=1
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
EXESUFFIX=.exe
JMACTOBJ=$(OBJ)util_lib.$o \
$(OBJ)file_lib.$o \
$(OBJ)control.$o \
$(OBJ)keyboard.$o \
$(OBJ)mouse.$o \
$(OBJ)mathutil.$o \
$(OBJ)scriplib.$o
JMACTOBJ=$(OBJ)\util_lib.$o \
$(OBJ)\file_lib.$o \
$(OBJ)\control.$o \
$(OBJ)\keyboard.$o \
$(OBJ)\mouse.$o \
$(OBJ)\mathutil.$o \
$(OBJ)\scriplib.$o
#AUDIOLIB_FX=$(OBJ)jaudiolib_fxstub.$o
#AUDIOLIB_MUSIC=$(OBJ)jaudiolib_musicstub.$o
#AUDIOLIB_FX=$(OBJ)jaudiolib_fx_fmod.$o
AUDIOLIB_JFAUD=$(OBJ)jfaud_sounds.$o
AUDIOLIB_FX=$(OBJ)mv_mix.$o \
$(OBJ)mv_mix16.$o \
$(OBJ)mvreverb.$o \
$(OBJ)pitch.$o \
$(OBJ)multivoc.$o \
$(OBJ)ll_man.$o \
$(OBJ)fx_man.$o \
$(OBJ)dsoundout.$o
AUDIOLIB_MUSIC=$(OBJ)midi.$o \
$(OBJ)mpu401.$o \
$(OBJ)music.$o
#AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)sounds.$o
#AUDIOLIB_FX=$(OBJ)\jaudiolib_fxstub.$o
#AUDIOLIB_MUSIC=$(OBJ)\jaudiolib_musicstub.$o
#AUDIOLIB_FX=$(OBJ)\jaudiolib_fx_fmod.$o
AUDIOLIB_JFAUD=$(OBJ)\jfaud_sounds.$o
AUDIOLIB_FX=$(OBJ)\mv_mix.$o \
$(OBJ)\mv_mix16.$o \
$(OBJ)\mvreverb.$o \
$(OBJ)\pitch.$o \
$(OBJ)\multivoc.$o \
$(OBJ)\ll_man.$o \
$(OBJ)\fx_man.$o \
$(OBJ)\dsoundout.$o
AUDIOLIB_MUSIC=$(OBJ)\midi.$o \
$(OBJ)\mpu401.$o \
$(OBJ)\music.$o
#AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)\sounds.$o
AUDIOLIBOBJ=$(AUDIOLIB_JFAUD)
GAMEOBJS=$(OBJ)game.$o \
$(OBJ)actors.$o \
$(OBJ)anim.$o \
$(OBJ)gamedef.$o \
$(OBJ)gameexec.$o \
$(OBJ)global.$o \
$(OBJ)menus.$o \
$(OBJ)namesdyn.$o \
$(OBJ)player.$o \
$(OBJ)premap.$o \
$(OBJ)savegame.$o \
$(OBJ)sector.$o \
$(OBJ)rts.$o \
$(OBJ)config.$o \
$(OBJ)animlib.$o\
$(OBJ)testcd.$o \
$(OBJ)osdfuncs.$o \
$(OBJ)osdcmds.$o \
$(OBJ)grpscan.$o \
$(OBJ)winbits.$o \
$(OBJ)gameres.res \
$(OBJ)startwin.game.$o \
GAMEOBJS=$(OBJ)\game.$o \
$(OBJ)\actors.$o \
$(OBJ)\anim.$o \
$(OBJ)\gamedef.$o \
$(OBJ)\gameexec.$o \
$(OBJ)\global.$o \
$(OBJ)\menus.$o \
$(OBJ)\namesdyn.$o \
$(OBJ)\player.$o \
$(OBJ)\premap.$o \
$(OBJ)\savegame.$o \
$(OBJ)\sector.$o \
$(OBJ)\rts.$o \
$(OBJ)\config.$o \
$(OBJ)\animlib.$o\
$(OBJ)\testcd.$o \
$(OBJ)\osdfuncs.$o \
$(OBJ)\osdcmds.$o \
$(OBJ)\grpscan.$o \
$(OBJ)\winbits.$o \
$(OBJ)\gameres.res \
$(OBJ)\startwin.game.$o \
$(JMACTOBJ) \
$(AUDIOLIBOBJ)
EDITOROBJS=$(OBJ)astub.$o \
$(OBJ)buildres.res
EDITOROBJS=$(OBJ)\astub.$o \
$(OBJ)\buildres.res
# RULES
.SUFFIXES: .masm
{$(SRC)}.masm{$(OBJ)}.$o:
{$(SRC)\}.masm{$(OBJ)\}.$o:
$(AS) /c $(ASFLAGS) /Fo$@ $<
{$(SRC)jaudiolib}.masm{$(OBJ)}.$o:
{$(SRC)\jaudiolib}.masm{$(OBJ)\}.$o:
$(AS) /c $(ASFLAGS) /Fo$@ $<
{$(SRC)jmact}.c{$(OBJ)}.$o:
{$(SRC)\jmact}.c{$(OBJ)\}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)jaudiolib}.c{$(OBJ)}.$o:
{$(SRC)\jaudiolib}.c{$(OBJ)\}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)util}.c{$(OBJ)}.$o:
{$(SRC)\util}.c{$(OBJ)\}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)}.c{$(OBJ)}.$o:
{$(SRC)\}.c{$(OBJ)\}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)}.cpp{$(OBJ)}.$o:
{$(SRC)\}.cpp{$(OBJ)\}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(SRC)misc}.rc{$(OBJ)}.res:
$(RC) /i$(EINC) /i$(SRC) /fo$@ /r $<
{$(SRC)\misc}.rc{$(OBJ)\}.res:
$(RC) /i$(EINC)\ /i$(SRC)\ /fo$@ /r $<
# TARGETS
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
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
!include Makefile.deps
enginelib editorlib: AlwaysBuild
-mkdir $(EOBJ)
echo OBJ=$(MAKEDIR)\$(EOBJ) > $(EOBJ)overrides.mak
echo CFLAGS=$(ENGINEOPTS) >> $(EOBJ)overrides.mak
cd $(EROOT)
nmake /f Makefile.msvc "OVERRIDES=$(MAKEDIR)\$(EOBJ)overrides.mak" $@
-mkdir $(EOBJ)\
echo OBJ=$(MAKEDIR)\$(EOBJ)\ > $(EOBJ)\overrides.mak
echo CFLAGS=$(ENGINEOPTS) >> $(EOBJ)\overrides.mak
cd $(EROOT)\
nmake /f Makefile.msvc "OVERRIDES=$(MAKEDIR)\$(EOBJ)\overrides.mak" $@
cd $(MAKEDIR)
AlwaysBuild: ;
$(EOBJ)$(EDITORLIB): editorlib ;
$(EOBJ)$(ENGINELIB): enginelib ;
$(EOBJ)\$(EDITORLIB): editorlib ;
$(EOBJ)\$(ENGINELIB): enginelib ;
# PHONIES
clean:
-del $(OBJ)* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
-del $(OBJ)\* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
veryclean: clean
-del $(EOBJ)*
-del $(EOBJ)\*

View file

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

View file

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

View file

@ -55,7 +55,11 @@ typedef uint64 uint64_t;
static JFAudMixerChannel::Filter DefaultFilter = JFAudMixerChannel::FilterNearest;
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 {
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>