Subversion Repositories eduke32

Rev

Rev 4821 | 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
 
4559 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
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
 
4559 hendricks2 223
DUKE3D_OBJS=game actors anim common config demo gamedef gameexec gamevars global input menus namesdyn net player premap savegame sector rts osdfuncs osdcmds grpscan sounds soundsdyn $(MACT_OBJ)
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)
3335 hendricks2 291
    LIBS		+= -lFLAC -lvorbisfile -lvorbis -logg
996 terminx 292
endif
293
 
294
ifeq ($(PLATFORM),DARWIN)
4646 hendricks2 295
    # LIBDIRS += -L$(AUDIOLIB_ROOT)/third-party/Apple/lib
2537 hendricks2 296
 
4543 hendricks2 297
    LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lm \
298
            -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,OpenGL \
299
            -Wl,-framework,CoreMidi -Wl,-framework,AudioUnit \
4548 hendricks2 300
            -Wl,-framework,AudioToolbox -Wl,-framework,IOKit -Wl,-framework,AGL
301
    ifneq (00,$(DARWIN9)$(DARWIN10))
302
        LIBS += -Wl,-framework,QuickTime -lm
303
    endif
2537 hendricks2 304
 
2426 hendricks2 305
    ifneq (0,$(OSX_STARTUPWINDOW))
4543 hendricks2 306
        DUKE3D_OBJS += GrpFile.game GameListSource.game startosx.game
2426 hendricks2 307
    endif
996 terminx 308
endif
309
 
5 Plagman 310
ifeq ($(PLATFORM),WINDOWS)
4543 hendricks2 311
    LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lcompat-from-mingw-w64
4553 hendricks2 312
    LIBDIRS += -L$(AUDIOLIB_ROOT)/third-party/Windows/lib$(WINLIB)
4543 hendricks2 313
    DUKE3D_OBJS+= gameres winbits startwin.game
314
    DUKE3D_EDITOR_OBJS+= buildres
4084 hendricks2 315
    ifeq ($(MIXERTYPE),WIN)
3219 hendricks2 316
        LIBS+= -ldsound
4543 hendricks2 317
        DUKE3D_OBJS+= music midi mpu401
3219 hendricks2 318
    endif
319
endif
4543 hendricks2 320
 
321
ifeq ($(PLATFORM),WII)
322
    LIBS += -lvorbisidec
323
endif
324
 
3219 hendricks2 325
ifeq ($(RENDERTYPE),SDL)
4084 hendricks2 326
    ifeq (1,$(HAVE_GTK2))
4543 hendricks2 327
        DUKE3D_OBJS+= game_banner startgtk.game
4770 hendricks2 328
        DUKE3D_EDITOR_OBJS+= build_banner
4084 hendricks2 329
    endif
330
 
4543 hendricks2 331
    DUKE3D_OBJS+= game_icon
332
    DUKE3D_EDITOR_OBJS+= build_icon
4084 hendricks2 333
endif
334
ifeq ($(MIXERTYPE),SDL)
4543 hendricks2 335
    DUKE3D_OBJS+= sdlmusic
5 Plagman 336
endif
337
 
4591 helixhorne 338
## Construct file names of object files
1473 terminx 339
 
4555 hendricks2 340
COMMON_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(COMMON_OBJS)))
341
COMMON_EDITOR_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(COMMON_EDITOR_OBJS)))
342
 
4543 hendricks2 343
DUKE3D_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_OBJS)))
344
DUKE3D_EDITOR_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_EDITOR_OBJS)))
5 Plagman 345
 
1595 helixhorne 346
 
1103 terminx 347
ifeq ($(PRETTY_OUTPUT),1)
1101 terminx 348
.SILENT:
1103 terminx 349
endif
4565 hendricks2 350
.PHONY: veryclean clean all test cleanutils utils dxutils sdlutils printutils printsdlutils printdxutils rev $(DUKE3D_OBJ)/rev.$o
5 Plagman 351
 
352
# TARGETS
353
 
