forked from andrew-jacobs/w65c265sxb-hacker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
59 lines (46 loc) · 1.58 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
#===============================================================================
# CC65 Tools Assembler Definitions
#-------------------------------------------------------------------------------
AS = ca65
LD = cl65
RM = rm
AS_FLAGS += --listing $(@:.obj=.lst) -o $@ -DW65C265SXB
LD_FLAGS = -C $(CFG) -vm -m $(MAP)
#===============================================================================
# Rules
#-------------------------------------------------------------------------------
.asm.obj:
$(AS) $(AS_FLAGS) $<
#===============================================================================
# Targets
#-------------------------------------------------------------------------------
CFG = sxb-hacker.cfg
MAP = sxb-hacker.map
SREC = sxb-hacker.s28
BINS = sxb-0x0200.bin sxb-0x0300.bin
OBJS = w65c265sxb.obj sxb-hacker.obj
LSTS = w65c265sxb.lst sxb-hacker.lst
all: $(BINS) $(SREC)
clean:
$(RM) -f $(MAP) $(SREC)\
$(OBJS)\
$(LSTS)\
$(BINS)
debug:
$(DEBUG)
#===============================================================================
# Dependencies
#-------------------------------------------------------------------------------
$(BINS): $(OBJS) $(CFG)
$(LD) $(LD_FLAGS) -o $@ $(OBJS)
$(SREC): $(BINS)
srec_cat -o $(SREC)\
-data-only\
-execution_start_address 0x0000\
-address-length 3 -line-length 47\
sxb-0x0200.bin -binary -offset 0x0200\
sxb-0x0300.bin -binary -offset 0x0300
cmp $(SREC) originals/$(SREC)
w65c265sxb.obj: w65c265.inc w65c265sxb.inc w65c265sxb.asm
sxb-hacker.obj: w65c265.inc sxb-hacker.asm
.SUFFIXES: .asm .obj