gba-x3dtest

view Makefile @ 20:2e903e27e35a

fixed x3d_disable_texture added runtime teture checks in the rasterizer
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 01 Jul 2014 23:23:37 +0300
parents f907b2c50a8b
children
line source
1 src = $(filter-out src/main_sdl.c,$(wildcard src/*.c))
2 imgfiles = $(wildcard *.png)
3 obj = $(src:.c=.o) $(imgfiles:.png=.img.o)
4 dep = $(obj:.o=.d)
5 name = x3dtest
6 elf = $(name).elf
7 bin = $(name).gba
8 elf_mb = $(name)_mb.elf
9 bin_mb = $(name)_mb.gba
11 ARCH = arm-none-eabi
13 CPP = $(ARCH)-cpp
14 CC = $(ARCH)-gcc
15 AS = $(ARCH)-as
16 OBJCOPY = $(ARCH)-objcopy
17 EMU = vbam
19 opt = -O3 -fomit-frame-pointer -mcpu=arm7tdmi -mtune=arm7tdmi
20 dbg = -g
22 CFLAGS = $(opt) $(dbg) -pedantic -Wall -I. -I../gbasys/src
23 LDFLAGS = ../gbasys/libgbasys.a -lm
24 EMUFLAGS = -T 100 -f 1 --agb-print
26 .PHONY: all
27 all: $(bin) $(bin_mb)
30 $(bin): $(elf)
31 $(OBJCOPY) -O binary $(elf) $(bin)
32 gbafix $(bin)
34 $(bin_mb): $(elf_mb)
35 $(OBJCOPY) -O binary $(elf_mb) $(bin_mb)
36 gbafix $(bin_mb)
38 $(elf): $(obj) ../gbasys/libgbasys.a
39 $(CC) -o $(elf) $(obj) -specs=gba.specs $(LDFLAGS)
41 $(elf_mb): $(obj) ../gbasys/libgbasys.a
42 $(CC) -o $(elf_mb) $(obj) -specs=gba_mb.specs $(LDFLAGS)
44 -include $(dep)
46 %.d: %.c
47 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
49 %.img.c: %.png
50 img2gba $<
52 .PHONY: clean
53 clean:
54 rm -f $(obj) $(dep) $(bin) $(bin_mb) $(elf) $(elf_mb)
56 .PHONY: install
57 install: $(bin)
58 if2a -n -f -W $<
60 .PHONY: run
61 run: $(bin_mb)
62 if2a -m $<
64 .PHONY: simrun
65 simrun: $(bin)
66 $(EMU) $(EMUFLAGS) $(bin)