forked from jonof/jfsw
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.watcom
204 lines (180 loc) · 4.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# Shadow Warrior Makefile for Watcom Make
SRC=src
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\dx81
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 $(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 &
$(OBJ)\animlib.$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)\actor.$o &
$(OBJ)\ai.$o &
$(OBJ)\anim.$o &
$(OBJ)\border.$o &
$(OBJ)\break.$o &
$(OBJ)\bunny.$o &
$(OBJ)\cache.$o &
$(OBJ)\cd.$o &
$(OBJ)\cheats.$o &
$(OBJ)\colormap.$o &
$(OBJ)\config.$o &
$(OBJ)\console.$o &
$(OBJ)\coolg.$o &
$(OBJ)\coolie.$o &
$(OBJ)\copysect.$o &
$(OBJ)\demo.$o &
$(OBJ)\draw.$o &
$(OBJ)\eel.$o &
$(OBJ)\game.$o &
$(OBJ)\girlninj.$o &
$(OBJ)\goro.$o &
$(OBJ)\hornet.$o &
$(OBJ)\interp.$o &
$(OBJ)\interpsh.$o &
$(OBJ)\inv.$o &
$(OBJ)\jplayer.$o &
$(OBJ)\jsector.$o &
$(OBJ)\jweapon.$o &
$(OBJ)\lava.$o &
$(OBJ)\light.$o &
$(OBJ)\mclip.$o &
$(OBJ)\menus.$o &
$(OBJ)\miscactr.$o &
$(OBJ)\morph.$o &
$(OBJ)\net.$o &
$(OBJ)\ninja.$o &
$(OBJ)\panel.$o &
$(OBJ)\player.$o &
$(OBJ)\predict.$o &
$(OBJ)\quake.$o &
$(OBJ)\ripper.$o &
$(OBJ)\ripper2.$o &
$(OBJ)\rooms.$o &
$(OBJ)\rotator.$o &
$(OBJ)\rts.$o &
$(OBJ)\save.$o &
$(OBJ)\scrip2.$o &
$(OBJ)\sector.$o &
$(OBJ)\serp.$o &
$(OBJ)\setup.$o &
$(OBJ)\skel.$o &
$(OBJ)\skull.$o &
$(OBJ)\slidor.$o &
$(OBJ)\sounds.$o &
$(OBJ)\spike.$o &
$(OBJ)\sprite.$o &
$(OBJ)\sumo.$o &
$(OBJ)\swconfig.$o &
$(OBJ)\sync.$o &
$(OBJ)\text.$o &
$(OBJ)\track.$o &
$(OBJ)\usrhooks.$o &
$(OBJ)\vator.$o &
$(OBJ)\vis.$o &
$(OBJ)\wallmove.$o &
$(OBJ)\warp.$o &
$(OBJ)\weapon.$o &
$(OBJ)\zilla.$o &
$(OBJ)\zombie.$o &
$(OBJ)\saveable.$o &
$(OBJ)\cda_win32.$o &
$(JMACTOBJ) &
$(JAUDIOLIBOBJ)
EDITOROBJS=$(OBJ)\jnstub.$o &
$(OBJ)\brooms.$o &
$(OBJ)\bldscript.$o &
$(OBJ)\jbhlp.$o &
$(OBJ)\colormap.$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 -i=$(EINC) -i=$(SRC) -fo=$^*.res -r $[@
# TARGETS
all: sw$(EXESUFFIX) build$(EXESUFFIX) .SYMBOLIC
%null
sw$(EXESUFFIX): $(GAMEOBJS) $(OBJ)\gameres.res $(ELIB)\$(ENGINELIB)
wlink NAME $@ &
SYSTEM WIN95 &
DEBUG ALL &
OPTION MAP &
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 { $(ENGINELIB) $(EDITORLIB) $(LIBS) }
!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)\*
cd $(EROOT)
wmake -f Makefile.watcom $@
cd $(cwd)
veryclean: clean .SYMBOLIC
-del /q sw$(EXESUFFIX) build$(EXESUFFIX)
cd $(EROOT)
wmake -f Makefile.watcom $@
cd $(cwd)