4565 hendricks2 354
all: start $(EDUKE32_TARGET) $(MAPSTER32_TARGET) finish
2685 hendricks2 355
ifneq (,$(EDUKE32_TARGET))
4824 hendricks2 356
	@ls -l $(EDUKE32)$(EXESUFFIX)
2685 hendricks2 357
endif
358
ifneq (,$(MAPSTER32_TARGET))
4824 hendricks2 359
	@ls -l $(MAPSTER32)$(EXESUFFIX)
2685 hendricks2 360
endif
3236 hendricks2 361
 
4555 hendricks2 362
test: start $(TESTGAME_TARGET) $(TESTEDITOR_TARGET) finish
363
ifneq (,$(TESTGAME_TARGET))
4824 hendricks2 364
	@ls -l $(TESTGAME)$(EXESUFFIX)
4555 hendricks2 365
endif
366
ifneq (,$(TESTEDITOR_TARGET))
4824 hendricks2 367
	@ls -l $(TESTEDITOR)$(EXESUFFIX)
4555 hendricks2 368
endif
369
 
3236 hendricks2 370
ebacktrace: start $(EBACKTRACEDLL_TARGET) finish
3163 hendricks2 371
ifneq (,$(EBACKTRACEDLL_TARGET))
372
	@ls -l $(EBACKTRACEDLL)
373
endif
1101 terminx 374
 
3163 hendricks2 375
start:
1102 terminx 376
	$(BUILD_STARTED)
1595 helixhorne 377
 
3163 hendricks2 378
finish:
379
	$(BUILD_FINISHED)
3096 hendricks2 380
 
4543 hendricks2 381
utils: $(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS))
382
	@ls -l $^
3163 hendricks2 383
 
4543 hendricks2 384
dxutils: $(addsuffix $(EXESUFFIX),$(DXUTILS))
385
	@ls -l $^
386
 
387
sdlutils: $(addsuffix $(EXESUFFIX),$(SDLUTILS))
388
	@ls -l $^
389
 
4824 hendricks2 390
ifeq ($(PLATFORM),WII)
391
ifneq ($(ELF2DOL),)
392
$(TESTGAME)$(DOLSUFFIX): $(TESTGAME)$(EXESUFFIX)
393
$(TESTEDITOR)$(DOLSUFFIX): $(TESTEDITOR)$(EXESUFFIX)
394
$(EDUKE32)$(DOLSUFFIX): $(EDUKE32)$(EXESUFFIX)
395
$(MAPSTER32)$(DOLSUFFIX): $(MAPSTER32)$(EXESUFFIX)
396
endif
397
endif
398
 
399
$(TESTGAME)$(EXESUFFIX): $(TESTGAME_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP)
1102 terminx 400
	$(LINK_STATUS)
4555 hendricks2 401
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
4824 hendricks2 402
ifeq ($(PLATFORM),WII)
403
ifneq ($(ELF2DOL),)
404
	$(ELF2DOL) $(TESTGAME)$(EXESUFFIX) $(TESTGAME)$(DOLSUFFIX)
405
endif
406
endif
4555 hendricks2 407
ifneq ($(STRIP),)
4824 hendricks2 408
	$(STRIP) $(TESTGAME)$(EXESUFFIX)
4555 hendricks2 409
endif
410
 
4824 hendricks2 411
$(TESTEDITOR)$(EXESUFFIX): $(TESTEDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP)
4555 hendricks2 412
	$(LINK_STATUS)
413
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
4824 hendricks2 414
ifeq ($(PLATFORM),WII)
415
ifneq ($(ELF2DOL),)
416
	$(ELF2DOL) $(TESTEDITOR)$(EXESUFFIX) $(TESTEDITOR)$(DOLSUFFIX)
417
endif
418
endif
4555 hendricks2 419
ifneq ($(STRIP),)
4824 hendricks2 420
	$(STRIP) $(TESTEDITOR)$(EXESUFFIX)
4555 hendricks2 421
endif
422
 
4824 hendricks2 423
$(EDUKE32)$(EXESUFFIX): $(DUKE3D_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_TARGET) $(DUKE3D_MISCDEPS)
4555 hendricks2 424
	$(LINK_STATUS)
4543 hendricks2 425
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
4824 hendricks2 426
ifeq ($(PLATFORM),WII)
427
ifneq ($(ELF2DOL),)
428
	$(ELF2DOL) $(EDUKE32)$(EXESUFFIX) $(EDUKE32)$(DOLSUFFIX)
429
endif
430
endif
3422 helixhorne 431
ifneq ($(STRIP),)
4824 hendricks2 432
	$(STRIP) $(EDUKE32)$(EXESUFFIX)
1101 terminx 433
endif
2385 hendricks2 434
ifeq ($(PLATFORM),DARWIN)
3551 terminx 435
	cp -RPf "platform/Apple/bundles/EDuke32.app" "./"
2388 helixhorne 436
	mkdir -p "EDuke32.app/Contents/MacOS"
4824 hendricks2 437
	cp -f "$(EDUKE32)$(EXESUFFIX)" "EDuke32.app/Contents/MacOS/"
2385 hendricks2 438
endif
1595 helixhorne 439
 
4824 hendricks2 440
$(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 441
	$(LINK_STATUS)
4543 hendricks2 442
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_EDITOR_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
4824 hendricks2 443
ifeq ($(PLATFORM),WII)
444
ifneq ($(ELF2DOL),)
445
	$(ELF2DOL) $(MAPSTER32)$(EXESUFFIX) $(MAPSTER32)$(DOLSUFFIX)
446
endif
447
endif
3422 helixhorne 448
ifneq ($(STRIP),)
4824 hendricks2 449
	$(STRIP) $(MAPSTER32)$(EXESUFFIX)
1693 helixhorne 450
endif
2385 hendricks2 451
ifeq ($(PLATFORM),DARWIN)
3551 terminx 452
	cp -RPf "platform/Apple/bundles/Mapster32.app" "./"
2388 helixhorne 453
	mkdir -p "Mapster32.app/Contents/MacOS"
4824 hendricks2 454
	cp -f "$(MAPSTER32)$(EXESUFFIX)" "Mapster32.app/Contents/MacOS/"
2385 hendricks2 455
endif
5 Plagman 456
 
457
include Makefile.deps
4543 hendricks2 458
include $(ENGINE_ROOT)/Makefile.deps
5 Plagman 459
 
460
# RULES
3057 helixhorne 461
 
3551 terminx 462
$(EBACKTRACEDLL): platform/Windows/src/backtrace.c
3163 hendricks2 463
	$(COMPILE_STATUS)
4543 hendricks2 464
	$(RECIPE_IF) $(CC) $(CONLYFLAGS) -O2 -ggdb -shared -Wall -Wextra -static-libgcc -I$(ENGINE_INC) -o $@ $^ -lbfd -liberty -limagehlp $(RECIPE_RESULT_COMPILE)
2037 helixhorne 465
 
4543 hendricks2 466
libcache1d$(DLLSUFFIX): $(ENGINE_SRC)/cache1d.c
1102 terminx 467
	$(COMPILE_STATUS)
4543 hendricks2 468
	$(RECIPE_IF) $(COMPILER) -Wall -Wextra -DCACHE1D_COMPRESS_ONLY -shared -fPIC $< -o $@ $(RECIPE_RESULT_COMPILE)
1693 helixhorne 469
 
4543 hendricks2 470
%$(EXESUFFIX): $(ENGINE_OBJ)/%.$o $(UTIL_OBJS_EXP)
471
	$(ONESTEP_STATUS)
472
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) $(RECIPE_RESULT_ONESTEP)
1101 terminx 473
 
4543 hendricks2 474
%$(EXESUFFIX): $(DUKE3D_OBJ)/%.$o
475
	$(ONESTEP_STATUS)
476
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) $(RECIPE_RESULT_ONESTEP)
4194 helixhorne 477
 
4543 hendricks2 478
enumdisplay$(EXESUFFIX): $(ENGINE_OBJ)/enumdisplay.$o
479
	$(ONESTEP_STATUS)
480
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) -lgdi32 $(RECIPE_RESULT_ONESTEP)
481
getdxdidf$(EXESUFFIX): $(ENGINE_OBJ)/getdxdidf.$o
482
	$(ONESTEP_STATUS)
483
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) -ldinput $(RECIPE_RESULT_ONESTEP)
484
makesdlkeytrans$(EXESUFFIX): $(ENGINE_OBJ)/makesdlkeytrans.$o
485
	$(ONESTEP_STATUS)
486
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) $(SDL_INCLUDES) $(RECIPE_RESULT_ONESTEP)
487
arttool$(EXESUFFIX): $(ENGINE_OBJ)/arttool.$o
488
	$(ONESTEP_STATUS)
4547 hendricks2 489
	$(RECIPE_IF) $(L_CXX) $(CPPONLYFLAGS) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB) $(UTIL_LIBS) $(RECIPE_RESULT_ONESTEP)
4194 helixhorne 490
 
3057 helixhorne 491
#### Lunatic
492
 
2650 helixhorne 493
# Create object files directly with luajit
4543 hendricks2 494
$(DUKE3D_OBJ)/luaJIT_BC_%.$o: source/lunatic/%.lua
2650 helixhorne 495
	$(COMPILE_STATUS)
4543 hendricks2 496
	$(RECIPE_IF) $(LUAJIT) -bg $(LUAJIT_BCOPTS) $< $@ $(RECIPE_RESULT_COMPILE)
2650 helixhorne 497
 
4238 helixhorne 498
# Same thing for defs*.ilua which I'm too reluctant to rename now:
4000 helixhorne 499
# NOTE: The target path must match EXACTLY with that of the DEFS_BC_SIZE
500
# determination in Makefile.common, because it is embedded into the bytecode as
501
# debugging information.
4543 hendricks2 502
$(DUKE3D_OBJ)/luaJIT_BC_%.$o: source/lunatic/%.ilua
503
	$(RECIPE_IF) $(LUAJIT) -bg $(LUAJIT_BCOPTS) $< $@ $(RECIPE_RESULT_COMPILE)
3517 helixhorne 504
 
4543 hendricks2 505
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/lunatic/%.c
2034 helixhorne 506
	$(COMPILE_STATUS)
4555 hendricks2 507
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
2034 helixhorne 508
 
3057 helixhorne 509
# TODO: _m32
510
# List of exported symbols, OS X
4543 hendricks2 511
$(DUKE3D_SRC)/lunatic/dynsymlist_osx: $(DUKE3D_SRC)/lunatic/dynsymlist
2074 helixhorne 512
	sed 's/[{};]//g;s/[A-Za-z_][A-Za-z_0-9]*/_&/g' $< > $@
513
 
4543 hendricks2 514
#$(DUKE3D_SRC)/lunatic/aliases_list: $(DUKE3D_SRC)/lunatic/dynsymlist_osx
3057 helixhorne 515
#	sed 's/_\([A-Za-z_][A-Za-z_0-9]*\)/_\1 \1/g' $< > $@
2074 helixhorne 516
 
3057 helixhorne 517
# List of exported symbols, Windows
4543 hendricks2 518
$(DUKE3D_SRC)/lunatic/eduke32.def: $(DUKE3D_SRC)/lunatic/dynsymlist
2143 helixhorne 519
	echo EXPORTS > $@
520
	sed 's/[{};]//g' $< >> $@
521
 
4543 hendricks2 522
$(DUKE3D_SRC)/lunatic/mapster32.def: $(DUKE3D_SRC)/lunatic/dynsymlist_m32
3248 helixhorne 523
	echo EXPORTS > $@
524
	sed 's/[{};]//g' $< >> $@
525
 
3057 helixhorne 526
####
527
 
4553 hendricks2 528
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.nasm | $(ENGINE_OBJ)
1905 helixhorne 529
	$(COMPILE_STATUS)
4543 hendricks2 530
	$(RECIPE_IF) $(AS) $(ASFLAGS) $< -o $@ $(RECIPE_RESULT_COMPILE)
1905 helixhorne 531
 
4553 hendricks2 532
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.yasm | $(ENGINE_OBJ)
3334 hendricks2 533
	$(COMPILE_STATUS)
