-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
109 lines (83 loc) · 2.83 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
PROG=DESiRE-InsideTheMachine
MOD=inside_the_machine
EMULATOR=amiberry
adf=dist/$(PROG).adf
exe=dist/$(PROG)-hd.exe
root_dir = .
include common.mk
music = \
music/$(MOD).lsmusic \
music/$(MOD).lsbank \
music/$(MOD).lsmusic.zx0 \
music/$(MOD).lsbank.zx0 \
outputs = \
demo/bootblock.bin \
demo/trackmo_launcher.bin \
$(adf) \
$(exe)
all: $(adf) $(exe)
$(adf): $(music) parts demo/bootblock.bin demo/trackmo_launcher.bin demo/layout.txt
ifdef OS
powershell -Command '$$env:PATH = ".\\bin\\win"; $(PLATOSADF) -ndb 4 --label INTHMACH -f $@ demo/bootblock.bin demo/layout.txt'
else
$(PLATOSADF) -ndb 4 --label INTHMACH -f $@ demo/bootblock.bin demo/layout.txt
endif
demo/hddemo.adf: $(music) parts demo/bootblock.bin demo/hdlayout.txt
ifdef OS
powershell -Command '$$env:PATH = ".\\bin\\win"; $(PLATOSADF) -ndb 4 --label INTHMACH -f -t $@ demo/bootblock.bin demo/hdlayout.txt'
else
$(PLATOSADF) -ndb 4 --label INTHMACH -f -t $@ demo/bootblock.bin demo/hdlayout.txt
endif
demo/bootblock.bin: framework/bootblock.asm
$(VASM) -m68010 -Fbin -phxass -o $@ -I../includes $<
demo/trackmo_launcher.bin: demo/trackmo_launcher.asm demo/trackmo_script.asm demo/trackmo_script.i demo/trackmo_settings.i $(wildcard framework/*)
$(VASM) -m68000 -Fbin -phxass -o $@ -I../includes $<
$(exe): demo/hd_launcher.asm demo/hddemo.adf demo/trackmo_script.asm demo/trackmo_script.i demo/hdtrackmo_settings.i $(wildcard framework/*)
$(VASM) -m68000 -Fhunkexe -kick1hunks -phxass -o $@ -I../includes $<
#-------------------------------------------------------------------------------
.PHONY: run
run: run-$(EMULATOR)
.PHONY: run-amiberry
run-amiberry: $(adf)
$(AMIBERRY) $(AMIBERRYARGS) -s floppy0=$<
.PHONY: run-winuae
run-winuae: $(adf)
$(WINUAE) $(WINUAEARGS) -s floppy0=$(CURDIR)/$<
.PHONY: run-fsuae
run-fsuae: $(adf)
$(FSUAE) $(FSUAEARGS) $<
.PHONY: run-vamiga
run-vamiga: $(adf)
$(VAMIGA) $<
#-------------------------------------------------------------------------------
.PHONY: runhd
runhd: runhd-$(EMULATOR)
.PHONY: runhd-amiberry
runhd-amiberry: $(exe)
$(CP) "$<" "$(hd0)/a.exe"
$(AMIBERRY) $(AMIBERRYARGS) -s warp=true -s cycle_exact=false -s filesystem2=rw,RDH0:out:$(hd0),0
.PHONY: runhd-winuae
runhd-winuae: $(exe)
$(CP) "$<" "$(hd0)/a.exe"
$(WINUAE) $(WINUAEARGS) -s warp=true -s cycle_exact=false -s filesystem2=rw,RDH0:out:$(hd0),0
.PHONY: runhd-fsuae
runhd-fsuae: $(exe)
$(CP) "$<" "$(hd0)/a.exe"
$(FSUAE) $(FSUAEARGS) --hard_drive_0=$(hd0)
.PHONY: runhd-vamiga
runhd-vamiga: $(exe)
$(CP) "$<" "$(hd0)/a.exe"
$(VAMIGA) $(hd0)/a.exe
#-------------------------------------------------------------------------------
part_dirs = $(wildcard parts/*)
.PHONY: parts $(part_dirs)
parts: $(part_dirs)
$(part_dirs):
@$(MAKE) -C $@
.PHONY: clean
clean:
$(RM) $(music) $(outputs)
@for part in $(part_dirs); do \
$(MAKE) -C $$part clean; \
done
music: $(music)