-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile.watcom
150 lines (126 loc) · 3.25 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
# 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
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)
LIBS=wsock32.lib dxguid.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_FX=$(OBJ)\mv_mix.$o &
$(OBJ)\mv_mix16.$o &
$(OBJ)\mvreverb.$o &
$(OBJ)\pitch.$o &
$(OBJ)\multivoc.$o &
$(OBJ)\openal.$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
GAMEOBJS=$(OBJ)\game.$o &
$(OBJ)\actors.$o &
$(OBJ)\anim.$o &
$(OBJ)\gamedef.$o &
$(OBJ)\gameexec.$o &
$(OBJ)\gamestructures.$o &
$(OBJ)\gamevars.$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
# 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: 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 /q $(OBJ)\* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
veryclean: clean .SYMBOLIC
-del /q $(EOBJ)\*