Subversion Repositories eduke32

Rev

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

Rev 5119 Rev 5197
Line 12... Line 12...
12
ENGINE_INC=$(ENGINE_ROOT)/include
12
ENGINE_INC=$(ENGINE_ROOT)/include
13
o=o
13
o=o
14
asm=nasm
14
asm=nasm
15
obj=obj
15
obj=obj
16
16
17
COMPILERFLAGS += -I$(ENGINE_INC) -I$(DUKE3D_SRC)/jmact -I$(AUDIOLIB_ROOT)/include -I$(ENET_ROOT)/include
17
COMPILERFLAGS += -I$(ENGINE_INC) -I$(MACT_INC) -I$(AUDIOLIB_INC) -I$(ENET_INC)
18
18
19
19
20
# EBacktrace
20
# EBacktrace
21
21
22
ifndef EBACKTRACEDLL
22
ifndef EBACKTRACEDLL
Line 90... Line 90...
90
ENGINE_EDITOR_OBJS_EXP:=$(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(ENGINE_EDITOR_OBJS)))
90
ENGINE_EDITOR_OBJS_EXP:=$(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(ENGINE_EDITOR_OBJS)))
91
91
92
92
93
# MACT
93
# MACT
94
94
-
 
95
MACT_ROOT=$(DUKE3D_SRC)/jmact
-
 
96
MACT_SRC=$(MACT_ROOT)
-
 
97
MACT_INC=$(MACT_ROOT)
-
 
98
MACT_OBJ=$(MACT_ROOT)/$(obj)
-
 
99
95
MACT_OBJ=file_lib control keyboard mouse joystick mathutil scriplib animlib
100
MACT_OBJS=file_lib control keyboard mouse joystick scriplib animlib
-
 
101
-
 
102
MACT_OBJS_EXP:=$(addprefix $(MACT_OBJ)/,$(addsuffix .$o,$(MACT_OBJS)))
96
103
97
104
98
# AudioLib
105
# AudioLib
99
106
100
AUDIOLIB_OBJS=drivers fx_man multivoc mix mixst pitch formats vorbis flac xa driver_nosound
107
AUDIOLIB_OBJS=drivers fx_man multivoc mix mixst pitch formats vorbis flac xa driver_nosound
Line 216... Line 223...
216
223
217
EDUKE32_TARGET:=$(EDUKE32)$(EXESUFFIX)
224
EDUKE32_TARGET:=$(EDUKE32)$(EXESUFFIX)
218
MAPSTER32_TARGET:=$(MAPSTER32)$(EXESUFFIX)
225
MAPSTER32_TARGET:=$(MAPSTER32)$(EXESUFFIX)
219
226
220
COMMON_OBJS=rev
227
COMMON_OBJS=rev
221
COMMON_EDITOR_OBJS=m32common m32def m32exec m32vars mathutil rev
228
COMMON_EDITOR_OBJS=m32common m32def m32exec m32vars rev
222
229
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)
230
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
224
DUKE3D_EDITOR_OBJS=astub common grpscan sounds_mapster32
231
DUKE3D_EDITOR_OBJS=astub common grpscan sounds_mapster32
225
232
226
ifneq ($(USE_LIBVPX),0)
233
ifneq ($(USE_LIBVPX),0)
227
    DUKE3D_OBJS+= animvpx
234
    DUKE3D_OBJS+= animvpx
228
endif
235
endif
Line 330... Line 337...
330
    ifeq (1,$(HAVE_GTK2))
337
    ifeq (1,$(HAVE_GTK2))
331
        DUKE3D_OBJS+= game_banner startgtk.game
338
        DUKE3D_OBJS+= game_banner startgtk.game
332
        DUKE3D_EDITOR_OBJS+= build_banner
339
        DUKE3D_EDITOR_OBJS+= build_banner
333
    endif
340
    endif
334
341
335
    DUKE3D_OBJS+= game_icon
342
    DUKE3D_OBJS+= eduke32_icon
336
    DUKE3D_EDITOR_OBJS+= build_icon
343
    DUKE3D_EDITOR_OBJS+= eduke32_icon
