Subversion Repositories eduke32

Rev

Rev 4821 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4821 Rev 4824
Line 173... Line 173...
173
TESTGAME_RSRC=$(TESTGAME_ROOT)/rsrc
173
TESTGAME_RSRC=$(TESTGAME_ROOT)/rsrc
174
TESTGAME_OBJ=$(TESTGAME_ROOT)/$(obj)
174
TESTGAME_OBJ=$(TESTGAME_ROOT)/$(obj)
175
175
176
TEST_CFLAGS=-I$(TESTGAME_SRC)
176
TEST_CFLAGS=-I$(TESTGAME_SRC)
177
177
178
TESTGAME ?= testgame$(EXESUFFIX)
178
TESTGAME ?= testgame
179
TESTEDITOR ?= testeditor$(EXESUFFIX)
179
TESTEDITOR ?= testeditor
180
180
181
TESTGAME_TARGET:=$(TESTGAME)
181
TESTGAME_TARGET:=$(TESTGAME)$(EXESUFFIX)
182
TESTEDITOR_TARGET:=$(TESTEDITOR)
182
TESTEDITOR_TARGET:=$(TESTEDITOR)$(EXESUFFIX)
183
183
184
TESTGAME_OBJS=game sound_stub common config
184
TESTGAME_OBJS=game sound_stub common config
185
TESTEDITOR_OBJS=bstub common
185
TESTEDITOR_OBJS=bstub common
186
186
187
ifeq ($(RENDERTYPE),SDL)
187
ifeq ($(RENDERTYPE),SDL)
Line 209... Line 209...
209
DUKE3D_LINKERFLAGS=
209
DUKE3D_LINKERFLAGS=
210
DUKE3D_EDITOR_LINKERFLAGS=
210
DUKE3D_EDITOR_LINKERFLAGS=
211
211
212
DUKE3D_OBJ=$(DUKE3D_SRC)/$(obj)
212
DUKE3D_OBJ=$(DUKE3D_SRC)/$(obj)
213
213
214
EDUKE32 ?= eduke32$(EXESUFFIX)
214
EDUKE32 ?= eduke32
215
MAPSTER32 ?= mapster32$(EXESUFFIX)
215
MAPSTER32 ?= mapster32
216
216
217
EDUKE32_TARGET:=$(EDUKE32)
217
EDUKE32_TARGET:=$(EDUKE32)$(EXESUFFIX)
218
MAPSTER32_TARGET:=$(MAPSTER32)
218
MAPSTER32_TARGET:=$(MAPSTER32)$(EXESUFFIX)
219
219
220
COMMON_OBJS=rev
220
COMMON_OBJS=rev
221
COMMON_EDITOR_OBJS=m32common m32def m32exec m32vars mathutil rev
221
COMMON_EDITOR_OBJS=m32common m32def m32exec m32vars mathutil rev
222
222
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)
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)
Line 351... Line 351...
351
351
352
# TARGETS
352
# TARGETS
353
353
354
all: start $(EDUKE32_TARGET) $(MAPSTER32_TARGET) finish
354
all: start $(EDUKE32_TARGET) $(MAPSTER32_TARGET) finish
355
ifneq (,$(EDUKE32_TARGET))
355
ifneq (,$(EDUKE32_TARGET))
356
	@ls -l $(EDUKE32)
356
	@ls -l $(EDUKE32)$(EXESUFFIX)
357
endif
357
endif
358
ifneq (,$(MAPSTER32_TARGET))
358
ifneq (,$(MAPSTER32_TARGET))
359
	@ls -l $(MAPSTER32)
359
	@ls -l $(MAPSTER32)$(EXESUFFIX)
360
endif
360
endif
361
361
362
test: start $(TESTGAME_TARGET) $(TESTEDITOR_TARGET) finish
362
test: start $(TESTGAME_TARGET) $(TESTEDITOR_TARGET) finish
363
ifneq (,$(TESTGAME_TARGET))
363
ifneq (,$(TESTGAME_TARGET))
364
	@ls -l $(TESTGAME)
