Subversion Repositories eduke32

Rev

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

Rev Author Line No. Line
996 terminx 1
#
5 Plagman 2
# EDuke32 Makefile for GNU Make
996 terminx 3
#
5 Plagman 4
 
1739 helixhorne 5
include Makefile.common
996 terminx 6
 
4543 hendricks2 7
DUKE3D_SRC=source
8
DUKE3D_INC=$(DUKE3D_SRC)
9
DUKE3D_RSRC=rsrc
10
ENGINE_ROOT=build
11
ENGINE_SRC=$(ENGINE_ROOT)/src
12
ENGINE_INC=$(ENGINE_ROOT)/include
5 Plagman 13
o=o
4543 hendricks2 14
asm=nasm
4553 hendricks2 15
obj=obj
5 Plagman 16
 
4555 hendricks2 17
COMPILERFLAGS += -I$(ENGINE_INC) -I$(DUKE3D_SRC)/jmact -I$(AUDIOLIB_ROOT)/include -I$(ENET_ROOT)/include
4543 hendricks2 18
 
4555 hendricks2 19
 
20
# EBacktrace
21
 
22
ifndef EBACKTRACEDLL
23
    EBACKTRACEDLL = ebacktrace1.dll
24
    ifeq ($(findstring x86_64,$(COMPILERTARGET)),x86_64)
25
        EBACKTRACEDLL = ebacktrace1-64.dll
26
    endif
27
endif
28
EBACKTRACEDLL_TARGET:=$(EBACKTRACEDLL)
29
 
30
 
4543 hendricks2 31
# BUILD Engine
32
 
33
ENGINE_CFLAGS=-I$(ENGINE_SRC)
34
UTIL_LIBS= -lm # -lpthread
35
 
4553 hendricks2 36
ENGINE_OBJ=$(ENGINE_ROOT)/$(obj)
4543 hendricks2 37
 
4883 hendricks2 38
ENGINE_OBJS=baselayer cache1d common compat crc32 defs engine polymost texcache dxtfilter hightile textfont smalltextfont kplib lz4 osd pragmas scriptfile mmulti_null mutex xxhash md4
4543 hendricks2 39
ENGINE_EDITOR_OBJS=build config defs
40
ifeq (0,$(NOASM))
41
  ENGINE_OBJS+= a
42
else
43
  ENGINE_OBJS+= a-c
44
  ifneq (0,$(USE_ASM64))
45
    ENGINE_OBJS+= a64
46
  endif
47
endif
48
ifeq (1,$(USE_OPENGL))
4639 terminx 49
    ENGINE_OBJS+= glbuild voxmodel mdsprite
4543 hendricks2 50
    ifeq (1,$(POLYMER))
51
        ENGINE_OBJS+= polymer
52
    endif
53
endif
4591 helixhorne 54
ifneq (0,$(LUNATIC))
4543 hendricks2 55
    ENGINE_OBJS+= lunatic
56
endif
57
ifeq ($(PLATFORM),DARWIN)
58
    ENGINE_OBJS += osxbits
59
    ifneq (0,$(OSX_STARTUPWINDOW))
60
        ENGINE_EDITOR_OBJS += startosx.editor
61
    endif
62
    ifeq (1,$(SDL_FRAMEWORK))
63
        ENGINE_OBJS+=SDLMain
64
    endif
65
endif
66
ifeq ($(PLATFORM),WINDOWS)
67
    ENGINE_OBJS+= winbits
68
    ENGINE_EDITOR_OBJS+= startwin.editor
69
endif
4820 hendricks2 70
ifeq ($(PLATFORM),WII)
71
    ENGINE_OBJS+= wiibits
4821 hendricks2 72
    LINKERFLAGS+= -Wl,-wrap,c_default_exceptionhandler
4820 hendricks2 73
endif
4543 hendricks2 74
ifeq ($(RENDERTYPE),SDL)
75
    ENGINE_OBJS+= sdlayer
76
 
77
    ifeq (1,$(HAVE_GTK2))
78
        ENGINE_OBJS+= gtkbits
79
        ifeq ($(LINKED_GTK),0)
80
            ENGINE_OBJS+= dynamicgtk
81
        endif
82
        ENGINE_EDITOR_OBJS+= startgtk.editor
83
    endif
84
endif
85
ifeq ($(RENDERTYPE),WIN)
86
    ENGINE_OBJS+= winlayer rawinput
87
endif
88
 
89
ENGINE_OBJS_EXP:=$(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(ENGINE_OBJS)))
90
ENGINE_EDITOR_OBJS_EXP:=$(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(ENGINE_EDITOR_OBJS)))
91
 
92
 
4555 hendricks2 93
# MACT
94
 
95
MACT_OBJ=file_lib control keyboard mouse joystick mathutil scriplib animlib
96
 
97
 
4543 hendricks2 98
# AudioLib
99
 
100
AUDIOLIB_OBJS=drivers fx_man multivoc mix mixst pitch formats vorbis flac xa driver_nosound
101
 
102
AUDIOLIB_ROOT=$(DUKE3D_SRC)/jaudiolib
103
AUDIOLIB_SRC=$(AUDIOLIB_ROOT)/src
104
AUDIOLIB_INC=$(AUDIOLIB_ROOT)/include
4553 hendricks2 105
AUDIOLIB_OBJ=$(AUDIOLIB_ROOT)/$(obj)
4543 hendricks2 106
 