337
endif
344
endif
338
ifeq ($(MIXERTYPE),SDL)
345
ifeq ($(MIXERTYPE),SDL)
339
    DUKE3D_OBJS+= sdlmusic
346
    DUKE3D_OBJS+= sdlmusic
340
endif
347
endif
341
348
Line 346... Line 353...
346
353
347
DUKE3D_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_OBJS)))
354
DUKE3D_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_OBJS)))
348
DUKE3D_EDITOR_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_EDITOR_OBJS)))
355
DUKE3D_EDITOR_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_EDITOR_OBJS)))
349
356
350
357
-
 
358
# Shadow Warrior
-
 
359
-
 
360
SW_ROOT=$(DUKE3D_SRC)/sw
-
 
361
SW_SRC=$(SW_ROOT)/src
-
 
362
SW_INC=$(SW_SRC)
-
 
363
SW_RSRC=$(SW_ROOT)/rsrc
-
 
364
SW_OBJ=$(SW_ROOT)/$(obj)
-
 
365
-
 
366
SW_CFLAGS=-I$(SW_INC)
-
 
367
-
 
368
SW ?= voidsw
-
 
369
SW_EDITOR ?= voidsw-editor
-
 
370
-
 
371
SW_TARGET:=$(SW)$(EXESUFFIX)
-
 
372
SW_EDITOR_TARGET:=$(SW_EDITOR)$(EXESUFFIX)
-
 
373
-
 
374
SW_OBJS=actor ai anim border break bunny cache cheats colormap config console coolg coolie copysect demo draw eel game girlninj goro grpscan hornet interp interpsh inv jplayer jsector jweapon lava light mclip mdastr menus miscactr morph net ninja panel player predict quake ripper ripper2 rooms rotator rts save scrip2 sector serp setup skel skull slidor sounds spike sprite sumo swconfig sync text track vator vis wallmove warp weapon zilla zombie saveable
-
 
375
SW_EDITOR_OBJS=jnstub brooms bldscript jbhlp colormap grpscan
-
 
376
-
 
377
ifeq ($(RENDERTYPE),SDL)
-
 
378
    ifeq (1,$(HAVE_GTK2))
-
 
379
        SW_OBJS+= game_banner startgtk.game
-
 
380
        SW_EDITOR_OBJS+= build_banner
-
 
381
    endif
-
 
382
-
 
383
    SW_OBJS+= game_icon
-
 
384
    SW_EDITOR_OBJS+= game_icon
-
 
385
endif
-
 
386
ifeq ($(PLATFORM),WINDOWS)
-
 
387
	SW_OBJS+= gameres startwin.game
-
 
388
	SW_EDITOR_OBJS+= buildres
-
 
389
endif
-
 
390
-
 
391
SW_OBJS_EXP:=$(addprefix $(SW_OBJ)/,$(addsuffix .$o,$(SW_OBJS)))
-
 
392
SW_EDITOR_OBJS_EXP:=$(addprefix $(SW_OBJ)/,$(addsuffix .$o,$(SW_EDITOR_OBJS)))
-
 
393
-
 
394
351
ifeq ($(PRETTY_OUTPUT),1)
395
ifeq ($(PRETTY_OUTPUT),1)
352
.SILENT:
396
.SILENT:
353
endif
397
endif
354
.PHONY: veryclean clean all test cleanutils utils dxutils sdlutils printutils printsdlutils printdxutils rev $(DUKE3D_OBJ)/rev.$o
398
.PHONY: all duke3d test sw veryclean clean cleanduke3d cleantest cleansw cleanutils utils dxutils sdlutils printutils printsdlutils printdxutils rev $(DUKE3D_OBJ)/rev.$o
355
399
356
# TARGETS
400
# TARGETS
357
401
-
 
402
all: duke3d
-
 
403
358
all: start $(EDUKE32_TARGET) $(MAPSTER32_TARGET) finish
404
duke3d: start $(EDUKE32_TARGET) $(MAPSTER32_TARGET) finish
359
ifneq (,$(EDUKE32_TARGET))
405
ifneq (,$(EDUKE32_TARGET))
360
	@ls -l $(EDUKE32)$(EXESUFFIX)
