Subversion Repositories eduke32

Rev

Rev 163 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 Plagman 1
# EDuke32 Makefile for Watcom Make
2
 
3
SRC=source\
4
OBJ=obj\
5
EROOT=..\build\
6
EINC=$(EROOT)include\
7
EOBJ=eobj\
8
INC=$(SRC)
9
o=obj
10
 
11
ENGINELIB=engine.lib
12
EDITORLIB=build.lib
13
 
14
!ifdef __LOADDLL__
15
! loaddll wcc386 wccd386
16
!endif
17
 
18
DXROOT=c:\sdks\msc\dx7
19
 
163 terminx 20
ENGINEOPTS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL
5 Plagman 21
 
22
CC=wcc386
201 terminx 23
CXX=wpp386
24
CFLAGS= -zq -5r -s -orb -fp5 -d2 -db &
25
	-i=watcomhax -i=$(INC) -i=$(EINC) -i=$(SRC)jmact -i=$(SRC)jaudiolib -i=$(DXROOT)\include &
26
	-dRENDERTYPEWIN=1 -dNOCOPYPROTECT $(ENGINEOPTS) -i=..\jfaud\inc
27
LIBS=wsock32.lib dxguid.lib ..\jfaud\jfaud.lib winmm.lib #opengl32.lib
5 Plagman 28
WASMFLAGS=-d1
29
EXESUFFIX=.exe
30
 
31
JMACTOBJ=$(OBJ)util_lib.$o &
32
	$(OBJ)file_lib.$o &
33
	$(OBJ)control.$o &
34
	$(OBJ)keyboard.$o &
35
	$(OBJ)mouse.$o &
36
	$(OBJ)mathutil.$o &
37
	$(OBJ)scriplib.$o
38
 
201 terminx 39
JAUDIOLIB_FX_STUB=$(OBJ)jaudiolib_fxstub.$o
40
JAUDIOLIB_MUSIC_STUB=$(OBJ)jaudiolib_musicstub.$o
41
JAUDIOLIB_JFAUD=$(OBJ)jfaud_sounds.$o
5 Plagman 42
JAUDIOLIB_FX=$(OBJ)mv_mix.$o &
43
	  $(OBJ)mv_mix16.$o &
44
	  $(OBJ)mvreverb.$o &
45
	  $(OBJ)pitch.$o &
46
	  $(OBJ)multivoc.$o &
47
	  $(OBJ)ll_man.$o &
48
	  $(OBJ)fx_man.$o &
49
	  $(OBJ)dsoundout.$o
50
JAUDIOLIB_MUSIC=$(OBJ)midi.$o &
51
	  $(OBJ)mpu401.$o &
52
	  $(OBJ)music.$o
201 terminx 53
#JAUDIOLIBOBJ=$(JAUDIOLIB_MUSIC) $(JAUDIOLIB_FX) $(OBJ)sounds.$o
54
#JAUDIOLIBOBJ=$(JAUDIOLIB_MUSIC_STUB) $(JAUDIOLIB_FX_STUB) $(OBJ)sounds.$o
55
JAUDIOLIBOBJ=$(JAUDIOLIB_JFAUD)
5 Plagman 56
 
57
GAMEOBJS=$(OBJ)game.$o &
58
	$(OBJ)actors.$o &
59
	$(OBJ)anim.$o &
60
	$(OBJ)gamedef.$o &
61
	$(OBJ)gameexec.$o &
62
	$(OBJ)global.$o &
63
	$(OBJ)menus.$o &
64
	$(OBJ)namesdyn.$o &
65
	$(OBJ)player.$o &
66
	$(OBJ)premap.$o &
67
	$(OBJ)savegame.$o &
68
	$(OBJ)sector.$o &
69
	$(OBJ)rts.$o &
70
	$(OBJ)config.$o &
71
	$(OBJ)animlib.$o &
72
	$(OBJ)testcd.$o &
73
	$(OBJ)osdfuncs.$o &
74
	$(OBJ)osdcmds.$o &
75
	$(OBJ)winbits.$o &
201 terminx 76
	$(OBJ)startwin.game.$o &
5 Plagman 77
	$(JMACTOBJ) &
78
	$(JAUDIOLIBOBJ)
79
 
80
EDITOROBJS=$(OBJ)astub.$o
81
 
82
# RULES
83
.EXTENSIONS: .wasm .res .rc
84
 
85
.wasm:	$(SRC)
86
.wasm:	$(SRC)jaudiolib/
87
.c:	$(SRC)
201 terminx 88
.cpp:	$(SRC)
5 Plagman 89
.c:	$(SRC)jmact/
90
.c:	$(SRC)jaudiolib/
91
.c:	$(SRC)util/
92
.rc:	$(SRC)misc/
93
 
94
.wasm.$o:
95
	wasm $(WASMFLAGS) -fo=$(OBJ).$o $[@
96
 
97
.c.$o:
98
	$(CC) $(CFLAGS) -fo=$(OBJ).$o $[@
201 terminx 99
.cpp.$o:
100
	$(CXX) $(CFLAGS) -fo=$(OBJ).$o $[@
5 Plagman 101
 
102
.rc.res:
201 terminx 103
	wrc -i=$(EINC) -i=$(SRC) -fo=$^*.res -r $[@
5 Plagman 104
 
105
 
106
# TARGETS
107
all: eduke32$(EXESUFFIX) build$(EXESUFFIX) .SYMBOLIC
108
	%null
109
 
110
eduke32$(EXESUFFIX): $(GAMEOBJS) $(OBJ)gameres.res $(EOBJ)$(ENGINELIB)
111
	wlink	NAME     $@ &
112
		SYSTEM   WIN95 &
113
		DEBUG    ALL &
114
		FILE     { $(GAMEOBJS) $(ENGINEOBJS) } &
115
		RESOURCE $(OBJ)gameres.res &
116
		LIBPATH  $(DXROOT)\lib &
117
		LIBPATH  $(EOBJ) &
118
		LIBRARY  { $(ENGINELIB) $(LIBS) }
119
 
120
mapster32$(EXESUFFIX): $(EDITOROBJS) $(OBJ)buildres.res $(EOBJ)$(ENGINELIB) $(EOBJ)$(EDITORLIB)
121
	wlink	NAME     $@ &
122
		SYSTEM   WIN95 &
123
		DEBUG    ALL &
124
		FILE     { $(EDITOROBJS) } &
125
		RESOURCE $(OBJ)buildres.res &
126
		LIBPATH  $(DXROOT)\lib &
127
		LIBPATH  $(EOBJ) &
128
		LIBRARY  { $(LIBS) $(ENGINELIB) $(EDITORLIB) }
129
 
130
!include Makefile.deps
131
 
132
cwd=$+ $(%cwd) $-
133
enginelib editorlib: .SYMBOLIC
134
	-mkdir $(EOBJ)
135
	%write $(EOBJ)overrides.mak OBJ=$(cwd)\$(EOBJ)
136
	%write $(EOBJ)overrides.mak CFLAGS=$(ENGINEOPTS)
137
	cd $(EROOT)
138
	wmake -f Makefile.watcom OVERRIDES=$(cwd)\$(EOBJ)overrides.mak $@
139
	cd $(cwd)
140
 
141
$(EOBJ)$(EDITORLIB): editorlib .SYMBOLIC
142
$(EOBJ)$(ENGINELIB): enginelib .SYMBOLIC
143
 
144
# PHONIES
145
clean: .SYMBOLIC
146
	-del $(OBJ)* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
147
 
148
veryclean: clean .SYMBOLIC
149
	-del $(EOBJ)*