-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
81 lines (60 loc) · 1.9 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
#===============================================================================
# WDC Tools Assembler Definitions
#-------------------------------------------------------------------------------
AS = wdc816as
LD = wdcln
RM = erase
AS_FLAGS = -g -l
DEBUG = wdcdb.exe
#===============================================================================
# Rules
#-------------------------------------------------------------------------------
.asm.obj:
$(AS) $(AS_FLAGS) $<
#===============================================================================
# Targets
#-------------------------------------------------------------------------------
OBJS = \
w65c265sxb.obj \
w65c265rom.obj \
ans-forth.obj \
word-area.obj
all: ans-forth.s28 rom-forth.s19 rom-forth.bin
clean:
$(RM) $(OBJS)
$(RM) *.bin
$(RM) *.s19
$(RM) *.s28
$(RM) *.lst
$(RM) *.map
$(RM) *.sym
debug:
$(DEBUG)
#===============================================================================
# Dependencies
#-------------------------------------------------------------------------------
ans-forth.s28: w65c265sxb.obj ans-forth.obj word-area.obj
$(LD) -g -hm28 -t -C0300 -Zudata=0200,8000 -O $@ w65c265sxb.obj ans-forth.obj word-area.obj
# w65c265rom.obj ans-forth.obj word-area.obj
rom-forth.bin: rom-forth.s19
srec_cat rom-forth.s19 -offset - 0x8000 -o rom-forth.bin -binary
# $(LD) -g -hz -t -C8000 -U0300 -Zcode=8000,10000 -O $@ w65c265rom.obj ans-forth.obj word-area.obj
rom-forth.s19: w65c265rom.obj ans-forth.obj word-area.obj
$(LD) -g -hm19 -t -C8000 -U0300 -Zcode=8000,10000 -O $@ w65c265rom.obj ans-forth.obj word-area.obj
w65c265sxb.obj: \
w65c816.inc \
w65c265.inc \
w65c265sxb.inc \
w65c265sxb.asm
w65c265rom.obj: \
w65c816.inc \
w65c265.inc \
w65c265sxb.inc \
w65c265rom.asm
ans-forth.obj: \
w65c816.inc \
ans-forth.asm \
device.asm
word-area.obj: \
w65c816.inc \
word-area.asm