406
	@ls -l $(EDUKE32)$(EXESUFFIX)
361
endif
407
endif
362
ifneq (,$(MAPSTER32_TARGET))
408
ifneq (,$(MAPSTER32_TARGET))
363
	@ls -l $(MAPSTER32)$(EXESUFFIX)
409
	@ls -l $(MAPSTER32)$(EXESUFFIX)
Line 369... Line 415...
369
endif
415
endif
370
ifneq (,$(TESTEDITOR_TARGET))
416
ifneq (,$(TESTEDITOR_TARGET))
371
	@ls -l $(TESTEDITOR)$(EXESUFFIX)
417
	@ls -l $(TESTEDITOR)$(EXESUFFIX)
372
endif
418
endif
373
419
-
 
420
sw: start $(SW_TARGET) $(SW_EDITOR_TARGET) finish
-
 
421
ifneq (,$(SW_TARGET))
-
 
422
	@ls -l $(SW)$(EXESUFFIX)
-
 
423
endif
-
 
424
ifneq (,$(SW_EDITOR_TARGET))
-
 
425
	@ls -l $(SW_EDITOR)$(EXESUFFIX)
-
 
426
endif
-
 
427
374
ebacktrace: start $(EBACKTRACEDLL_TARGET) finish
428
ebacktrace: start $(EBACKTRACEDLL_TARGET) finish
375
ifneq (,$(EBACKTRACEDLL_TARGET))
429
ifneq (,$(EBACKTRACEDLL_TARGET))
376
	@ls -l $(EBACKTRACEDLL)
430
	@ls -l $(EBACKTRACEDLL)
377
endif
431
endif
378
432
Line 395... Line 449...
395
ifneq ($(ELF2DOL),)
449
ifneq ($(ELF2DOL),)
396
$(TESTGAME)$(DOLSUFFIX): $(TESTGAME)$(EXESUFFIX)
450
$(TESTGAME)$(DOLSUFFIX): $(TESTGAME)$(EXESUFFIX)
397
$(TESTEDITOR)$(DOLSUFFIX): $(TESTEDITOR)$(EXESUFFIX)
451
$(TESTEDITOR)$(DOLSUFFIX): $(TESTEDITOR)$(EXESUFFIX)
398
$(EDUKE32)$(DOLSUFFIX): $(EDUKE32)$(EXESUFFIX)
452
$(EDUKE32)$(DOLSUFFIX): $(EDUKE32)$(EXESUFFIX)
399
$(MAPSTER32)$(DOLSUFFIX): $(MAPSTER32)$(EXESUFFIX)
453
$(MAPSTER32)$(DOLSUFFIX): $(MAPSTER32)$(EXESUFFIX)
-
 
454
$(SW)$(DOLSUFFIX): $(SW)$(EXESUFFIX)
-
 
455
$(SW_EDITOR)$(DOLSUFFIX): $(SW_EDITOR)$(EXESUFFIX)
400
endif
456
endif
401
endif
457
endif
402
458
403
$(TESTGAME)$(EXESUFFIX): $(TESTGAME_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP)
459
$(TESTGAME)$(EXESUFFIX): $(TESTGAME_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP)
404
	$(LINK_STATUS)
460
	$(LINK_STATUS)
Line 407... Line 463...
407
ifneq ($(ELF2DOL),)
463
ifneq ($(ELF2DOL),)
408
	$(ELF2DOL) $(TESTGAME)$(EXESUFFIX) $(TESTGAME)$(DOLSUFFIX)
464
	$(ELF2DOL) $(TESTGAME)$(EXESUFFIX) $(TESTGAME)$(DOLSUFFIX)
409
endif
465
endif
410
endif
466
endif
411
ifneq ($(STRIP),)
467
ifneq ($(STRIP),)
412
	$(STRIP) $(TESTGAME)$(EXESUFFIX)
468
	$(STRIP) $@
413
endif
469
endif
414
470
415
$(TESTEDITOR)$(EXESUFFIX): $(TESTEDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP)
471
$(TESTEDITOR)$(EXESUFFIX): $(TESTEDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP)
416
	$(LINK_STATUS)
472
	$(LINK_STATUS)
