-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (25 loc) · 794 Bytes
/
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
AS = vasm6809_oldstyle
LD = vlink
VPATH = src
# The test.o object must be first to ensure proper start of the executable code.
OBJECTS = obj/reset.o
# Order of the rest of the objects doesn't matter.
OBJECTS += obj/tables.o obj/vectors.o obj/exceptions.o obj/sound.o \
obj/screeneditor.o obj/blitter.o obj/monitor.o
# Flags
ASFLAGS = -Fvobj -6809 -quiet
LDFLAGS = -b rawbin1 -Trom.ld -Mrom.map
CCNATIVE = gcc
all: rom.bin
rom.bin: rom_unpatched.bin mk_rom
./mk_rom
rom_unpatched.bin: $(OBJECTS) rom.ld
$(LD) $(LDFLAGS) $(OBJECTS) -o rom_unpatched.bin
obj/%.o : %.s
$(AS) $(ASFLAGS) $< -o $@ -L $@.list
.PHONY: clean
clean:
rm mk_rom rom_unpatched.bin rom.bin rom.map rom.cpp $(OBJECTS)
cd obj && rm *.list && cd ..
mk_rom: tools/mk_rom.c
$(CCNATIVE) -o mk_rom tools/mk_rom.c