gba-trycatch
view Makefile @ 4:78d1664c2443
- fixed sin_x16/cos_x16
- added fixed point header
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 14 Jun 2014 03:04:56 +0300 |
parents | 0d2602a1b851 |
children | 850be43b3135 |
line source
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.o)
3 dep = $(obj:.o=.d)
4 name = trycatch
5 elf = $(name).elf
6 bin = $(name).gba
7 elf_mb = $(name)_mb.elf
8 bin_mb = $(name)_mb.gba
10 ARCH = arm-none-eabi
12 CPP = $(ARCH)-cpp
13 CC = $(ARCH)-gcc
14 AS = $(ARCH)-as
15 OBJCOPY = $(ARCH)-objcopy
16 EMU = vbam
18 #opt = -O3 -fomit-frame-pointer -mcpu=arm7tdmi -mtune=arm7tdmi
19 dbg = -g
21 CFLAGS = $(opt) $(dbg) -pedantic -Wall -I../gbasys/src -I.
22 LDFLAGS = ../gbasys/libgbasys.a -lm
23 EMUFLAGS = -T 100 -f 1
25 .PHONY: all
26 all: $(bin) $(bin_mb)
29 $(bin): $(elf)
30 $(OBJCOPY) -O binary $(elf) $(bin)
31 gbafix $(bin)
33 $(bin_mb): $(elf_mb)
34 $(OBJCOPY) -O binary $(elf_mb) $(bin_mb)
35 gbafix $(bin_mb)
37 $(elf): $(obj) ../gbasys/libgbasys.a
38 $(CC) -o $(elf) $(obj) -specs=gba.specs $(LDFLAGS)
40 $(elf_mb): $(obj) ../gbasys/libgbasys.a
41 $(CC) -o $(elf_mb) $(obj) -specs=gba_mb.specs $(LDFLAGS)
43 -include $(dep)
45 %.d: %.c
46 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
48 .PHONY: clean
49 clean:
50 rm -f $(obj) $(dep) $(bin) $(bin_mb) $(elf) $(elf_mb)
52 .PHONY: install
53 install: $(bin)
54 if2a -n -f -W $<
56 .PHONY: run
57 run: $(bin_mb)
58 if2a -m $<
60 .PHONY: simrun
61 simrun: $(bin)
62 $(EMU) $(EMUFLAGS) $(bin)