417
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
473
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
Line 419... Line 475...
419
ifneq ($(ELF2DOL),)
475
ifneq ($(ELF2DOL),)
420
	$(ELF2DOL) $(TESTEDITOR)$(EXESUFFIX) $(TESTEDITOR)$(DOLSUFFIX)
476
	$(ELF2DOL) $(TESTEDITOR)$(EXESUFFIX) $(TESTEDITOR)$(DOLSUFFIX)
421
endif
477
endif
422
endif
478
endif
423
ifneq ($(STRIP),)
479
ifneq ($(STRIP),)
424
	$(STRIP) $(TESTEDITOR)$(EXESUFFIX)
480
	$(STRIP) $@
425
endif
481
endif
426
482
427
$(EDUKE32)$(EXESUFFIX): $(DUKE3D_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_TARGET) $(DUKE3D_MISCDEPS)
483
$(EDUKE32)$(EXESUFFIX): $(DUKE3D_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP) $(MACT_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_TARGET) $(DUKE3D_MISCDEPS)
428
	$(LINK_STATUS)
484
	$(LINK_STATUS)
429
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
485
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
430
ifeq ($(PLATFORM),WII)
486
ifeq ($(PLATFORM),WII)
431
ifneq ($(ELF2DOL),)
487
ifneq ($(ELF2DOL),)
432
	$(ELF2DOL) $(EDUKE32)$(EXESUFFIX) $(EDUKE32)$(DOLSUFFIX)
488
	$(ELF2DOL) $(EDUKE32)$(EXESUFFIX) $(EDUKE32)$(DOLSUFFIX)
433
endif
489
endif
434
endif
490
endif
435
ifneq ($(STRIP),)
491
ifneq ($(STRIP),)
436
	$(STRIP) $(EDUKE32)$(EXESUFFIX)
492
	$(STRIP) $@
437
endif
493
endif
438
ifeq ($(PLATFORM),DARWIN)
494
ifeq ($(PLATFORM),DARWIN)
439
	cp -RPf "platform/Apple/bundles/EDuke32.app" "./"
495
	cp -RPf "platform/Apple/bundles/EDuke32.app" "./"
440
	mkdir -p "EDuke32.app/Contents/MacOS"
496
	mkdir -p "EDuke32.app/Contents/MacOS"
441
	cp -f "$(EDUKE32)$(EXESUFFIX)" "EDuke32.app/Contents/MacOS/"
497
	cp -f "$(EDUKE32)$(EXESUFFIX)" "EDuke32.app/Contents/MacOS/"
Line 448... Line 504...
448
ifneq ($(ELF2DOL),)
504
ifneq ($(ELF2DOL),)
449
	$(ELF2DOL) $(MAPSTER32)$(EXESUFFIX) $(MAPSTER32)$(DOLSUFFIX)
505
	$(ELF2DOL) $(MAPSTER32)$(EXESUFFIX) $(MAPSTER32)$(DOLSUFFIX)
450
endif
506
endif
451
endif
507
endif
452
ifneq ($(STRIP),)
508
ifneq ($(STRIP),)
453
	$(STRIP) $(MAPSTER32)$(EXESUFFIX)
509
	$(STRIP) $@
454
endif
510
endif
455
ifeq ($(PLATFORM),DARWIN)
511
ifeq ($(PLATFORM),DARWIN)
456
	cp -RPf "platform/Apple/bundles/Mapster32.app" "./"
512
	cp -RPf "platform/Apple/bundles/Mapster32.app" "./"
457
	mkdir -p "Mapster32.app/Contents/MacOS"
513
	mkdir -p "Mapster32.app/Contents/MacOS"
458
	cp -f "$(MAPSTER32)$(EXESUFFIX)" "Mapster32.app/Contents/MacOS/"
514
	cp -f "$(MAPSTER32)$(EXESUFFIX)" "Mapster32.app/Contents/MacOS/"
459
endif
515
endif
460
516
-
 
517
$(SW)$(EXESUFFIX): $(SW_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP) $(MACT_OBJS_EXP) $(AUDIOLIB_OBJS_EXP)
-
 
518
	$(LINK_STATUS)
