forked from actraiser/dust-tutorial-c64-first-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (54 loc) · 1.23 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
#
#
# Build the dust tutorial.
#
#
# copy make.defs.sample to make.defs and edit the paths
include make.defs
CLEAN=rm -rf
MKDIR=mkdir -p
BUILD=hello_world
PROG_PRG=$(BUILD).prg
PROG_CBM=$(BUILD).cbm
BUILDPATH=build
SOURCE=index.asm
INCLUDEPATH=code
INCLUDES= \
$(INCLUDEPATH)/data_colorwash.asm \
$(INCLUDEPATH)/data_static_text.asm \
$(INCLUDEPATH)/init_clear_screen.asm \
$(INCLUDEPATH)/init_static_text.asm \
$(INCLUDEPATH)/load_resources.asm \
$(INCLUDEPATH)/main.asm \
$(INCLUDEPATH)/setup_symbols.asm \
$(INCLUDEPATH)/sub_colorwash.asm \
$(INCLUDEPATH)/sub_music.asm
RESOURCESPATH=resources
RESOURCES=$(RESOURCESPATH)/jeff_donald.sid
all:: dirs compile crunch
dirs: $(BUILDPATH)
$(BUILDPATH):
$(MKDIR) $@
clean:
$(CLEAN) $(BUILDPATH)
compile: $(BUILDPATH)/$(PROG_CBM)
$(BUILDPATH)/$(PROG_CBM): $(SOURCE) $(INCLUDES) $(RESOURCES) dirs
$(ACMEPATH)/acme \
-r $(BUILDPATH)/buildreport \
--vicelabels $(BUILDPATH)/labels \
--msvc \
--color \
--format cbm \
-v3 \
--outfile $@ \
$<
crunch: $(BUILDPATH)/$(PROG_PRG)
$(BUILDPATH)/$(PROG_PRG): $(BUILDPATH)/$(PROG_CBM)
$(CRUNCHERPATH)/pucrunch \
-x0x0801 \
-c64 \
-g55 \
-fshort $< \
$@
run: $(BUILDPATH)/$(PROG_PRG)
$(EMULATORPATH)/x64 $(EMULATORARGS) $<