-
Notifications
You must be signed in to change notification settings - Fork 0
/
part.mk
85 lines (61 loc) · 2.42 KB
/
part.mk
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
root_dir = ../..
include ../../common.mk
BUILD=hunkexe
sources = $(PART).asm $(PART).i $(deps) $(root_dir)/demo/timings.i
#-------------------------------------------------------------------------------
.PHONY: bin
bin: out/a.bin out/a.hd.bin
#-------------------------------------------------------------------------------
.PHONY: hunkexe
hunkexe: out/a.hunk.exe out/a.debug.exe
$(CP) "$<" "$(hd0)/a.exe"
#-------------------------------------------------------------------------------
.PHONY: elfexe
elfexe: out/a.exe
$(CP) "$<" "$(hd0)/a.exe"
#-------------------------------------------------------------------------------
.PHONY: run
run: run-$(EMULATOR)
.PHONY: run-amiberry
run-amiberry: $(BUILD)
$(AMIBERRY) $(AMIBERRYARGS) -s warp=true -s cycle_exact=false -s filesystem2=rw,RDH0:out:$(hd0),0
.PHONY: run-winuae
run-winuae: $(BUILD)
$(WINUAE) $(WINUAEARGS) -s warp=true -s cycle_exact=false -s filesystem2=rw,RDH0:out:$(hd0),0
.PHONY: run-fsuae
run-fsuae: $(BUILD)
$(FSUAE) $(FSUAEARGS) --hard_drive_0=$(hd0)
.PHONY: run-vamiga
run-vamiga: $(BUILD)
$(VAMIGA) $(hd0)/a.exe
#-------------------------------------------------------------------------------
.PHONY: clean
clean:
$(RM) $(wildcard out/*.*) $(wildcard data/*.*)
-include $(wildcard out/*.d)
#-------------------------------------------------------------------------------
# Trackmo build
out/$(PART).o: $(sources)
$(VASM) $(VASMARGS) -depend=make -depfile $@.d -Fhunk -DFW_DEMO_PART -o $@ $<
out/a.bin: out/$(PART).o
$(VLINK) $(VLINKARGS) -o $@ $<
#-------------------------------------------------------------------------------
# HD build
out/$(PART).hd.o: $(sources)
$(VASM) $(VASMARGS) -depend=make -depfile $@.d -Fhunk -DFW_DEMO_PART -DFW_HD_DEMO_PART -o $@ $<
out/a.hd.bin: out/$(PART).hd.o
$(VLINK) $(VLINKARGS) -o $@ $<
#-------------------------------------------------------------------------------
# Hunk exe build
out/a.hunk.exe: $(sources)
$(VASM) $(VASMARGS) -depend=make -depfile $@.d -Fhunkexe -kick1hunks -o $@ $<
out/a.debug.exe: $(sources)
$(VASM) $(VASMARGS) -depend=make -depfile $@.d -Fhunkexe -kick1hunks -linedebug -o $@ $<
#-------------------------------------------------------------------------------
# Elf2Hunk exe build (Bartman debugger)
out/$(PART).elf: $(sources)
$(VASM) $(VASMARGS) -depend=make -depfile $@.d -Felf -dwarf=3 -o $@ $<
out/a.elf: out/$(PART).elf
$(CC) $(CCFLAGS) $(LDFLAGS) $< -o $@
out/a.exe: out/a.elf
$(ELF2HUNK) $< $@ -s