-
 
519
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
-
 
520
ifeq ($(PLATFORM),WII)
461
include Makefile.deps
521
ifneq ($(ELF2DOL),)
-
 
522
	$(ELF2DOL) $(SW)$(EXESUFFIX) $(SW)$(DOLSUFFIX)
-
 
523
endif
-
 
524
endif
-
 
525
ifneq ($(STRIP),)
-
 
526
	$(STRIP) $@
-
 
527
endif
-
 
528
-
 
529
$(SW_EDITOR)$(EXESUFFIX): $(SW_EDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP)
-
 
530
	$(LINK_STATUS)
-
 
531
	$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_EDITOR_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
-
 
532
ifeq ($(PLATFORM),WII)
-
 
533
ifneq ($(ELF2DOL),)
-
 
534
	$(ELF2DOL) $(SW_EDITOR)$(EXESUFFIX) $(SW_EDITOR)$(DOLSUFFIX)
-
 
535
endif
-
 
536
endif
-
 
537
ifneq ($(STRIP),)
-
 
538
	$(STRIP) $@
-
 
539
endif
-
 
540
462
include $(ENGINE_ROOT)/Makefile.deps
541
include $(ENGINE_ROOT)/Makefile.deps
-
 
542
include Makefile.deps
-
 
543
include $(SW_ROOT)/Makefile.deps
463
544
464
# RULES
545
# RULES
465
546
466
$(EBACKTRACEDLL): platform/Windows/src/backtrace.c
547
$(EBACKTRACEDLL): platform/Windows/src/backtrace.c
467
	$(COMPILE_STATUS)
548
	$(COMPILE_STATUS)