4713 terminx 107
AUDIOLIB_CFLAGS=-I$(AUDIOLIB_ROOT)/third-party/common/include
4543 hendricks2 108
 
109
ifeq ($(PLATFORM),WINDOWS)
110
    ifeq ($(MIXERTYPE),WIN)
111
        AUDIOLIB_CFLAGS+= -DHAVE_DS
112
        AUDIOLIB_OBJS+= driver_directsound
113
    endif
114
endif
115
 
116
ifeq ($(MIXERTYPE),SDL)
117
    AUDIOLIB_CFLAGS+= -DHAVE_SDL
118
    ifneq ($(PLATFORM),DARWIN)
119
        ifneq ($(PLATFORM),WINDOWS)
120
            ifneq ($(PLATFORM),WII)
121
                AUDIOLIB_CFLAGS+=`pkg-config --cflags vorbis`
122
            endif
123
        endif
124
    endif
125
    AUDIOLIB_OBJS+= driver_sdl
126
endif
127
 
128
AUDIOLIB_OBJS_EXP:=$(addprefix $(AUDIOLIB_OBJ)/,$(addsuffix .$o,$(AUDIOLIB_OBJS)))
129
 
130
 
131
# ENet
132
 
133
ENET_OBJS=callbacks host list packet peer protocol compress
134
 
135
ENET_ROOT=$(DUKE3D_SRC)/enet
136
ENET_SRC=$(ENET_ROOT)/src
137
ENET_INC=$(ENET_ROOT)/include
4553 hendricks2 138
ENET_OBJ=$(ENET_ROOT)/$(obj)
139
 
4543 hendricks2 140
ENET_CFLAGS=
141
 
142
ifeq ($(PLATFORM),WINDOWS)
143
    ENET_OBJS += win32
144
else
145
    ENET_OBJS += unix
146
    ENET_CFLAGS += -DHAS_SOCKLEN_T
147
endif
148
 
149
ENET_OBJS_EXP:=$(addprefix $(ENET_OBJ)/,$(addsuffix .$o,$(ENET_OBJS)))
150
 
4555 hendricks2 151
ifeq ($(NETCODE),0)
152
    ENET_TARGET=
153
else
154
    ENET_TARGET=$(ENET_OBJS_EXP)
155
endif
4543 hendricks2 156
 
4555 hendricks2 157
 
4543 hendricks2 158
# Tools
159
 
160
UTIL_OBJS=compat pragmas kplib cache1d compat_tools
161
UTILS=kextract kgroup transpal wad2art wad2map kmd2tool md2tool generateicon cacheinfo arttool givedepth mkpalette unpackssi bsuite
162
GAMEUTILS=ivfrate
163
DXUTILS=enumdisplay getdxdidf
164
SDLUTILS=makesdlkeytrans
165
 
166
UTIL_OBJS_EXP:=$(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(UTIL_OBJS)))
167
 
168
 
4555 hendricks2 169
# KenBuild (Test Game)
4543 hendricks2 170
 
4555 hendricks2 171
TESTGAME_ROOT=$(DUKE3D_SRC)/testgame
172
TESTGAME_SRC=$(TESTGAME_ROOT)/src
173
TESTGAME_RSRC=$(TESTGAME_ROOT)/rsrc
174
TESTGAME_OBJ=$(TESTGAME_ROOT)/$(obj)
175
 
176
TEST_CFLAGS=-I$(TESTGAME_SRC)
177
 
4824 hendricks2 178
TESTGAME ?= testgame
179
TESTEDITOR ?= testeditor
4555 hendricks2 180
 
4824 hendricks2 181
TESTGAME_TARGET:=$(TESTGAME)$(EXESUFFIX)
182
TESTEDITOR_TARGET:=$(TESTEDITOR)$(EXESUFFIX)
4555 hendricks2 183
 
184
TESTGAME_OBJS=game sound_stub common config
185
TESTEDITOR_OBJS=bstub common
186
 
187
ifeq ($(RENDERTYPE),SDL)
188
	ifeq (1,$(HAVE_GTK2))
189
		TESTGAME_OBJS+= game_banner startgtk.game
4770 hendricks2 190
		TESTEDITOR_OBJS+= build_banner
4555 hendricks2 191
	endif
192
 
193
	TESTGAME_OBJS+= game_icon
194
	TESTEDITOR_OBJS+= build_icon
5 Plagman 195
endif
4555 hendricks2 196
ifeq ($(PLATFORM),WINDOWS)
197
	TESTGAME_OBJS+= gameres startwin.game
198
	TESTEDITOR_OBJS+= buildres
199
endif
5 Plagman 200
 
4555 hendricks2 201
TESTGAME_OBJS_EXP:=$(addprefix $(TESTGAME_OBJ)/,$(addsuffix .$o,$(TESTGAME_OBJS)))
202
TESTEDITOR_OBJS_EXP:=$(addprefix $(TESTGAME_OBJ)/,$(addsuffix .$o,$(TESTEDITOR_OBJS)))
1739 helixhorne 203
 
4555 hendricks2 204
 
205
# Duke Nukem 3D
206
 
207
DUKE3D_CFLAGS=-I$(DUKE3D_INC)
208
 
4543 hendricks2 209
DUKE3D_LINKERFLAGS=
210
DUKE3D_EDITOR_LINKERFLAGS=
1739 helixhorne 211
 
4553 hendricks2 212
DUKE3D_OBJ=$(DUKE3D_SRC)/$(obj)
3219 hendricks2 213
 
4824 hendricks2 214
EDUKE32 ?= eduke32
215
MAPSTER32 ?= mapster32
3096 hendricks2 216
 
4824 hendricks2 217
EDUKE32_TARGET:=$(EDUKE32)$(EXESUFFIX)
218
MAPSTER32_TARGET:=$(MAPSTER32)$(EXESUFFIX)
3096 hendricks2 219
 
4559 hendricks2 220
COMMON_OBJS=rev
4561 hendricks2 221
COMMON_EDITOR_OBJS=m32common m32def m32exec m32vars mathutil rev
3096 hendricks2 222
 
4987 terminx 223
DUKE3D_OBJS=game global actors gamedef gameexec gamevars player premap sector anim animsounds common config demo input menus namesdyn net savegame rts osdfuncs osdcmds grpscan sounds soundsdyn $(MACT_OBJ)
4559 hendricks2 224
DUKE3D_EDITOR_OBJS=astub common grpscan sounds_mapster32
5 Plagman 225
 
1933 helixhorne 226
ifneq ($(USE_LIBVPX),0)
4543 hendricks2 227
    DUKE3D_OBJS+= animvpx
1933 helixhorne 228
endif
2034 helixhorne 229
 
3116 hendricks2 230
ifneq (0,$(DISABLEINLINING))
4543 hendricks2 231
    DUKE3D_OBJS+= game_inline actors_inline sector_inline
3116 hendricks2 232
endif
233
 
4543 hendricks2 234
DUKE3D_MISCDEPS=
235
DUKE3D_EDITOR_MISCDEPS=
2143 helixhorne 236
 
4591 helixhorne 237
# Lunatic object base names. These are not used in targets directly.
238
LUNATIC_COMMON_OBJS = luaJIT_BC_defs_common luaJIT_BC_engine_maptext luaJIT_BC_engine luaJIT_BC_bcarray luaJIT_BC_bcheck luaJIT_BC_bitar luaJIT_BC_xmath luaJIT_BC_v luaJIT_BC_dump luaJIT_BC_dis_x86 luaJIT_BC_dis_x64
239
LUNATIC_GAME_OBJS = luaJIT_BC_con_lang luaJIT_BC_lunacon luaJIT_BC_randgen luaJIT_BC_stat luaJIT_BC_control luaJIT_BC_defs luaJIT_BC_savegame luaJIT_BC_fs
2148 helixhorne 240
 
2143 helixhorne 241
## Lunatic devel
2034 helixhorne 242
ifneq (0,$(LUNATIC))
4237 helixhorne 243
    # TODO: remove debugging modules from release build
244
 
4543 hendricks2 245
    DUKE3D_EDITOR_OBJS+= lunatic_m32 $(LUNATIC_COMMON_OBJS)
246
    DUKE3D_OBJS+= lunatic_game $(LUNATIC_COMMON_OBJS)
2143 helixhorne 247
 
4543 hendricks2 248
    DUKE3D_EDITOR_OBJS+= luaJIT_BC_defs_m32
4237 helixhorne 249
 
3938 helixhorne 250
    ifneq ($(PLATFORM),WINDOWS)
251
        # On non-Windows, we expect to have liblpeg.a (or a symlink to it) in source/.
4319 hendricks2 252
        # On Windows, it will reside in platform/Windows/lib/32/ or lib/64/.
4553 hendricks2 253
        LIBDIRS+= -L$(DUKE3D_SRC)
4543 hendricks2 254
        ifeq ($(realpath $(DUKE3D_SRC)/liblpeg.a),)
3938 helixhorne 255
            # XXX: This cripples "make clean" etc. too, but IMO it's better than warning.
4543 hendricks2 256
            $(error "liblpeg.a not found in $(realpath $(DUKE3D_OBJ)/..)")
3938 helixhorne 257
        endif
258
    endif
259
    LIBS+= -llpeg
4591 helixhorne 260
    DUKE3D_OBJS+= $(LUNATIC_GAME_OBJS)
2650 helixhorne 261
 
2143 helixhorne 262
    # now, take care of having the necessary symbols (sector, wall, etc.) in the
263
    # executable no matter what the debugging level
264
 
2074 helixhorne 265
    ifeq ($(PLATFORM),DARWIN)
2143 helixhorne 266
        # strip on OSX says: removing global symbols from a final linked no longer supported.
267
        #                    Use -exported_symbols_list at link time when building
268
        # But, following _their_ directions does not give us the symbols! wtf?
3422 helixhorne 269
        ifneq ($(STRIP),0)
4543 hendricks2 270
            STRIP+= -s $(DUKE3D_SRC)/lunatic/dynsymlist_osx
3422 helixhorne 271
        endif
2143 helixhorne 272
 
4543 hendricks2 273
        DUKE3D_MISCDEPS+= $(DUKE3D_SRC)/lunatic/dynsymlist_osx