4543 hendricks2 534
	$(RECIPE_IF) $(AS) $(ASFLAGS) $< -o $@ $(RECIPE_RESULT_COMPILE)
3334 hendricks2 535
 
4543 hendricks2 536
# Comment out the following rule to debug a-c.o
4553 hendricks2 537
$(ENGINE_OBJ)/a-c.$o: $(ENGINE_SRC)/a-c.c | $(ENGINE_OBJ)
2458 hendricks2 538
	$(COMPILE_STATUS)
4543 hendricks2 539
	$(RECIPE_IF) $(COMPILER) $(subst -O$(OPTLEVEL),-O2,$(subst $(CLANG_DEBUG_FLAGS),,$(COMMONFLAGS) $(COMPILERFLAGS))) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
2458 hendricks2 540
 
4553 hendricks2 541
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.c | $(ENGINE_OBJ)
1102 terminx 542
	$(COMPILE_STATUS)
4543 hendricks2 543
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
1101 terminx 544
 
4553 hendricks2 545
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.m | $(ENGINE_OBJ)
1102 terminx 546
	$(COMPILE_STATUS)
4644 hendricks2 547
	$(RECIPE_IF) $(COMPILER_OBJC) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
220 terminx 548
 
4553 hendricks2 549
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.cpp | $(ENGINE_OBJ)
1102 terminx 550
	$(COMPILE_STATUS)
4547 hendricks2 551
	$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
220 terminx 552
 
4553 hendricks2 553
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/misc/%.c | $(ENGINE_OBJ)
1102 terminx 554
	$(COMPILE_STATUS)
4543 hendricks2 555
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
1595 helixhorne 556
 
4553 hendricks2 557
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.c | $(ENGINE_OBJ)
1765 plagman 558
	$(COMPILE_STATUS)
4543 hendricks2 559
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
1765 plagman 560
 
4553 hendricks2 561
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.cpp | $(ENGINE_OBJ)
4543 hendricks2 562
	$(COMPILE_STATUS)
4547 hendricks2 563
	$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4543 hendricks2 564
 
