-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile.sdcc
More file actions
47 lines (34 loc) · 1.2 KB
/
Makefile.sdcc
File metadata and controls
47 lines (34 loc) · 1.2 KB
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
SDCCROOT = /mnt/share/local/sdcc-exp/bin
SDCC = $(SDCCROOT)/sdcc
SDAS = $(SDCCROOT)/sdas6500
MAKEBIN = $(SDCCROOT)/makebin
SDKROOT = ../../../cbm-games/cbm-sdk
TARGET = -mmos6502 -D__C64__
SDCCOPT=--max-allocs-per-node 25000 --opt-code-speed
SDCCDEBUG=--fverbose-asm --i-code-in-asm
SDKINC = -I $(SDKROOT)/include
VPATH=../src
INCLUDE=../src
SYS_INCLUDE=../src
CART = --code-loc 0x8000 --xram-loc 0x1000 $(SDKROOT)/lib/c64_cart_crt0.rel
PRG = --code-loc 0x7ff --xram-loc 0x8000 $(SDKROOT)/lib/c64_prg_crt0.rel
LIBS = -l c64.lib
CFLAGS = $(TARGET) $(SDCCOPT) $(SDKINC)
LDFLAGS = -L $(SDKROOT)/lib --out-fmt-ihx -mmos6502 --no-std-crt0
CFLAGS += -I. -I$(INCLUDE) -I$(SYS_INCLUDE)
OBJECTS= vt100_escape.rel acia_recv_as.rel putchar80_as.rel scroll_as.rel \
char_tables.rel soft80-font.rel
gterm.bin:
clean:
rm -f *.ihx *.rel *.map *.noi *.asm *.lk *.sym *.lst
.PRECIOUS: %.rel %.ihx
%.bin: %.rel $(OBJECTS)
$(SDCC) $(LDFLAGS) $(CART) $(LIBS) $(OBJECTS) $< -o $@.ihx
$(MAKEBIN) -o 0x8000 -s 0xc000 $@.ihx $@
%.prg: %.rel $(OBJECTS)
$(SDCC) $(LDFLAGS) $(PRG) $(LIBS) $(OBJECTS) $< -o $@.ihx
$(MAKEBIN) -o 0x7ff -s 0xd000 -p $@.ihx $@
%.rel: %.c
$(SDCC) $(CFLAGS) -c -o $@ $<
%.rel: %.s
$(SDAS) -jxlosp $@ $<