274
        LINKERFLAGS+= -pagezero_size 10000 -image_base 100000000 #-Wl,-alias_list -Wl,$(DUKE3D_SRC)/lunatic/aliases_list #-exported_symbols_list $(DUKE3D_SRC)/lunatic/dynsymlist_osx
2143 helixhorne 275
    endif
276
    ifeq ($(PLATFORM),WINDOWS)
3423 helixhorne 277
        override STRIP=
4543 hendricks2 278
        DUKE3D_MISCDEPS+= $(DUKE3D_SRC)/lunatic/eduke32.def
279
        DUKE3D_LINKERFLAGS+= $(DUKE3D_SRC)/lunatic/eduke32.def
280
        DUKE3D_EDITOR_MISCDEPS+= $(DUKE3D_SRC)/lunatic/mapster32.def
281
        DUKE3D_EDITOR_LINKERFLAGS+= $(DUKE3D_SRC)/lunatic/mapster32.def
2143 helixhorne 282
    endif
3272 hendricks2 283
    ifeq ($(SUBPLATFORM),LINUX)
3423 helixhorne 284
        override STRIP=
4543 hendricks2 285
        DUKE3D_LINKERFLAGS+= -Wl,--dynamic-list=$(DUKE3D_SRC)/lunatic/dynsymlist
286
        DUKE3D_EDITOR_LINKERFLAGS+= -Wl,--dynamic-list=$(DUKE3D_SRC)/lunatic/dynsymlist_m32
2074 helixhorne 287
    endif
2034 helixhorne 288
endif
289
 
3272 hendricks2 290
ifeq ($(SUBPLATFORM),LINUX)
5037 hendricks2 291
    LIBS += -lFLAC -lvorbisfile -lvorbis -logg
996 terminx 292
endif
293
 
5037 hendricks2 294
ifeq ($(PLATFORM),BSD)
295
    LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lexecinfo
296
endif
297
 
996 terminx 298
ifeq ($(PLATFORM),DARWIN)
4646 hendricks2 299
    # LIBDIRS += -L$(AUDIOLIB_ROOT)/third-party/Apple/lib
2537 hendricks2 300
 
4543 hendricks2 301
    LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lm \
302
            -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,OpenGL \
303
            -Wl,-framework,CoreMidi -Wl,-framework,AudioUnit \
4548 hendricks2 304
            -Wl,-framework,AudioToolbox -Wl,-framework,IOKit -Wl,-framework,AGL
305
    ifneq (00,$(DARWIN9)$(DARWIN10))
306
        LIBS += -Wl,-framework,QuickTime -lm
307
    endif
2537 hendricks2 308
 
2426 hendricks2 309
    ifneq (0,$(OSX_STARTUPWINDOW))
4543 hendricks2 310
        DUKE3D_OBJS += GrpFile.game GameListSource.game startosx.game
2426 hendricks2 311
    endif
996 terminx 312
endif
313
 
5 Plagman 314
ifeq ($(PLATFORM),WINDOWS)
4543 hendricks2 315
    LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lcompat-from-mingw-w64
4553 hendricks2 316
    LIBDIRS += -L$(AUDIOLIB_ROOT)/third-party/Windows/lib$(WINLIB)
4543 hendricks2 317
    DUKE3D_OBJS+= gameres winbits startwin.game
318
    DUKE3D_EDITOR_OBJS+= buildres
4084 hendricks2 319
    ifeq ($(MIXERTYPE),WIN)
3219 hendricks2 320
        LIBS+= -ldsound
4543 hendricks2 321
        DUKE3D_OBJS+= music midi mpu401
3219 hendricks2 322
    endif
323
endif
4543 hendricks2 324
 
325
ifeq ($(PLATFORM),WII)
326
    LIBS += -lvorbisidec
327
endif
328
 
3219 hendricks2 329
ifeq ($(RENDERTYPE),SDL)
4084 hendricks2 330
    ifeq (1,$(HAVE_GTK2))
4543 hendricks2 331
        DUKE3D_OBJS+= game_banner startgtk.game
4770 hendricks2 332
        DUKE3D_EDITOR_OBJS+= build_banner
4084 hendricks2 333
    endif
334
 
4543 hendricks2 335
    DUKE3D_OBJS+= game_icon
336
    DUKE3D_EDITOR_OBJS+= build_icon
4084 hendricks2 337
endif
338
ifeq ($(MIXERTYPE),SDL)
4543 hendricks2 339
    DUKE3D_OBJS+= sdlmusic
5 Plagman 340
endif
341
 
4591 helixhorne 342
## Construct file names of object files
1473 terminx 343
 
4555 hendricks2 344
COMMON_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(COMMON_OBJS)))
345
COMMON_EDITOR_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(COMMON_EDITOR_OBJS)))
346
 
4543 hendricks2 347
DUKE3D_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_OBJS)))
348
DUKE3D_EDITOR_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_EDITOR_OBJS)))
5 Plagman 349
 
1595 helixhorne 350
 
1103 terminx 351
ifeq ($(PRETTY_OUTPUT),1)
1101 terminx 352
.SILENT:
1103 terminx 353
endif
4565 hendricks2 354
.PHONY: veryclean clean all test cleanutils utils dxutils sdlutils printutils printsdlutils printdxutils rev $(DUKE3D_OBJ)/rev.$o
5 Plagman 355
 
356
# TARGETS
357
 