4553 hendricks2 565
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.cc | $(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: $(DUKE3D_RSRC)/%.c | $(ENGINE_OBJ)
4543 hendricks2 570
	$(COMPILE_STATUS)
571
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
572
 
573
$(AUDIOLIB_OBJ)/%.o: $(AUDIOLIB_SRC)/%.c | $(AUDIOLIB_OBJ)
574
	$(COMPILE_STATUS)
575
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(AUDIOLIB_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
576
 
577
$(ENET_OBJ)/%.o: $(ENET_SRC)/%.c $(ENET_INC)/enet/*.h | $(ENET_OBJ)
578
	$(COMPILE_STATUS)
579
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENET_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
580
 
4555 hendricks2 581
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_SRC)/%.c | $(TESTGAME_OBJ)
582
	$(COMPILE_STATUS)
583
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(TESTGAME_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
584
 
585
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_RSRC)/%.rc | $(TESTGAME_OBJ)
586
	$(COMPILE_STATUS)
587
	$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(TESTGAME_SRC) --include-dir=$(TESTGAME_RSRC) $(RECIPE_RESULT_COMPILE)
588
 
589
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_RSRC)/%.c | $(TESTGAME_OBJ)
590
	$(COMPILE_STATUS)
4558 hendricks2 591
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(TESTGAME_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4555 hendricks2 592
 
593
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.c | $(DUKE3D_OBJ)
594
	$(COMPILE_STATUS)
595
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
596
 
4565 hendricks2 597
$(DUKE3D_OBJ)/rev.$o: $(DUKE3D_SRC)/rev.c | $(DUKE3D_OBJ)
598
	$(COMPILE_STATUS)
599
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) $(REVFLAG) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
600
 
4555 hendricks2 601
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/util/%.c | $(DUKE3D_OBJ)
602
	$(COMPILE_STATUS)
603
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
604
 
4553 hendricks2 605
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.m | $(DUKE3D_OBJ)
4543 hendricks2 606
	$(COMPILE_STATUS)
4644 hendricks2 607
	$(RECIPE_IF) $(COMPILER_OBJC) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4543 hendricks2 608
 
4553 hendricks2 609
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.cpp | $(DUKE3D_OBJ)
4543 hendricks2 610
	$(COMPILE_STATUS)
4555 hendricks2 611
	$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4543 hendricks2 612
 
4553 hendricks2 613
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/jmact/%.c | $(DUKE3D_OBJ)
4543 hendricks2 614
	$(COMPILE_STATUS)
4555 hendricks2 615
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4543 hendricks2 616
 
4553 hendricks2 617
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/misc/%.rc | $(DUKE3D_OBJ)
4543 hendricks2 618
	$(COMPILE_STATUS)
4555 hendricks2 619
	$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(DUKE3D_SRC) --include-dir=$(DUKE3D_RSRC) -DPOLYMER=$(POLYMER) $(RECIPE_RESULT_COMPILE)
4543 hendricks2 620
 
4553 hendricks2 621
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c | $(DUKE3D_OBJ)
4543 hendricks2 622
	$(COMPILE_STATUS)
4558 hendricks2 623
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
4543 hendricks2 624
 
4770 hendricks2 625
$(DUKE3D_RSRC)/%_banner.c: $(DUKE3D_RSRC)/%.bmp
626
	echo "#include \"gtkpixdata_shim.h\"" > $@
5 Plagman 627
	gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
4770 hendricks2 628
 
629
$(TESTGAME_RSRC)/%_banner.c: $(TESTGAME_RSRC)/%.bmp
630
	echo "#include \"gtkpixdata_shim.h\"" > $@
5 Plagman 631
	gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
632
 
4555 hendricks2 633
$(ENGINE_OBJ) $(AUDIOLIB_OBJ) $(ENET_OBJ) $(DUKE3D_OBJ) $(TESTGAME_OBJ):
4807 hendricks2 634
	-mkdir $@ $(DONT_PRINT) $(DONT_FAIL)
4553 hendricks2 635
 
4756 helixhorne 636
## PHONIES
996 terminx 637
 
4756 helixhorne 638
# Delete executables, object files created from sources in source/, and
639
# miscellaneous generated files related to Lunatic on non-Linux.
4565 hendricks2 640
clean:
4824 hendricks2 641
	echo "rm -f $(EDUKE32)$(EXESUFFIX) $(MAPSTER32)$(EXESUFFIX) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)"
642
	-rm -f $(EDUKE32)$(EXESUFFIX) $(MAPSTER32)$(EXESUFFIX) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)
2388 helixhorne 643
ifeq ($(PLATFORM),DARWIN)
644
	-rm -rf EDuke32.app Mapster32.app
645
endif
5 Plagman 646
 
4555 hendricks2 647
cleantest:
4824 hendricks2 648
	-rm -f $(TESTGAME)$(EXESUFFIX) $(TESTEDITOR)$(EXESUFFIX) $(TESTGAME_OBJS_EXP) $(TESTEDITOR_OBJS_EXP)
4555 hendricks2 649
 
3163 hendricks2 650
cleanutils:
4543 hendricks2 651
	-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 652
 
653
veryclean: clean cleanutils
4756 helixhorne 654
	echo "Removed test game and utils objects."
655
	echo "rm -f $(ENGINE_OBJ)/*.o $(AUDIOLIB_OBJ)/*.o $(ENET_OBJ)/*.o $(DUKE3D_RSRC)/*banner* $(EBACKTRACEDLL)"
656
	-rm -f $(ENGINE_OBJ)/*.o $(AUDIOLIB_OBJ)/*.o $(ENET_OBJ)/*.o $(DUKE3D_RSRC)/*banner* $(EBACKTRACEDLL)
3163 hendricks2 657
 
658
printutils:
4543 hendricks2 659
	echo "$(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS))"
4343 hendricks2 660
 
4543 hendricks2 661
printdxutils:
662
	echo "$(addsuffix $(EXESUFFIX),$(DXUTILS))"
663
 
664
printsdlutils:
665
	echo "$(addsuffix $(EXESUFFIX),$(SDLUTILS))"
666
 
4565 hendricks2 667
rev: $(DUKE3D_OBJ)/rev.$o