raze/polymer/eduke32/Makefile.watcom
Plagman 09f0c239b6 Importing source for great justice
git-svn-id: https://svn.eduke32.com/eduke32@5 1a8010ca-5511-0410-912e-c29ae57300e0
2006-04-13 20:47:06 +00:00

143 lines
3 KiB
Text

# EDuke32 Makefile for Watcom Make
SRC=source\
OBJ=obj\
EROOT=..\build\
EINC=$(EROOT)include\
EOBJ=eobj\
INC=$(SRC)
o=obj
ENGINELIB=engine.lib
EDITORLIB=build.lib
!ifdef __LOADDLL__
! loaddll wcc386 wccd386
!endif
DXROOT=c:\sdks\msc\dx7
ENGINEOPTS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL -dDYNAMIC_OPENGL
CC=wcc386
CFLAGS= -5r -s -orb -fp5 -d2 -db &
-i=$(INC) -i=$(EINC) -i=$(SRC)jmact -i=$(SRC)jaudiolib -i=$(DXROOT)\include &
-dRENDERTYPEWIN=1 -dNOCOPYPROTECT $(ENGINEOPTS)
LIBS=winmm.lib wsock32.lib dxguid.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
#JAUDIOLIB_FX=$(OBJ)jaudiolib_fxstub.$o
#JAUDIOLIB_MUSIC=$(OBJ)jaudiolib_musicstub.$o
#JAUDIOLIB_FX=$(OBJ)jaudiolib_fx_fmod.$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)
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)sounds.$o &
$(OBJ)rts.$o &
$(OBJ)config.$o &
$(OBJ)animlib.$o &
$(OBJ)testcd.$o &
$(OBJ)osdfuncs.$o &
$(OBJ)osdcmds.$o &
$(OBJ)winbits.$o &
$(JMACTOBJ) &
$(JAUDIOLIBOBJ)
EDITOROBJS=$(OBJ)astub.$o
# RULES
.EXTENSIONS: .wasm .res .rc
.wasm: $(SRC)
.wasm: $(SRC)jaudiolib/
.c: $(SRC)
.c: $(SRC)jmact/
.c: $(SRC)jaudiolib/
.c: $(SRC)util/
.rc: $(SRC)misc/
.wasm.$o:
wasm $(WASMFLAGS) -fo=$(OBJ).$o $[@
.c.$o:
$(CC) $(CFLAGS) -fo=$(OBJ).$o $[@
.rc.res:
wrc -fo=$^*.res -r $[@
# TARGETS
all: eduke32$(EXESUFFIX) build$(EXESUFFIX) .SYMBOLIC
%null
eduke32$(EXESUFFIX): $(GAMEOBJS) $(OBJ)gameres.res $(EOBJ)$(ENGINELIB)
wlink NAME $@ &
SYSTEM WIN95 &
DEBUG ALL &
FILE { $(GAMEOBJS) $(ENGINEOBJS) } &
RESOURCE $(OBJ)gameres.res &
LIBPATH $(DXROOT)\lib &
LIBPATH $(EOBJ) &
LIBRARY { $(ENGINELIB) $(LIBS) }
mapster32$(EXESUFFIX): $(EDITOROBJS) $(OBJ)buildres.res $(EOBJ)$(ENGINELIB) $(EOBJ)$(EDITORLIB)
wlink NAME $@ &
SYSTEM WIN95 &
DEBUG ALL &
FILE { $(EDITOROBJS) } &
RESOURCE $(OBJ)buildres.res &
LIBPATH $(DXROOT)\lib &
LIBPATH $(EOBJ) &
LIBRARY { $(LIBS) $(ENGINELIB) $(EDITORLIB) }
!include Makefile.deps
cwd=$+ $(%cwd) $-
enginelib editorlib: .SYMBOLIC
-mkdir $(EOBJ)
%write $(EOBJ)overrides.mak OBJ=$(cwd)\$(EOBJ)
%write $(EOBJ)overrides.mak CFLAGS=$(ENGINEOPTS)
cd $(EROOT)
wmake -f Makefile.watcom OVERRIDES=$(cwd)\$(EOBJ)overrides.mak $@
cd $(cwd)
$(EOBJ)$(EDITORLIB): editorlib .SYMBOLIC
$(EOBJ)$(ENGINELIB): enginelib .SYMBOLIC
# PHONIES
clean: .SYMBOLIC
-del $(OBJ)* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
veryclean: clean .SYMBOLIC
-del $(EOBJ)*