4565 hendricks2 358
all: start $(EDUKE32_TARGET) $(MAPSTER32_TARGET) finish
2685 hendricks2 359
ifneq (,$(EDUKE32_TARGET))
4824 hendricks2 360
	@ls -l $(EDUKE32)$(EXESUFFIX)
2685 hendricks2 361
endif
362
ifneq (,$(MAPSTER32_TARGET))
4824 hendricks2 363
	@ls -l $(MAPSTER32)$(EXESUFFIX)
2685 hendricks2 364
endif
3236 hendricks2 365
 
4555 hendricks2 366
test: start $(TESTGAME_TARGET) $(TESTEDITOR_TARGET) finish
367
ifneq (,$(TESTGAME_TARGET))
4824 hendricks2 368
	@ls -l $(TESTGAME)$(EXESUFFIX)
4555 hendricks2 369
endif
370
ifneq (,$(TESTEDITOR_TARGET))
4824 hendricks2 371
	@ls -l $(TESTEDITOR)$(EXESUFFIX)
4555 hendricks2 372
endif
373
 
3236 hendricks2 374
ebacktrace: start $(EBACKTRACEDLL_TARGET) finish
3163 hendricks2 375
ifneq (,$(EBACKTRACEDLL_TARGET))
376
	@ls -l $(EBACKTRACEDLL)
377
endif
1101 terminx 378
 
3163 hendricks2 379
start:
1102 terminx 380
	$(BUILD_STARTED)
1595 helixhorne 381
 
3163 hendricks2 382
finish:
383
	$(BUILD_FINISHED)
3096 hendricks2 384
 
4543 hendricks2 385
utils: $(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS))
386
	@ls -l $^
3163 hendricks2 387
 
4543 hendricks2 388
dxutils: $(addsuffix $(EXESUFFIX),$(DXUTILS))
389
	@ls -l $^
390
 
391
sdlutils: $(addsuffix $(EXESUFFIX),$(SDLUTILS))
392
	@ls -l $^
393
 
4824 hendricks2 394
ifeq ($(PLATFORM),WII)
395
ifneq ($(ELF2DOL),)
396
$(TESTGAME)$(DOLSUFFIX): $(TESTGAME)$(EXESUFFIX)
397
$(TESTEDITOR)$(DOLSUFFIX): $(TESTEDITOR)$(EXESUFFIX)
398
$(EDUKE32)$(DOLSUFFIX): $(EDUKE32)$(EXESUFFIX)
399
$(MAPSTER32)$(DOLSUFFIX): $(MAPSTER32)$(EXESUFFIX)
400
endif
401
endif
402
 
403
$(TESTGAME)$(EXESUFFIX): $(TESTGAME_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP)
1102 terminx 404
	$(LINK_STATUS)
4555 hendricks2 405
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
4824 hendricks2 406
ifeq ($(PLATFORM),WII)
407
ifneq ($(ELF2DOL),)
408
	$(ELF2DOL) $(TESTGAME)$(EXESUFFIX) $(TESTGAME)$(DOLSUFFIX)
409
endif
410
endif
4555 hendricks2 411
ifneq ($(STRIP),)
4824 hendricks2 412
	$(STRIP) $(TESTGAME)$(EXESUFFIX)
4555 hendricks2 413
endif
414
 
4824 hendricks2 415
$(TESTEDITOR)$(EXESUFFIX): $(TESTEDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP)
4555 hendricks2 416
	$(LINK_STATUS)
417
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
4824 hendricks2 418
ifeq ($(PLATFORM),WII)
419
ifneq ($(ELF2DOL),)
420
	$(ELF2DOL) $(TESTEDITOR)$(EXESUFFIX) $(TESTEDITOR)$(DOLSUFFIX)
421
endif
422
endif
4555 hendricks2 423
ifneq ($(STRIP),)
4824 hendricks2 424
	$(STRIP) $(TESTEDITOR)$(EXESUFFIX)
4555 hendricks2 425
endif
426
 
4824 hendricks2 427
$(EDUKE32)$(EXESUFFIX): $(DUKE3D_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_TARGET) $(DUKE3D_MISCDEPS)
4555 hendricks2 428
	$(LINK_STATUS)
4543 hendricks2 429
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
4824 hendricks2 430
ifeq ($(PLATFORM),WII)
431
ifneq ($(ELF2DOL),)
432
	$(ELF2DOL) $(EDUKE32)$(EXESUFFIX) $(EDUKE32)$(DOLSUFFIX)
433
endif
434
endif
3422 helixhorne 435
ifneq ($(STRIP),)
4824 hendricks2 436
	$(STRIP) $(EDUKE32)$(EXESUFFIX)
1101 terminx 437
endif
2385 hendricks2 438
ifeq ($(PLATFORM),DARWIN)
3551 terminx 439
	cp -RPf "platform/Apple/bundles/EDuke32.app" "./"
2388 helixhorne 440
	mkdir -p "EDuke32.app/Contents/MacOS"
4824 hendricks2 441
	cp -f "$(EDUKE32)$(EXESUFFIX)" "EDuke32.app/Contents/MacOS/"
2385 hendricks2 442
endif
1595 helixhorne 443
 