364
	@ls -l $(TESTGAME)$(EXESUFFIX)
365
endif
365
endif
366
ifneq (,$(TESTEDITOR_TARGET))
366
ifneq (,$(TESTEDITOR_TARGET))
367
	@ls -l $(TESTEDITOR)
367
	@ls -l $(TESTEDITOR)$(EXESUFFIX)
368
endif
368
endif
369
369
370
ebacktrace: start $(EBACKTRACEDLL_TARGET) finish
370
ebacktrace: start $(EBACKTRACEDLL_TARGET) finish
371
ifneq (,$(EBACKTRACEDLL_TARGET))
371
ifneq (,$(EBACKTRACEDLL_TARGET))
372
	@ls -l $(EBACKTRACEDLL)
372
	@ls -l $(EBACKTRACEDLL)
Line 385... Line 385...
385
	@ls -l $^
385
	@ls -l $^
386
386
387
sdlutils: $(addsuffix $(EXESUFFIX),$(SDLUTILS))
387
sdlutils: $(addsuffix $(EXESUFFIX),$(SDLUTILS))
388
	@ls -l $^
388
	@ls -l $^
389
389
-
 
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
390
$(TESTGAME): $(TESTGAME_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP)
399
$(TESTGAME)$(EXESUFFIX): $(TESTGAME_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP)
391
	$(LINK_STATUS)
400
	$(LINK_STATUS)
392
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
401
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
-
 
402
ifeq ($(PLATFORM),WII)
-
 
403
ifneq ($(ELF2DOL),)
-
 
404
	$(ELF2DOL) $(TESTGAME)$(EXESUFFIX) $(TESTGAME)$(DOLSUFFIX)
-
 
405
endif
-
 
406
endif
393
ifneq ($(STRIP),)
407
ifneq ($(STRIP),)
394
	$(STRIP) $(TESTGAME)
408
	$(STRIP) $(TESTGAME)$(EXESUFFIX)
395
endif
409
endif
396
410
397
$(TESTEDITOR): $(TESTEDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP)
411
$(TESTEDITOR)$(EXESUFFIX): $(TESTEDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP)
398
	$(LINK_STATUS)
412
	$(LINK_STATUS)
399
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
413
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
-
 
414
ifeq ($(PLATFORM),WII)
-
 
415
ifneq ($(ELF2DOL),)
-
 
416
	$(ELF2DOL) $(TESTEDITOR)$(EXESUFFIX) $(TESTEDITOR)$(DOLSUFFIX)
-
 
417
endif
-
 
418
endif
400
ifneq ($(STRIP),)
419
ifneq ($(STRIP),)
401
	$(STRIP) $(TESTEDITOR)
420
	$(STRIP) $(TESTEDITOR)$(EXESUFFIX)
402
endif
421
endif
403
422
404
$(EDUKE32): $(DUKE3D_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_TARGET) $(DUKE3D_MISCDEPS)
423
$(EDUKE32)$(EXESUFFIX): $(DUKE3D_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_TARGET) $(DUKE3D_MISCDEPS)
405
	$(LINK_STATUS)
424
	$(LINK_STATUS)
406
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
425
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
-
 
426
ifeq ($(PLATFORM),WII)
-
 
427
ifneq ($(ELF2DOL),)
-
 
428
	$(ELF2DOL) $(EDUKE32)$(EXESUFFIX) $(EDUKE32)$(DOLSUFFIX)
-
 
429
endif
-
 
430
endif
407
ifneq ($(STRIP),)
431
ifneq ($(STRIP),)
408
	$(STRIP) $(EDUKE32)
432
	$(STRIP) $(EDUKE32)$(EXESUFFIX)
409
endif
433
endif
410
ifeq ($(PLATFORM),DARWIN)
434
ifeq ($(PLATFORM),DARWIN)
411
	cp -RPf "platform/Apple/bundles/EDuke32.app" "./"
435
	cp -RPf "platform/Apple/bundles/EDuke32.app" "./"
