forked from jonof/jfduke3d
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.watcom
143 lines (119 loc) · 3.14 KB
/
Makefile.watcom
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Duke3D Makefile for Watcom Make
SRC=source
OBJ=obj
EROOT=engine
EINC=$(EROOT)\include
ELIB=$(EROOT)\obj.watcom
INC=$(SRC)
o=obj
ENGINELIB=engine.lib
EDITORLIB=build.lib
!ifdef __LOADDLL__
! loaddll wcc386 wccd386
!endif
DXROOT=c:\sdks\directx\dx7
ENGINEOPTS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL -dDYNAMIC_OPENGL
CC=wcc386
CXX=wpp386
CFLAGS= -zq -5r -s -orb -fp5 -d2 -db &
-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
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)\gamedef.$o &
$(OBJ)\global.$o &
$(OBJ)\menues.$o &
$(OBJ)\player.$o &
$(OBJ)\premap.$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
# 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.$o:
wasm $(WASMFLAGS) -fo=$(OBJ)\.$o $[@
.c.$o:
$(CC) $(CFLAGS) -fo=$(OBJ)\.$o $[@
.cpp.$o:
$(CXX) $(CFLAGS) -fo=$(OBJ)\.$o $[@
.rc.res:
wrc -i=$(EINC) -i=$(SRC) -fo=$^*.res -r $[@
# TARGETS
all: duke3d$(EXESUFFIX) build$(EXESUFFIX) .SYMBOLIC
%null
duke3d$(EXESUFFIX): $(GAMEOBJS) $(OBJ)\gameres.res $(ELIB)\$(ENGINELIB)
wlink NAME $@ &
SYSTEM WIN95 &
DEBUG ALL &
FILE { $(GAMEOBJS) $(ENGINEOBJS) } &
RESOURCE $(OBJ)\gameres.res &
LIBPATH $(DXROOT)\lib &
LIBPATH $(ELIB) &
LIBRARY { $(ENGINELIB) $(LIBS) }
build$(EXESUFFIX): $(EDITOROBJS) $(OBJ)\buildres.res $(ELIB)\$(ENGINELIB) $(ELIB)\$(EDITORLIB)
wlink NAME $@ &
SYSTEM WIN95 &
DEBUG ALL &
FILE { $(EDITOROBJS) } &
RESOURCE $(OBJ)\buildres.res &
LIBPATH $(DXROOT)\lib &
LIBPATH $(ELIB) &
LIBRARY { $(LIBS) $(ENGINELIB) $(EDITORLIB) }
!include Makefile.deps
cwd=$+ $(%cwd) $-
enginelib editorlib: .SYMBOLIC
%write engineoverrides.makw CFLAGS=$(ENGINEOPTS)
cd $(EROOT)
wmake -f Makefile.watcom OVERRIDES=$(cwd)\engineoverrides.makw $@
cd $(cwd)
$(ELIB)\$(EDITORLIB): editorlib .SYMBOLIC
$(ELIB)\$(ENGINELIB): enginelib .SYMBOLIC
# PHONIES
clean: .SYMBOLIC
-del /q $(OBJ)\*
veryclean: clean .SYMBOLIC
-del /q duke3d$(EXESUFFIX) build$(EXESUFFIX)