94 lines
3.1 KiB
Makefile
94 lines
3.1 KiB
Makefile
.PRECIOUS: bins/*
|
|
|
|
export PATH := $(PATH):/home/nick/code/nes/go-fds/bin
|
|
|
|
all: dasm/ bins/ labels/ \
|
|
dasm/disksys.asm \
|
|
dasm/dk3_file4.asm \
|
|
dasm/dk3_rom.asm \
|
|
dasm/dk3.asm \
|
|
dasm/dk3_file3.asm \
|
|
dasm/dk3_file4-post-copy.asm \
|
|
dasm/sf_bb-ram_precopy.asm \
|
|
dasm/sf_bb-ram_postcopy.asm \
|
|
dasm/sf_bb-ram_save_precopy.asm \
|
|
dasm/sf_bb-ram_save_postcopy.asm \
|
|
dasm/sf_rom-qd_file1_precopy.asm \
|
|
dasm/sf_rom-qd_file1_postcopy.asm \
|
|
dasm/sf_slow_rom-qd_file1_precopy.asm \
|
|
dasm/sf_slow_rom-qd_file1_postcopy.asm \
|
|
dasm/sf_slow_rom_file1_precopy.asm \
|
|
dasm/sf_slow_rom_file1_postcopy.asm \
|
|
dasm/sf_slow_qd_file1_precopy.asm \
|
|
dasm/sf_slow_qd_file1_postcopy.asm \
|
|
dasm/sf_slow_rom-qd_postromcopy.asm \
|
|
labels/sf_slow_rom_file1_postcopy.mlb \
|
|
labels/sf_slow_qd_file1_postcopy.mlb \
|
|
labels/sf_slow_rom-qd_file1_postcopy.mlb \
|
|
labels/sf_rom-qd_file1_postcopy.mlb \
|
|
labels/dk3_file4-post-copy.mlb
|
|
|
|
dasm/dk3_file3.asm: bins/dk3_file3.bin
|
|
dasm/dk3_file4.asm: bins/dk3_file4.bin
|
|
dasm/dk3_file4-post-copy.asm: bins/dk3_file4.bin
|
|
dasm/sf_rom-qd_file1_precopy.asm: bins/sf_rom-qd_file1.bin
|
|
dasm/sf_rom-qd_file1_postcopy.asm: bins/sf_rom-qd_file1.bin
|
|
dasm/sf_slow_rom-qd_file1_precopy.asm: bins/sf_slow_rom-qd_file1.bin
|
|
dasm/sf_slow_rom-qd_file1_postcopy.asm: bins/sf_slow_rom-qd_file1.bin
|
|
dasm/sf_slow_rom_file1_precopy.asm: bins/sf_slow_rom_file1.bin
|
|
dasm/sf_slow_rom_file1_postcopy.asm: bins/sf_slow_rom_file1.bin
|
|
dasm/sf_slow_qd_file1_precopy.asm: bins/sf_slow_qd_file1.bin
|
|
dasm/sf_slow_qd_file1_postcopy.asm: bins/sf_slow_qd_file1.bin
|
|
dasm/sf_slow_rom-qd_postromcopy.asm: bins/sf_slow_rom-qd_file1.bin
|
|
dasm/sf_bb-ram_precopy.asm: bins/sf_bb-ram_file1.bin
|
|
dasm/sf_bb-ram_postcopy.asm: bins/sf_bb-ram_file1.bin
|
|
dasm/sf_bb-ram_save_precopy.asm: bins/sf_bb-ram_save_file1.bin
|
|
|
|
clean:
|
|
-rm dasm/* bins/* labels/*
|
|
|
|
%/:
|
|
-mkdir $@
|
|
|
|
roms/sf_bb-ram_save.fds: roms/sf_bb-ram_save.ips roms/sf_bb-ram.fds
|
|
flips --apply $^ $@
|
|
|
|
dasm/dk3_rom.asm: bins/dk3_file2.bin bins/dk3_file3.bin dk3_rom.cfg
|
|
tail -c 6144 bins/dk3_file2.bin > bins/dk3_rom.bin
|
|
cat bins/dk3_file3.bin >> bins/dk3_rom.bin
|
|
head -c 10240 bins/dk3_file2.bin >> bins/dk3_rom.bin
|
|
da65 -i dk3_rom.cfg -o $@
|
|
|
|
dasm/dk3.asm: dk3.cfg
|
|
da65 -i $< -o $@
|
|
|
|
dasm/%.asm: %.cfg.tmp
|
|
da65 -i $< -o $@
|
|
|
|
sf_slow_rom-qd_postromcopy.cfg.tmp: sf_slow_rom-qd_postromcopy.cfg rom-qd.cfg labels.cfg
|
|
cat $^ > $@
|
|
|
|
dk3_file4-post-copy.cfg.tmp: dk3_file4-post-copy.cfg rom-qd.cfg labels.cfg
|
|
cat $^ > $@
|
|
|
|
%.cfg.tmp: %.cfg labels.cfg
|
|
cat $^ > $@
|
|
|
|
labels/%.mlb: %.cfg.tmp
|
|
dasm2mlb $^ $@ --rom-start 0xE000 --ram-start 0x5000
|
|
|
|
bins/sf_bb-ram_file1.bin: roms/sf_bb-ram.fds
|
|
fdsextract --side 0 --file-num 1 --output $@ $^
|
|
|
|
bins/dk3_file2.bin: roms/sf_dk3.fds
|
|
fdsextract --side 0 --file-num 2 --output $@ $^
|
|
|
|
bins/dk3_file3.bin: roms/sf_dk3.fds
|
|
fdsextract --side 0 --file-num 3 --output $@ $^
|
|
|
|
bins/dk3_file4.bin: roms/sf_dk3.fds
|
|
fdsextract --side 0 --file-num 4 --output $@ $^
|
|
|
|
bins/%_file1.bin: roms/%.fds
|
|
fdsextract --side 0 --file-num 1 --output $@ $^
|