export PATH := tools:../../link/tools/:$(PATH) SHELL = /bin/bash BITNAX = bitnax D64WRITE = d64write X64 = x64 MAKE_FLAGS = RELEASE=1 .PHONY: all toolchain vice vice1 all: toolchain image1.d64 toolchain: $(MAKE) -C ../../../tool/c6510 $(MAKE) -C ../../../tool/acme/src $(MAKE) -C ../../../tool/dasm $(MAKE) -C ../../../tool/bitfire $(MAKE) -C ../../../tool/bitnax $(MAKE) -C ../../../tool/dreamass cp ../../../tool/c6510/c6510 tools/ cp ../../../tool/acme/src/acme tools/ cp ../../../tool/dasm/dasm tools/ cp ../../../tool/dreamass/dreamass tools/ cp ../../../tool/bitfire/d64write tools/ cp ../../../tool/bitnax/bitnax tools/ vice: all $(X64) -pal -autostart "image1.d64:*" -truedrive -model c64c vice1: toolchain image1.d64 $(X64) -pal -autostart "image1.d64:*" -truedrive -model c64c ############################################################### image1.d64: comaland.prg bootside1.prg tune1.prg rasterrot.prg explode.prg bitmap.prg bitmap_fadeout2.prg shadowscroll.prg shadow_fadeout.prg plotballs_fadein.prg plotballs.prg plotballs_fadeout.prg comalanddef.prg escos.prg note.prg $(D64WRITE) -c $@ --side 1 -a 49 ../bitbreaker/dirart/side1.prg \ --boot comaland.prg \ -b bootside1.prg \ -b rasterrot.prg \ -b tune1.prg \ -b explode.prg \ -b bitmap1.prg \ -b bitmap2.prg \ -b bitmap3.prg \ -b bitmap4.prg \ -b bitmap5.prg \ -b bitmap_fadeout2.prg \ -b comalanddef1.prg \ -b comalanddef2.prg \ -b plotballs_fadein.prg \ -b plotballs.prg \ -b plotballs_fadeout.prg \ -b shadowscroll1.prg \ -b shadowscroll2.prg \ -b shadowscroll3.prg \ -b shadow_fadeout.prg \ -b escos1.prg \ -b escos2.prg \ -b escos3.prg \ -s "erotic note" ##################### SIDE 1 ################################## note.prg: force_look cd ../Axis/note/; $(MAKE) $(MAKE_FLAGS) $(BITNAX) --bitfire --sfx 0x4000 -o "erotic note" ../Axis/note/note comaland.prg: force_look cd ../bootloader/stage1/; $(MAKE) $(MAKE_FLAGS) link_exit=0x0100 SIDE=1 $(BITNAX) --sfx 0x0900 -o $@ ../bootloader/stage1/stage1 bootside1.prg: force_look cd ../bootloader/stage2/; $(MAKE) $(MAKE_FLAGS) link_exit=0x2000 SIDE=1 $(BITNAX) --bitfire -o $@ ../bootloader/stage2/stage2 tune1.prg: ../../Music/dEViLOCk/tune_side10x900.prg $(BITNAX) --bitfire -o $@ --load-addr 0xe000 $^ rasterrot.prg: force_look cd ../Axis/RasterRotate/; $(MAKE) $(MAKE_FLAGS) link_exit=8192 $(BITNAX) --bitfire -o $@ ../Axis/RasterRotate/rasterrot explode.prg: force_look cd ../Mirage/FontExplodeMultiplex; $(MAKE) $(MAKE_FLAGS) link_exit=0x300c $(BITNAX) --bitfire -o $@ ../Mirage/FontExplodeMultiplex/explode bitmap.prg: force_look cd ../Lavazza/bitmapscroller/; $(MAKE) $(MAKE_FLAGS) link_exit=0x0400 $(BITNAX) --bitfire -o $(basename $@)1.prg --cut-input-addr 0x3000 0xffff ../Lavazza/bitmapscroller/bitmap $(BITNAX) --bitfire -o $(basename $@)2.prg ../Lavazza/bitmapscroller/part2.prg $(BITNAX) --bitfire -o $(basename $@)3.prg ../Lavazza/bitmapscroller/part3.prg $(BITNAX) --bitfire -o $(basename $@)4.prg ../Lavazza/bitmapscroller/part4.prg $(BITNAX) --bitfire -o $(basename $@)5.prg ../Lavazza/bitmapscroller/part5.prg bitmap_fadeout2.prg: force_look cd ../CRT/bitmap_fadeout2/; $(MAKE) $(MAKE_FLAGS) link_exit=0x6400 $(BITNAX) --bitfire -o $@ ../CRT/bitmap_fadeout2/bitmap_fadeout2 comalanddef.prg: force_look cd ../Bob/bob_yazoo/; $(MAKE) $(MAKE_FLAGS) link_exit=0xf000; $(BITNAX) --bitfire -o $(basename $@)1.prg --cut-input-addr 0xbff8 0xffff --load-addr 0xe400 ../Bob/bob_yazoo/comalanddef $(BITNAX) --bitfire -o $(basename $@)2.prg --cut-input-addr 0x2000 0xbff8 ../Bob/bob_yazoo/comalanddef plotballs_fadein.prg: force_look cd ../bitbreaker/plotball_fadein/; $(MAKE) $(MAKE_FLAGS) link_exit=0x4000; $(BITNAX) --bitfire -o $@ --load-addr 0x9b00 ../bitbreaker/plotball_fadein/plotball_fadein plotballs.prg: force_look cd ../bitbreaker/plotballs/; $(MAKE) $(MAKE_FLAGS) link_exit=0x0400; $(BITNAX) --bitfire -o $@ ../bitbreaker/plotballs/plotballs plotballs_fadeout.prg: force_look cd ../bitbreaker/plotball_fadeout/; $(MAKE) $(MAKE_FLAGS) link_exit=0x2000; $(BITNAX) --bitfire -o $@ ../bitbreaker/plotball_fadeout/plotball_fadeout shadowscroll.prg: force_look cd ../CRT/shadowscroll; $(MAKE) $(MAKE_FLAGS) link_exit=0x0400 $(BITNAX) --bitfire -o $(basename $@)1.prg --cut-input-addr 0xcff0 0xffff ../CRT/shadowscroll/shadowscroll $(BITNAX) --bitfire -o $(basename $@)2.prg --cut-input-addr 0x2000 0xbff8 ../CRT/shadowscroll/shadowscroll $(BITNAX) --bitfire -o $(basename $@)3.prg --cut-input-addr 0xbff8 0xcff0 ../CRT/shadowscroll/shadowscroll shadow_fadeout.prg: force_look cd ../CRT/shadow_fadeout/; $(MAKE) $(MAKE_FLAGS) link_exit=0x2000 $(BITNAX) --bitfire -o $@ ../CRT/shadow_fadeout/shadow_fadeout escos.prg: force_look cd ../Swallow/escos_scroll; $(MAKE) $(MAKE_FLAGS) link_exit=0x0100 $(BITNAX) --bitfire -o $(basename $@)1.prg --cut-input-addr 0xbff0 0xffff --load-addr 0xe400 ../Swallow/escos_scroll/escos $(BITNAX) --bitfire -o $(basename $@)2.prg --cut-input-addr 0x2000 0xbff0 ../Swallow/escos_scroll/escos cp ../Swallow/escos_scroll/low.prg $(basename $@)3.prg ############################################################### clean: -rm *.prg *.d64 -rm ../Axis/note/note -rm ../bootloader/stage1/stage1 -rm ../bootloader/stage2/stage2 #side1 -rm ../Axis/RasterRotate/rasterrot -rm ../Lavazza/bitmapscroller/bitmap -rm ../CRT/bitmap_fadeout2/bitmap_fadeout2 -rm ../CRT/shadowscroll/shadowscroll -rm ../CRT/shadow_fadeout/shadow_fadeout -rm ../bitbreaker/plotball_fadein/plotball_fadein -rm ../bitbreaker/plotballs/plotballs -rm ../bitbreaker/plotball_fadeout/plotball_fadeout -rm ../Mirage/FontExplodeMultiplex/explode -rm ../Swallow/escos_scroll/escos -rm ../Bob/bob_yazoo/comalanddef -rm "erotic note" #$(MAKE) -C ../../../tool/c6510 clean #$(MAKE) -C ../../../tool/acme/src clean #$(MAKE) -C ../../../tool/dasm clean #$(MAKE) -C ../../../tool/bitfire clean #$(MAKE) -C ../../../tool/bitnax clean #$(MAKE) -C ../../../tool/dreamass clean force_look: @true
ACME = acme ACMEOPT = -v1 -f cbm .PHONY: clean all: bumble bumble: afli.asm bumble_pic.prg ifdef RELEASE ${ACME} ${ACMEOPT} -DRELEASE=1 -Dlink_exit=$(link_exit) -o $@ $< else ${ACME} ${ACMEOPT} -o $@.prg $< ../../../../tool/bitnax/bitnax --sfx 0x9000 -o $@.prg $@.prg endif clean: -rm bumble bumble.prg
!ifdef RELEASE { ;reset frame counter lda #$00 sta link_frame_count+0 sta link_frame_count+1 ;load + depack some part jsr link_loadnext_uncr ;load some part jsr link_loadnext_raw !ifdef WAIT_FRAME_COUNTER { ;sync to frame counter +wait_frame_count $0200 } else { ;or wait for a trigger from your effect if you are sure it takes longer than loading trig lda #$00 beq trig } ;fadeout the effect jsr fadeout ;unlink irq to resident irq handler +link_player_irq ;depack last part loaded and start it +link_uncr_jmp link_exit }
Surely there's got to be a better tool than make out there though, especially the recursive variety. Unfortunately my last attempt to find one mostly turned up slew of tools aimed to ease cross-platform compilation. Personally I eventually ended up kludging together a build engine driven by some Lua scripts but let's just that it's still far from being the ideal tool..
I'm using coroutines myself (with macros)
IMO there are currently no better tools out there than Make. Tracking dependencies is a tough problem in general, and like with most tough problems there are no easy solutions. I usually end up hardcoding the dependencies, falling back on full rebuilds occasionally... But that's mostly due to stupid laziness.
Another common problem is, that timing marks that work perfect one day to cover the whole loading time on every device dont fit anymore a few days later. this can be caused by parts growing, or even by other parts earlier on the disk that move the succeeding parts on different tracks and sectors. I can tell you, that phenomenom has bitten us uncountable times, always in the worst moments. And mostly during development (Vice or Ultimate), everything is fine. But then someone does a test on a slow floppy drive and the whole timing is fucked. The "debug" build could check if all timing marks still have enough safety-margin (e.g. 50 frames). And if not, exit the demo with an error-message.
Why am I forced to put up with a wonky declarative script instead of a sane imperative scripting language as god intended? Why not spare a few cycles to verify the precise file information against a database and check up on that the expected artifacts really did get generated instead of relying on relative time-stamps which always seem to get out-of-sync? Why not make the command executable an implicit dependency of the rule? And so on, and so forth.