4824 hendricks2 444
$(MAPSTER32)$(EXESUFFIX): $(DUKE3D_EDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(DUKE3D_EDITOR_MISCDEPS)
1102 terminx 445
	$(LINK_STATUS)
4543 hendricks2 446
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_EDITOR_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
4824 hendricks2 447
ifeq ($(PLATFORM),WII)
448
ifneq ($(ELF2DOL),)
449
	$(ELF2DOL) $(MAPSTER32)$(EXESUFFIX) $(MAPSTER32)$(DOLSUFFIX)
450
endif
451
endif
3422 helixhorne 452
ifneq ($(STRIP),)
4824 hendricks2 453
	$(STRIP) $(MAPSTER32)$(EXESUFFIX)
1693 helixhorne 454
endif
2385 hendricks2 455
ifeq ($(PLATFORM),DARWIN)
3551 terminx 456
	cp -RPf "platform/Apple/bundles/Mapster32.app" "./"
2388 helixhorne 457
	mkdir -p "Mapster32.app/Contents/MacOS"
4824 hendricks2 458
	cp -f "$(MAPSTER32)$(EXESUFFIX)" "Mapster32.app/Contents/MacOS/"
2385 hendricks2 459
endif
5 Plagman 460
 
461
include Makefile.deps
4543 hendricks2 462
include $(ENGINE_ROOT)/Makefile.deps
5 Plagman 463
 
464
# RULES
3057 helixhorne 465
 
3551 terminx 466
$(EBACKTRACEDLL): platform/Windows/src/backtrace.c
3163 hendricks2 467
	$(COMPILE_STATUS)
4543 hendricks2 468
	$(RECIPE_IF) $(CC) $(CONLYFLAGS) -O2 -ggdb -shared -Wall -Wextra -static-libgcc -I$(ENGINE_INC) -o $@ $^ -lbfd -liberty -limagehlp $(RECIPE_RESULT_COMPILE)
2037 helixhorne 469
 
4543 hendricks2 470
libcache1d$(DLLSUFFIX): $(ENGINE_SRC)/cache1d.c
1102 terminx 471
	$(COMPILE_STATUS)
4543 hendricks2 472
	$(RECIPE_IF) $(COMPILER) -Wall -Wextra -DCACHE1D_COMPRESS_ONLY -shared -fPIC $< -o $@ $(RECIPE_RESULT_COMPILE)
1693 helixhorne 473
 
4543 hendricks2 474
%$(EXESUFFIX): $(ENGINE_OBJ)/%.$o $(UTIL_OBJS_EXP)
475
	$(ONESTEP_STATUS)
476
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) $(RECIPE_RESULT_ONESTEP)
1101 terminx 477
 
4543 hendricks2 478
%$(EXESUFFIX): $(DUKE3D_OBJ)/%.$o
479
	$(ONESTEP_STATUS)
480
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) $(RECIPE_RESULT_ONESTEP)
4194 helixhorne 481
 
4543 hendricks2 482
enumdisplay$(EXESUFFIX): $(ENGINE_OBJ)/enumdisplay.$o
483
	$(ONESTEP_STATUS)
484
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) -lgdi32 $(RECIPE_RESULT_ONESTEP)
485
getdxdidf$(EXESUFFIX): $(ENGINE_OBJ)/getdxdidf.$o
486
	$(ONESTEP_STATUS)
487
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) -ldinput $(RECIPE_RESULT_ONESTEP)
488
makesdlkeytrans$(EXESUFFIX): $(ENGINE_OBJ)/makesdlkeytrans.$o
489
	$(ONESTEP_STATUS)
490
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) $(SDL_INCLUDES) $(RECIPE_RESULT_ONESTEP)
491
arttool$(EXESUFFIX): $(ENGINE_OBJ)/arttool.$o
492
	$(ONESTEP_STATUS)
4547 hendricks2 493
	$(RECIPE_IF) $(L_CXX) $(CPPONLYFLAGS) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB) $(UTIL_LIBS) $(RECIPE_RESULT_ONESTEP)
4194 helixhorne 494
 
3057 helixhorne 495
#### Lunatic
496
 
2650 helixhorne 497
# Create object files directly with luajit
4543 hendricks2 498
$(DUKE3D_OBJ)/luaJIT_BC_%.$o: source/lunatic/%.lua
2650 helixhorne 499
	$(COMPILE_STATUS)
4543 hendricks2 500
	$(RECIPE_IF) $(LUAJIT) -bg $(LUAJIT_BCOPTS) $< $@ $(RECIPE_RESULT_COMPILE)
2650 helixhorne 501
 
4238 helixhorne 502
# Same thing for defs*.ilua which I'm too reluctant to rename now:
4000 helixhorne 503
# NOTE: The target path must match EXACTLY with that of the DEFS_BC_SIZE
504
# determination in Makefile.common, because it is embedded into the bytecode as
505
# debugging information.
4543 hendricks2 506
$(DUKE3D_OBJ)/luaJIT_BC_%.$o: source/lunatic/%.ilua
507
	$(RECIPE_IF) $(LUAJIT) -bg $(LUAJIT_BCOPTS) $< $@ $(RECIPE_RESULT_COMPILE)
3517 helixhorne 508
 
4543 hendricks2 509
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/lunatic/%.c
2034 helixhorne 510
	$(COMPILE_STATUS)
4555 hendricks2 511
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
2034 helixhorne 512
 
