-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (26 loc) · 661 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (26 loc) · 661 Bytes
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
# output
OUT=output.bin
OBJ=debugfont string joy z80 vdp dma state_dummy state_title state_game state_gameover statelist statemanager main exception init header
INC=
MAP=output.map
AFLAGS=-ldots -spaces -warncomm -Isrc
LDFLAGS= -Bstatic
# tooling
ASM68=bin/vasmm68k_mot
LD=bin/vlink
EMU=tools/blastem/blastem
OBJLIST = $(foreach o,$(OBJ),./obj/$(o).o68)
.PHONY: $(OUT)
all: $(OUT)
run: $(OUT)
$(EMU) $(OUT)
debug: $(OUT)
$(EMU) -d $(OUT)
./obj/%.o68: ./src/%.s68
$(ASM68) $(AFLAGS) -L $(<:src/%.s68=list/%.lst) -Fvobj $< -o $@
$(OUT): $(OBJLIST)
$(LD) -T linker.ld $(LDFLAGS) -b rawbin1 -M$(MAP) -o $@ $^
clean:
rm $(OUT)
rm $(OBJLIST)
rm $(MAP)