412
	mkdir -p "EDuke32.app/Contents/MacOS"
436
	mkdir -p "EDuke32.app/Contents/MacOS"
413
	cp -f "$(EDUKE32)" "EDuke32.app/Contents/MacOS/"
437
	cp -f "$(EDUKE32)$(EXESUFFIX)" "EDuke32.app/Contents/MacOS/"
414
endif
438
endif
415
439
416
$(MAPSTER32): $(DUKE3D_EDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(DUKE3D_EDITOR_MISCDEPS)
440
$(MAPSTER32)$(EXESUFFIX): $(DUKE3D_EDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(DUKE3D_EDITOR_MISCDEPS)
417
	$(LINK_STATUS)
441
	$(LINK_STATUS)
418
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_EDITOR_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
442
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_EDITOR_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
-
 
443
ifeq ($(PLATFORM),WII)
-
 
444
ifneq ($(ELF2DOL),)
-
 
445
	$(ELF2DOL) $(MAPSTER32)$(EXESUFFIX) $(MAPSTER32)$(DOLSUFFIX)
-
 
446
endif
-
 
447
endif
419
ifneq ($(STRIP),)
448
ifneq ($(STRIP),)
420
	$(STRIP) $(MAPSTER32)
449
	$(STRIP) $(MAPSTER32)$(EXESUFFIX)
421
endif
450
endif
422
ifeq ($(PLATFORM),DARWIN)
451
ifeq ($(PLATFORM),DARWIN)
423
	cp -RPf "platform/Apple/bundles/Mapster32.app" "./"
452
	cp -RPf "platform/Apple/bundles/Mapster32.app" "./"
424
	mkdir -p "Mapster32.app/Contents/MacOS"
453
	mkdir -p "Mapster32.app/Contents/MacOS"
425
	cp -f "$(MAPSTER32)" "Mapster32.app/Contents/MacOS/"
454
	cp -f "$(MAPSTER32)$(EXESUFFIX)" "Mapster32.app/Contents/MacOS/"
426
endif
455
endif
427
456
428
-
 
429
include Makefile.deps
457
include Makefile.deps
430
include $(ENGINE_ROOT)/Makefile.deps
458
include $(ENGINE_ROOT)/Makefile.deps
431
459
432
# RULES
460
# RULES
433
461
Line 608... Line 636...
608
## PHONIES
636
## PHONIES
609
637
610
# Delete executables, object files created from sources in source/, and
638
# Delete executables, object files created from sources in source/, and
611
# miscellaneous generated files related to Lunatic on non-Linux.
639
# miscellaneous generated files related to Lunatic on non-Linux.
612
clean:
640
clean:
613
	echo "rm -f $(EDUKE32) $(MAPSTER32) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)"
641
	echo "rm -f $(EDUKE32)$(EXESUFFIX) $(MAPSTER32)$(EXESUFFIX) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)"
614
	-rm -f $(EDUKE32) $(MAPSTER32) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)
642
	-rm -f $(EDUKE32)$(EXESUFFIX) $(MAPSTER32)$(EXESUFFIX) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)
615
ifeq ($(PLATFORM),DARWIN)
643
ifeq ($(PLATFORM),DARWIN)
616
	-rm -rf EDuke32.app Mapster32.app
644
	-rm -rf EDuke32.app Mapster32.app
617
endif
645
endif
618
646
619
cleantest:
647
cleantest:
620
	-rm -f $(TESTGAME) $(TESTEDITOR) $(TESTGAME_OBJS_EXP) $(TESTEDITOR_OBJS_EXP)
648
	-rm -f $(TESTGAME)$(EXESUFFIX) $(TESTEDITOR)$(EXESUFFIX) $(TESTGAME_OBJS_EXP) $(TESTEDITOR_OBJS_EXP)
621
649
622
cleanutils:
650
cleanutils:
623
	-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)
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)
624
652
625
veryclean: clean cleanutils
653
veryclean: clean cleanutils