3057 helixhorne 513
# TODO: _m32
514
# List of exported symbols, OS X
4543 hendricks2 515
$(DUKE3D_SRC)/lunatic/dynsymlist_osx: $(DUKE3D_SRC)/lunatic/dynsymlist
2074 helixhorne 516
	sed 's/[{};]//g;s/[A-Za-z_][A-Za-z_0-9]*/_&/g' $< > $@
517
 
4543 hendricks2 518
#$(DUKE3D_SRC)/lunatic/aliases_list: $(DUKE3D_SRC)/lunatic/dynsymlist_osx
3057 helixhorne 519
#	sed 's/_\([A-Za-z_][A-Za-z_0-9]*\)/_\1 \1/g' $< > $@
2074 helixhorne 520
 
3057 helixhorne 521
# List of exported symbols, Windows
4543 hendricks2 522
$(DUKE3D_SRC)/lunatic/eduke32.def: $(DUKE3D_SRC)/lunatic/dynsymlist
2143 helixhorne 523
	echo EXPORTS > $@
524
	sed 's/[{};]//g' $< >> $@
525
 
4543 hendricks2 526
$(DUKE3D_SRC)/lunatic/mapster32.def: $(DUKE3D_SRC)/lunatic/dynsymlist_m32
3248 helixhorne 527
	echo EXPORTS > $@
528
	sed 's/[{};]//g' $< >> $@
529
 
3057 helixhorne 530
####
531
 
4553 hendricks2 532
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.nasm | $(ENGINE_OBJ)
1905 helixhorne 533
	$(COMPILE_STATUS)
4543 hendricks2 534
	$(RECIPE_IF) $(AS) $(ASFLAGS) $< -o $@ $(RECIPE_RESULT_COMPILE)
1905 helixhorne 535
 
4553 hendricks2 536
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.yasm | $(ENGINE_OBJ)
3334 hendricks2 537
	$(COMPILE_STATUS)
4543 hendricks2 538
	$(RECIPE_IF) $(AS) $(ASFLAGS) $< -o $@ $(RECIPE_RESULT_COMPILE)
3334 hendricks2 539
 
4543 hendricks2 540
# Comment out the following rule to debug a-c.o
4553 hendricks2 541
$(ENGINE_OBJ)/a-c.$o: $(ENGINE_SRC)/a-c.c | $(ENGINE_OBJ)
2458 hendricks2 542
	$(COMPILE_STATUS)
4543 hendricks2 543
	$(RECIPE_IF) $(COMPILER) $(subst -O$(OPTLEVEL),-O2,$(subst $(CLANG_DEBUG_FLAGS),,$(COMMONFLAGS) $(COMPILERFLAGS))) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
2458 hendricks2 544
 
4553 hendricks2 545
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.c | $(ENGINE_OBJ)
1102 terminx 546
	$(COMPILE_STATUS)
4543 hendricks2 547
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
1101 terminx 548
 
4553 hendricks2 549
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.m | $(ENGINE_OBJ)
1102 terminx 550
	$(COMPILE_STATUS)
4644 hendricks2 551
	$(RECIPE_IF) $(COMPILER_OBJC) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
220 terminx 552
 
4553 hendricks2 553
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.cpp | $(ENGINE_OBJ)
1102 terminx 554
	$(COMPILE_STATUS)
4547 hendricks2 555
	$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
220 terminx 556
 
4553 hendricks2 557
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/misc/%.c | $(ENGINE_OBJ)
1102 terminx 558
	$(COMPILE_STATUS)
4543 hendricks2 559
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
1595 helixhorne 560
 
4553 hendricks2 561
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.c | $(ENGINE_OBJ)
1765 plagman 562
	$(COMPILE_STATUS)
4543 hendricks2 563
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
1765 plagman 564
 
4553 hendricks2 565
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.cpp | $(ENGINE_OBJ)
4543 hendricks2 566
	$(COMPILE_STATUS)
4547 hendricks2 567
	$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4543 hendricks2 568
 
4553 hendricks2 569
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.cc | $(ENGINE_OBJ)
4543 hendricks2 570
	$(COMPILE_STATUS)
4547 hendricks2 571
	$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4543 hendricks2 572
 
