2006-04-13 20:47:06 +00:00
|
|
|
# Build Makefile for Watcom Make
|
|
|
|
|
|
|
|
!ifdef OVERRIDES
|
|
|
|
!include $(OVERRIDES)
|
|
|
|
!endif
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
SRC=src
|
|
|
|
GAME=game
|
2006-04-13 20:47:06 +00:00
|
|
|
!ifndef OBJ
|
2006-08-31 01:54:23 +00:00
|
|
|
OBJ=obj.watcom
|
2006-04-13 20:47:06 +00:00
|
|
|
!endif
|
2006-08-31 01:54:23 +00:00
|
|
|
INC=include
|
2006-04-13 20:47:06 +00:00
|
|
|
!ifndef CFLAGS
|
2006-05-12 21:55:05 +00:00
|
|
|
CFLAGS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL -dKSFORBUILD
|
2006-04-13 20:47:06 +00:00
|
|
|
!endif
|
|
|
|
|
|
|
|
o=obj
|
|
|
|
res=res
|
|
|
|
asm=wasm
|
|
|
|
|
|
|
|
ENGINELIB=engine.lib
|
|
|
|
EDITORLIB=build.lib
|
|
|
|
|
2006-04-15 03:12:08 +00:00
|
|
|
DXROOT=c:\sdks\directx\dx7
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
!ifdef __LOADDLL__
|
2006-08-31 01:54:23 +00:00
|
|
|
! loaddll wcc386 wccd386
|
|
|
|
! loaddll wpp386 wppd386
|
2006-04-13 20:47:06 +00:00
|
|
|
!endif
|
|
|
|
|
|
|
|
# -d these to enable certain features of the port's compile process
|
2006-09-10 17:40:34 +00:00
|
|
|
# NOASM When defined, uses C code instead assembly code
|
|
|
|
TARGETOPTS=#-dNOASM
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
CC=wcc386
|
2006-07-02 17:33:49 +00:00
|
|
|
CXX=wpp386
|
2006-04-13 20:47:06 +00:00
|
|
|
AS=wasm
|
|
|
|
RC=wrc
|
2006-07-02 17:33:49 +00:00
|
|
|
CFLAGS+= -zq -5r -s -orb -fp5 $(TARGETOPTS) -d2 -dRENDERTYPEWIN=1 &
|
2006-08-31 01:54:23 +00:00
|
|
|
-i=$(INC) -i=$(SRC) -i=$(DXROOT)\include -i=..\jfaud\inc
|
|
|
|
GAMECFLAGS=-i=$(GAME)\
|
2006-07-02 17:33:49 +00:00
|
|
|
LIBS=dxguid.lib wsock32.lib ..\jfaud\jfaud.lib winmm.lib #opengl32.lib
|
2006-04-13 20:47:06 +00:00
|
|
|
ASFLAGS=# -d1
|
|
|
|
EXESUFFIX=.exe
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
GAMEEXEOBJS=$(OBJ)\game.$o &
|
|
|
|
$(OBJ)\jfaud_sound.$o &
|
|
|
|
$(OBJ)\config.$o &
|
|
|
|
$(OBJ)\startwin.game.$o
|
|
|
|
|
|
|
|
EDITOREXEOBJS=$(OBJ)\bstub.$o
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
# RULES
|
|
|
|
.EXTENSIONS: .wasm .res .rc
|
|
|
|
|
|
|
|
.wasm: $(SRC)
|
|
|
|
.c: $(SRC)
|
2006-07-02 17:33:49 +00:00
|
|
|
.cpp: $(SRC)
|
|
|
|
.c: $(GAME)
|
|
|
|
.cpp: $(GAME)
|
2006-08-31 01:54:23 +00:00
|
|
|
.c: $(SRC)\util
|
|
|
|
.rc: $(SRC)\misc
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
.wasm.$o:
|
2006-08-31 01:54:23 +00:00
|
|
|
$(AS) $(ASFLAGS) -fo=$(OBJ)\.$o $[@
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
.c.$o:
|
2006-08-31 01:54:23 +00:00
|
|
|
$(CC) $(CFLAGS) -fo=$(OBJ)\.$o $[@
|
2006-07-02 17:33:49 +00:00
|
|
|
.cpp.$o:
|
2006-08-31 01:54:23 +00:00
|
|
|
$(CXX) $(CFLAGS) $(GAMECFLAGS) -fo=$(OBJ)\.$o $[@
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
.rc.$(res):
|
2006-07-02 17:33:49 +00:00
|
|
|
$(RC) -i=$(SRC) -i=$(INC) -i=$(GAME) -fo=$^*.$(res) -r $[@
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
# TARGETS
|
|
|
|
UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX)
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
all: game$(EXESUFFIX) build$(EXESUFFIX) .SYMBOLIC
|
2006-04-13 20:47:06 +00:00
|
|
|
%null
|
|
|
|
|
|
|
|
utils: $(UTILS) .SYMBOLIC
|
|
|
|
%null
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
enginelib: $(OBJ)\$(ENGINELIB) .SYMBOLIC
|
2006-04-13 20:47:06 +00:00
|
|
|
%null
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
$(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
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
editorlib: $(OBJ)\$(EDITORLIB) .SYMBOLIC
|
2006-04-13 20:47:06 +00:00
|
|
|
%null
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
$(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
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
game$(EXESUFFIX): $(GAMEEXEOBJS) $(OBJ)\gameres.$(res) $(OBJ)\$(ENGINELIB)
|
2006-04-13 20:47:06 +00:00
|
|
|
wlink NAME $@ &
|
|
|
|
SYSTEM WIN95 &
|
|
|
|
DEBUG ALL &
|
|
|
|
OPTION MAP &
|
|
|
|
FILE { $(GAMEEXEOBJS) } &
|
2006-08-31 01:54:23 +00:00
|
|
|
RESOURCE $(OBJ)\gameres.$(res) &
|
2006-04-13 20:47:06 +00:00
|
|
|
LIBPATH $(DXROOT)\lib &
|
|
|
|
LIBPATH $(FMODROOT)\lib &
|
|
|
|
LIBPATH $(OBJ) &
|
|
|
|
LIBRARY { $(ENGINELIB) $(LIBS) }
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
build$(EXESUFFIX): $(EDITOREXEOBJS) $(OBJ)\buildres.$(res) $(OBJ)\$(ENGINELIB) $(OBJ)\$(EDITORLIB)
|
2006-04-13 20:47:06 +00:00
|
|
|
wlink NAME $@ &
|
|
|
|
SYSTEM WIN95 &
|
|
|
|
DEBUG ALL &
|
|
|
|
OPTION MAP &
|
|
|
|
FILE { $(EDITOREXEOBJS) } &
|
2006-08-31 01:54:23 +00:00
|
|
|
RESOURCE $(OBJ)\buildres.$(res) &
|
2006-04-13 20:47:06 +00:00
|
|
|
LIBPATH $(DXROOT)\lib &
|
|
|
|
LIBPATH $(FMODROOT)\lib &
|
|
|
|
LIBPATH $(OBJ) &
|
|
|
|
LIBRARY { $(ENGINELIB) $(EDITORLIB) $(LIBS) }
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
kextract$(EXESUFFIX): $(OBJ)\kextract.$o $(OBJ)\compat.$o
|
2006-04-13 20:47:06 +00:00
|
|
|
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
|
2006-08-31 01:54:23 +00:00
|
|
|
kgroup$(EXESUFFIX): $(OBJ)\kgroup.$o $(OBJ)\compat.$o
|
2006-04-13 20:47:06 +00:00
|
|
|
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
|
2006-08-31 01:54:23 +00:00
|
|
|
transpal$(EXESUFFIX): $(OBJ)\transpal.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
|
2006-04-13 20:47:06 +00:00
|
|
|
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
|
2006-08-31 01:54:23 +00:00
|
|
|
wad2art$(EXESUFFIX): $(OBJ)\wad2art.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
|
2006-04-13 20:47:06 +00:00
|
|
|
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
|
2006-08-31 01:54:23 +00:00
|
|
|
wad2map$(EXESUFFIX): $(OBJ)\wad2map.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
|
2006-04-13 20:47:06 +00:00
|
|
|
wlink NAME $@ SYSTEM 386 DEBUG ALL FILE { $< }
|
|
|
|
|
|
|
|
# DEPENDENCIES
|
|
|
|
!include Makefile.deps
|
|
|
|
|
|
|
|
# PHONIES
|
|
|
|
clean: .SYMBOLIC
|
2006-08-31 01:54:23 +00:00
|
|
|
-erase /q $(OBJ)\* game$(EXESUFFIX) build$(EXESUFFIX) $(UTILS) *.err
|
2006-04-13 20:47:06 +00:00
|
|
|
|