blob: 8c61b3603ef573876f9652e02c7247d8edaba93d (
plain)
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
|
CC=arm-none-eabi-gcc
OBJCOPY=arm-none-eabi-objcopy
CFLAGS=-Wall -fno-diagnostics-color -c
ARCH=-mthumb -mthumb-interwork
SPECS=-specs=gba.specs
O=o
BIN=$(HOME)/bin
TARG=adventure
OFILES=\
main.$O\
HFILES=\
dat.h\
regs.h\
.PHONY: all install uninstall clean
all: $(TARG)
%.$O: %.c
$(CC) $(ARCH) $(CFLAGS) $<
$(OFILES): $(HFILES)
$(TARG): $(OFILES)
$(CC) $(SPECS) $(ARCH) -o $@ $< $(LIBS) $(LDFLAGS)
$(OBJCOPY) -O binary $@ $@.gba
gbafix $@.gba
install: $(TARG)
cp $(TARG) $(BIN)/
uninstall:
rm -f $(BIN)/$(TARG)
clean:
rm $(OFILES) $(TARG) *.gba
|