4553 hendricks2 573
$(ENGINE_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c | $(ENGINE_OBJ)
4543 hendricks2 574
	$(COMPILE_STATUS)
575
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
576
 
577
$(AUDIOLIB_OBJ)/%.o: $(AUDIOLIB_SRC)/%.c | $(AUDIOLIB_OBJ)
578
	$(COMPILE_STATUS)
579
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(AUDIOLIB_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
580
 
581
$(ENET_OBJ)/%.o: $(ENET_SRC)/%.c $(ENET_INC)/enet/*.h | $(ENET_OBJ)
582
	$(COMPILE_STATUS)
583
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENET_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
584
 
4555 hendricks2 585
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_SRC)/%.c | $(TESTGAME_OBJ)
586
	$(COMPILE_STATUS)
587
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(TESTGAME_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
588
 
589
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_RSRC)/%.rc | $(TESTGAME_OBJ)
590
	$(COMPILE_STATUS)
591
	$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(TESTGAME_SRC) --include-dir=$(TESTGAME_RSRC) $(RECIPE_RESULT_COMPILE)
592
 
593
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_RSRC)/%.c | $(TESTGAME_OBJ)
594
	$(COMPILE_STATUS)
4558 hendricks2 595
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(TESTGAME_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4555 hendricks2 596
 
597
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.c | $(DUKE3D_OBJ)
598
	$(COMPILE_STATUS)
599
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
600
 
4565 hendricks2 601
$(DUKE3D_OBJ)/rev.$o: $(DUKE3D_SRC)/rev.c | $(DUKE3D_OBJ)
602
	$(COMPILE_STATUS)
603
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) $(REVFLAG) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
604
 
4555 hendricks2 605
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/util/%.c | $(DUKE3D_OBJ)
606
	$(COMPILE_STATUS)
607
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
608
 
4553 hendricks2 609
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.m | $(DUKE3D_OBJ)
4543 hendricks2 610
	$(COMPILE_STATUS)
4644 hendricks2 611
	$(RECIPE_IF) $(COMPILER_OBJC) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4543 hendricks2 612
 
4553 hendricks2 613
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.cpp | $(DUKE3D_OBJ)
4543 hendricks2 614
	$(COMPILE_STATUS)
4555 hendricks2 615
	$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4543 hendricks2 616
 
4553 hendricks2 617
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/jmact/%.c | $(DUKE3D_OBJ)
4543 hendricks2 618
	$(COMPILE_STATUS)
4555 hendricks2 619
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4543 hendricks2 620
 
4553 hendricks2 621
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/misc/%.rc | $(DUKE3D_OBJ)
4543 hendricks2 622
	$(COMPILE_STATUS)
4555 hendricks2 623
	$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(DUKE3D_SRC) --include-dir=$(DUKE3D_RSRC) -DPOLYMER=$(POLYMER) $(RECIPE_RESULT_COMPILE)
4543 hendricks2 624
 
4553 hendricks2 625
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c | $(DUKE3D_OBJ)
4543 hendricks2 626
	$(COMPILE_STATUS)
4558 hendricks2 627
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4543 hendricks2 628
 
4770 hendricks2 629
$(DUKE3D_RSRC)/%_banner.c: $(DUKE3D_RSRC)/%.bmp
630
	echo "#include \"gtkpixdata_shim.h\"" > $@
5 Plagman 631
	gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
4770 hendricks2 632
 
633
$(TESTGAME_RSRC)/%_banner.c: $(TESTGAME_RSRC)/%.bmp
634
	echo "#include \"gtkpixdata_shim.h\"" > $@
5 Plagman 635
	gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
636
 
4555 hendricks2 637
$(ENGINE_OBJ) $(AUDIOLIB_OBJ) $(ENET_OBJ) $(DUKE3D_OBJ) $(TESTGAME_OBJ):
4807 hendricks2 638
	-mkdir $@ $(DONT_PRINT) $(DONT_FAIL)
4553 hendricks2 639
 
4756 helixhorne 640
## PHONIES
996 terminx 641
 
4756 helixhorne 642
# Delete executables, object files created from sources in source/, and
643
# miscellaneous generated files related to Lunatic on non-Linux.
4565 hendricks2 644
clean:
4824 hendricks2 645
	echo "rm -f $(EDUKE32)$(EXESUFFIX) $(MAPSTER32)$(EXESUFFIX) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)"
646
	-rm -f $(EDUKE32)$(EXESUFFIX) $(MAPSTER32)$(EXESUFFIX) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)
2388 helixhorne 647
ifeq ($(PLATFORM),DARWIN)
648
	-rm -rf EDuke32.app Mapster32.app
649
endif
5 Plagman 650
 
4555 hendricks2 651
cleantest:
4824 hendricks2 652
	-rm -f $(TESTGAME)$(EXESUFFIX) $(TESTEDITOR)$(EXESUFFIX) $(TESTGAME_OBJS_EXP) $(TESTEDITOR_OBJS_EXP)
4555 hendricks2 653
 
3163 hendricks2 654
cleanutils:
4543 hendricks2 655
	-rm -f $(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(UTILS))) $(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(GAMEUTILS))) $(addsuffix $(EXESUFFIX),$(DXUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(DXUTILS))) $(addsuffix $(EXESUFFIX),$(SDLUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(SDLUTILS))) $(UTIL_OBJS_EXP)
3163 hendricks2 656
 
657
veryclean: clean cleanutils
4756 helixhorne 658
	echo "Removed test game and utils objects."
659
	echo "rm -f $(ENGINE_OBJ)/*.o $(AUDIOLIB_OBJ)/*.o $(ENET_OBJ)/*.o $(DUKE3D_RSRC)/*banner* $(EBACKTRACEDLL)"
660
	-rm -f $(ENGINE_OBJ)/*.o $(AUDIOLIB_OBJ)/*.o $(ENET_OBJ)/*.o $(DUKE3D_RSRC)/*banner* $(EBACKTRACEDLL)
3163 hendricks2 661
 
662
printutils:
4543 hendricks2 663
	echo "$(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS))"
4343 hendricks2 664
 
4543 hendricks2 665
printdxutils:
666
	echo "$(addsuffix $(EXESUFFIX),$(DXUTILS))"
667
 
668
printsdlutils:
669
	echo "$(addsuffix $(EXESUFFIX),$(SDLUTILS))"
670
 
4565 hendricks2 671
rev: $(DUKE3D_OBJ)/rev.$o