Line 572... Line 653...
572
653
573
$(ENGINE_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c | $(ENGINE_OBJ)
654
$(ENGINE_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c | $(ENGINE_OBJ)
574
	$(COMPILE_STATUS)
655
	$(COMPILE_STATUS)
575
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
656
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
576
657
-
 
658
$(MACT_OBJ)/%.$o: $(MACT_SRC)/%.c | $(MACT_OBJ)
-
 
659
	$(COMPILE_STATUS)
-
 
660
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
-
 
661
577
$(AUDIOLIB_OBJ)/%.o: $(AUDIOLIB_SRC)/%.c | $(AUDIOLIB_OBJ)
662
$(AUDIOLIB_OBJ)/%.o: $(AUDIOLIB_SRC)/%.c | $(AUDIOLIB_OBJ)
578
	$(COMPILE_STATUS)
663
	$(COMPILE_STATUS)
579
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(AUDIOLIB_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
664
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(AUDIOLIB_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
580
665
581
$(ENET_OBJ)/%.o: $(ENET_SRC)/%.c $(ENET_INC)/enet/*.h | $(ENET_OBJ)
666
$(ENET_OBJ)/%.o: $(ENET_SRC)/%.c $(ENET_INC)/enet/*.h | $(ENET_OBJ)
Line 584... Line 669...
584
669
585
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_SRC)/%.c | $(TESTGAME_OBJ)
670
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_SRC)/%.c | $(TESTGAME_OBJ)
586
	$(COMPILE_STATUS)
671
	$(COMPILE_STATUS)
587
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(TESTGAME_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
672
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(TESTGAME_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
588
673
-
 
674
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_SRC)/%.m | $(TESTGAME_OBJ)
-
 
675
	$(COMPILE_STATUS)
-
 
676
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(TESTGAME_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
-
 
677
589
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_RSRC)/%.rc | $(TESTGAME_OBJ)
678
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_RSRC)/%.rc | $(TESTGAME_OBJ)
590
	$(COMPILE_STATUS)
679
	$(COMPILE_STATUS)
591
	$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(TESTGAME_SRC) --include-dir=$(TESTGAME_RSRC) $(RECIPE_RESULT_COMPILE)
680
	$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(TESTGAME_SRC) --include-dir=$(TESTGAME_RSRC) $(RECIPE_RESULT_COMPILE)
592
681
593
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_RSRC)/%.c | $(TESTGAME_OBJ)
682
$(TESTGAME_OBJ)/%.$o: $(TESTGAME_RSRC)/%.c | $(TESTGAME_OBJ)
594
	$(COMPILE_STATUS)
683
	$(COMPILE_STATUS)
595
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(TESTGAME_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
684
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(TESTGAME_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
596
685
-
 
686
$(TESTGAME_RSRC)/%_banner.c: $(TESTGAME_RSRC)/%.bmp
-
 
687
	echo "#include \"gtkpixdata_shim.h\"" > $@
-
 
688
	gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
-
 
689
597
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.c | $(DUKE3D_OBJ)
690
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.c | $(DUKE3D_OBJ)
598
	$(COMPILE_STATUS)
691
	$(COMPILE_STATUS)
599
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
692
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
600
693
601
$(DUKE3D_OBJ)/rev.$o: $(DUKE3D_SRC)/rev.c | $(DUKE3D_OBJ)
694
$(DUKE3D_OBJ)/rev.$o: $(DUKE3D_SRC)/rev.c | $(DUKE3D_OBJ)
Line 612... Line 705...
612
705
613
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.cpp | $(DUKE3D_OBJ)
706
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.cpp | $(DUKE3D_OBJ)
614
	$(COMPILE_STATUS)
707
	$(COMPILE_STATUS)
615
	$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
708
	$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
616
709
617
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/jmact/%.c | $(DUKE3D_OBJ)
-
 
618
	$(COMPILE_STATUS)
-
 
619
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
-
 
620
-
 
621
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/misc/%.rc | $(DUKE3D_OBJ)
710
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/misc/%.rc | $(DUKE3D_OBJ)
622
	$(COMPILE_STATUS)
711
	$(COMPILE_STATUS)
623
	$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(DUKE3D_SRC) --include-dir=$(DUKE3D_RSRC) -DPOLYMER=$(POLYMER) $(RECIPE_RESULT_COMPILE)
712
	$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(DUKE3D_SRC) --include-dir=$(DUKE3D_RSRC) -DPOLYMER=$(POLYMER) $(RECIPE_RESULT_COMPILE)
624
713
625
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c | $(DUKE3D_OBJ)
714
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c | $(DUKE3D_OBJ)
626
	$(COMPILE_STATUS)
715
	$(COMPILE_STATUS)
627
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
716
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(DUKE3D_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
628
717
629
$(DUKE3D_RSRC)/%_banner.c: $(DUKE3D_RSRC)/%.bmp
718
$(DUKE3D_RSRC)/%_banner.c: $(DUKE3D_RSRC)/%.bmp
630
	echo "#include \"gtkpixdata_shim.h\"" > $@
719
	echo "#include \"gtkpixdata_shim.h\"" > $@
631
	gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
-
 
632
720
-
 
721
$(SW_OBJ)/%.$o: $(SW_SRC)/%.c | $(SW_OBJ)
-
 
722
	$(COMPILE_STATUS)
-
 
723
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(SW_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
-
 
724
-
 
725
$(SW_OBJ)/%.$o: $(SW_SRC)/%.m | $(SW_OBJ)
-
 
726
	$(COMPILE_STATUS)
-
 
727
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(SW_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
-
 
728
-
 
729
$(SW_OBJ)/%.$o: $(SW_RSRC)/%.rc | $(SW_OBJ)
-
 
730
	$(COMPILE_STATUS)
-
 
731
	$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(SW_SRC) --include-dir=$(SW_RSRC) $(RECIPE_RESULT_COMPILE)
-
 
732
-
 
733
$(SW_OBJ)/%.$o: $(SW_RSRC)/%.c | $(SW_OBJ)
-
 
734
	$(COMPILE_STATUS)
-
 
735
	$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(SW_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
-
 
736
633
$(TESTGAME_RSRC)/%_banner.c: $(TESTGAME_RSRC)/%.bmp
737
$(SW_RSRC)/%_banner.c: $(SW_RSRC)/%.bmp
634
	echo "#include \"gtkpixdata_shim.h\"" > $@
738
	echo "#include \"gtkpixdata_shim.h\"" > $@
635
	gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
739
	gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
636
740
637
$(ENGINE_OBJ) $(AUDIOLIB_OBJ) $(ENET_OBJ) $(DUKE3D_OBJ) $(TESTGAME_OBJ):
741
$(ENGINE_OBJ) $(MACT_OBJ) $(AUDIOLIB_OBJ) $(ENET_OBJ) $(TESTGAME_OBJ) $(DUKE3D_OBJ) $(SW_OBJ):
638
	-mkdir $@ $(DONT_PRINT) $(DONT_FAIL)
742
	-mkdir $@ $(DONT_PRINT) $(DONT_FAIL)
639
743
640
## PHONIES
744
## PHONIES
641
745
-
 
746
clean: cleanduke3d
-
 
747
642
# Delete executables, object files created from sources in source/, and
748
# Delete executables, object files created from sources in source/, and
643
# miscellaneous generated files related to Lunatic on non-Linux.
749
# miscellaneous generated files related to Lunatic on non-Linux.
644
clean:
750
cleanduke3d:
-
 
751
ifeq ($(PRETTY_OUTPUT),1)
645
	echo "rm -f $(EDUKE32)$(EXESUFFIX) $(MAPSTER32)$(EXESUFFIX) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)"
752
	echo "rm -f $(EDUKE32)$(EXESUFFIX) $(MAPSTER32)$(EXESUFFIX) $(DUKE3D_OBJ)/*.$o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)"
-
 
753
endif
646
	-rm -f $(EDUKE32)$(EXESUFFIX) $(MAPSTER32)$(EXESUFFIX) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)
754
	-rm -f $(EDUKE32)$(EXESUFFIX) $(MAPSTER32)$(EXESUFFIX) $(DUKE3D_OBJ)/*.$o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)
647
ifeq ($(PLATFORM),DARWIN)
755
ifeq ($(PLATFORM),DARWIN)
648
	-rm -rf EDuke32.app Mapster32.app
756
	-rm -rf EDuke32.app Mapster32.app
649
endif
757
endif
650
758
651
cleantest:
759
cleantest:
652
	-rm -f $(TESTGAME)$(EXESUFFIX) $(TESTEDITOR)$(EXESUFFIX) $(TESTGAME_OBJS_EXP) $(TESTEDITOR_OBJS_EXP)
760
	-rm -f $(TESTGAME)$(EXESUFFIX) $(TESTEDITOR)$(EXESUFFIX) $(TESTGAME_OBJ)/*.$o
-
 
761
-
 
762
cleansw:
-
 
763
	-rm -f $(SW)$(EXESUFFIX) $(SW_EDITOR)$(EXESUFFIX) $(SW_OBJ)/*.$o
653
764
654
cleanutils:
765
cleanutils:
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)
766
	-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)
656
767
657
veryclean: clean cleanutils
768
veryclean: clean cleanutils
-
 
769
ifeq ($(PRETTY_OUTPUT),1)
658
	echo "Removed test game and utils objects."
770
	echo "Removed test game and utils objects."
659
	echo "rm -f $(ENGINE_OBJ)/*.o $(AUDIOLIB_OBJ)/*.o $(ENET_OBJ)/*.o $(DUKE3D_RSRC)/*banner* $(EBACKTRACEDLL)"
771
	echo "rm -f $(ENGINE_OBJ)/*.$o $(MACT_OBJ)/*.$o $(AUDIOLIB_OBJ)/*.$o $(ENET_OBJ)/*.$o $(DUKE3D_RSRC)/*banner* $(EBACKTRACEDLL)"
-
 
772
endif
660
	-rm -f $(ENGINE_OBJ)/*.o $(AUDIOLIB_OBJ)/*.o $(ENET_OBJ)/*.o $(DUKE3D_RSRC)/*banner* $(EBACKTRACEDLL)
773
	-rm -f $(ENGINE_OBJ)/*.$o $(MACT_OBJ)/*.$o $(AUDIOLIB_OBJ)/*.$o $(ENET_OBJ)/*.$o $(DUKE3D_RSRC)/*banner* $(EBACKTRACEDLL)
661
774
662
printutils:
775
printutils:
663
	echo "$(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS))"
776
	echo "$(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS))"
664
777
665
printdxutils:
778
printdxutils: