This repository has been archived by the owner on Jan 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
122 lines (94 loc) · 4.08 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
110
111
112
113
114
115
116
117
118
119
120
121
122
PROJECT=makeshift
PROJECTSOURCE=$(PROJECT).asm
PROJECTTARGET=$(PROJECT).prg
PROJECTSYM=$(PROJECT).sym
PACKEDINTRO=packed-intro.bin
PACKREPORT=report.html
INTRO=intro
INTROSOURCE=$(INTRO).asm
INTROTARGET=$(INTRO).bin
INTROSYM=$(INTRO).sym
MUSIC=music
MUSICSOURCE=$(MUSIC).asm
MUSICTARGET=$(MUSIC).prg
MUSICSYM=$(MUSIC).sym
FLDTEXT=fld-text
FLDTEXTDIR=$(FLDTEXT)
FLDTEXTSOURCE=$(FLDTEXTDIR)/$(FLDTEXT).asm
FLDTEXTINC=$(FLDTEXTDIR)/$(FLDTEXT).inc
FLDTEXTCODETARGET=$(FLDTEXTDIR)/$(FLDTEXT).prg
FLDTEXTDATATARGET=$(FLDTEXTDIR)/$(FLDTEXT)-data.prg
FLDTEXTSYM=$(FLDTEXTDIR)/$(FLDTEXT).sym
ZOOMPLASMA=zoom-plasma
ZOOMPLASMADIR=$(ZOOMPLASMA)
ZOOMPLASMASOURCE=$(ZOOMPLASMADIR)/$(ZOOMPLASMA).asm
ZOOMPLASMAINC=$(ZOOMPLASMADIR)/$(ZOOMPLASMA).inc
ZOOMPLASMACODETARGET=$(ZOOMPLASMADIR)/$(ZOOMPLASMA).prg
ZOOMPLASMADATATARGET=$(ZOOMPLASMADIR)/$(ZOOMPLASMA)-data.prg
ZOOMPLASMASYM=$(ZOOMPLASMADIR)/$(ZOOMPLASMA).sym
LAYERS=layers
LAYERSDIR=$(LAYERS)
LAYERSSOURCE=$(LAYERSDIR)/$(LAYERS).asm
LAYERSINC=$(LAYERSDIR)/$(LAYERS).inc
LAYERSCODETARGET=$(LAYERSDIR)/$(LAYERS).prg
LAYERSDATATARGET=$(LAYERSDIR)/$(LAYERS)-data.prg
LAYERSSYM=$(LAYERSDIR)/$(LAYERS).sym
SINEBOXES=sine-boxes
SINEBOXESDIR=$(SINEBOXES)
SINEBOXESSOURCE=$(SINEBOXESDIR)/$(SINEBOXES).asm
SINEBOXESINC=$(SINEBOXESDIR)/$(SINEBOXES).inc
SINEBOXESCODETARGET=$(SINEBOXESDIR)/$(SINEBOXES).prg
SINEBOXESDATATARGET=$(SINEBOXESDIR)/$(SINEBOXES)-data.prg
SINEBOXESSYM=$(SINEBOXESDIR)/$(SINEBOXES).sym
COMMONINC=common.inc
BASICINC=basic.inc
DISK=$(PROJECT).d64
EMU=x64
EMUSC=x64sc
EMUFLAGS=
RM=rm
RMFLAGS=-f
PACKER=admiral-p4kbar
PACKERDIR=$(PACKER)
PACKERFLAGS=--release
PACKERSPEED=instant
all: $(PROJECTTARGET)
$(PROJECTTARGET): $(PROJECTSOURCE) $(COMMONINC) $(BASICINC) $(INTROTARGET) $(PACKEDINTRO)
kickass -showmem $(PROJECTSOURCE)
$(PACKEDINTRO) $(PACKREPORT): packer $(INTROTARGET)
cd $(PACKERDIR) && cargo run $(PACKERFLAGS) -- $(CURDIR)/$(INTROTARGET) $(CURDIR)/$(PACKEDINTRO) $(CURDIR)/$(PACKREPORT) $(PACKERSPEED)
packer:
cd $(PACKERDIR) && cargo build --release
$(INTROTARGET) $(INTROSYM): $(INTROSOURCE) $(MUSICTARGET) $(FLDTEXTCODETARGET) $(FLDTEXTDATATARGET) $(FLDTEXTINC) $(ZOOMPLASMACODETARGET) $(ZOOMPLASMADATATARGET) $(ZOOMPLASMAINC) $(LAYERSCODETARGET) $(LAYERSDATATARGET) $(LAYERSINC) $(SINEBOXESCODETARGET) $(SINEBOXESDATATARGET) $(SINEBOXESINC) $(COMMONINC) $(BASICINC)
kickass -showmem -binfile $(INTROSOURCE)
$(MUSICTARGET) $(MUSICSYM): $(MUSICSOURCE)
kickass -showmem $(MUSICSOURCE)
$(FLDTEXTCODETARGET) $(FLDTEXTDATATARGET) $(FLDTEXTSYM): $(FLDTEXTSOURCE) $(FLDTEXTINC) $(COMMONINC) $(BASICINC) $(ZOOMPLASMAINC)
kickass -showmem $(FLDTEXTSOURCE)
$(ZOOMPLASMACODETARGET) $(ZOOMPLASMADATATARGET) $(ZOOMPLASMASYM): $(ZOOMPLASMASOURCE) $(ZOOMPLASMAINC) $(COMMONINC) $(BASICINC) $(SINEBOXESINC)
kickass -showmem $(ZOOMPLASMASOURCE)
$(LAYERSCODETARGET) $(LAYERSDATATARGET) $(LAYERSSYM): $(LAYERSSOURCE) $(LAYERSINC) $(COMMONINC) $(BASICINC) $(FLDTEXTINC)
kickass -showmem $(LAYERSSOURCE)
$(SINEBOXESCODETARGET) $(SINEBOXESDATATARGET) $(SINEBOXESSYM): $(SINEBOXESSOURCE) $(SINEBOXESINC) $(COMMONINC) $(BASICINC) $(LAYERSINC)
kickass -showmem $(SINEBOXESSOURCE)
pack: $(PACKEDINTRO)
# Instead of actually creating the disk, we get cheeky here and just replace the intro/note files
# in a pre-made disk file. This gets around certain 1541 limitations like no duplicate filenames
# and still allows us to just use the disk tool that comes with VICE.
$(DISK): $(PROJECTTARGET)
c1541 -attach $(DISK) -write $(PROJECTTARGET) "@0: makeshift "
disk: $(DISK)
test: $(DISK)
$(EMU) $(EMUFLAGS) $(DISK)
testsc: $(DISK)
$(EMUSC) $(EMUFLAGS) $(DISK)
clean:
$(RM) $(RMFLAGS) $(PROJECTTARGET) $(PROJECTSYM)
$(RM) $(RMFLAGS) $(PACKEDINTRO) $(PACKREPORT)
$(RM) $(RMFLAGS) $(INTROTARGET) $(INTROSYM)
$(RM) $(RMFLAGS) $(MUSICTARGET) $(MUSICSYM)
$(RM) $(RMFLAGS) $(FLDTEXTCODETARGET) $(FLDTEXTDATATARGET) $(FLDTEXTSYM)
$(RM) $(RMFLAGS) $(ZOOMPLASMACODETARGET) $(ZOOMPLASMADATATARGET) $(ZOOMPLASMASYM)
$(RM) $(RMFLAGS) $(LAYERSCODETARGET) $(LAYERSDATATARGET) $(LAYERSSYM)
$(RM) $(RMFLAGS) $(SINEBOXESCODETARGET) $(SINEBOXESDATATARGET) $(SINEBOXESSYM)
cd $(PACKERDIR) && cargo clean