-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (47 loc) · 1.24 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
# Hey Emacs, this is a -*- makefile -*-i
# Enable verbose compilation with "make verbose=1"
ifdef verbose
R :=
E := @:
else
R := @
E := @echo
endif
DEPENDS = ./Makefile
OBJDIR = obj
DISTDIR = dist
SRCDIR = src
AS = lwasm
ASFLAGS = --6809 --decb --list=$(OBJDIR)/flash.lst
ASOUT = -o
MKDIR = mkdir
RM = rm
ECHO = echo
DECB = decb
IMAGE = flash.dsk
all: bin image $(DEPENDS)
image: bin $(DISTDIR)/$(IMAGE)
$(E) " Adding autoexec to image"
$(R)$(DECB) copy -r $(SRCDIR)/autoexec.bas $(DISTDIR)/$(IMAGE),AUTOEXEC.BAS -0 -t
$(E) " Adding flash.bin to image"
$(R)$(DECB) copy -r -2 $(OBJDIR)/flash.bin $(DISTDIR)/$(IMAGE),FLASH.BIN
$(E) " Adding testcart.ccc to image"
$(R)$(DECB) copy -r -2 testcart.ccc $(DISTDIR)/$(IMAGE),TESTCART.CCC
$(DISTDIR)/$(IMAGE):
$(E) " Creating disk image"
$(R)$(DECB) dskini $(DISTDIR)/$(IMAGE)
bin: $(SRCDIR)/flash.asm directories
$(E) " Assembling flash.bin"
$(R)$(AS) $(ASFLAGS) $(ASOUT) $(OBJDIR)/flash.bin $(SRCDIR)/flash.asm
directories: $(OBJDIR) $(DISTDIR)
$(OBJDIR):
$(E) " Creating $(OBJDIR)"
-$(R)$(MKDIR) $(OBJDIR)
$(DISTDIR):
$(E) " Creating $(DISTDIR)"
$(R)$(MKDIR) $(DISTDIR)
clean:
$(E) " Clean"
-$(R)$(RM) -rf $(OBJDIR) $(DISTDIR)
.PHONY:
directories