1 src = $(wildcard src/*.c) $(wildcard src/pc/*.c)
2 ssrc = $(wildcard src/*.s) data/lut.s
3 obj = $(src:.c=.o) $(ssrc:.s=.o)
7 opt = -O0 -fno-strict-aliasing -fcommon
9 inc = -I. -Isrc -Isrc/gba
10 warn = -pedantic -Wall
12 CFLAGS = $(opt) $(dbg) $(warn) -MMD $(def) $(inc)
17 sys = $(shell uname -s | sed 's/MINGW.*/mingw/')
19 libs = -lopengl32 -lwinmm
21 libs = -lGL -lX11 -lXext
26 $(CC) -o $@ $(obj) $(LDFLAGS)
30 src/data.o: src/data.s $(data)
32 tools/pngdump/pngdump:
33 $(MAKE) -C tools/pngdump
35 tools/lutgen: tools/lutgen.c
38 tools/vistab: tools/vistab.c
41 %.sraw: %.png tools/pngdump/pngdump
42 tools/pngdump/pngdump -o $@ -oc $(subst .sraw,.spal,$@) -os $(subst .sraw,.shade,$@) -s 8 $<
44 %.raw: %.png tools/pngdump/pngdump
45 tools/pngdump/pngdump -o $@ -n $<
47 %.pal: %.png tools/pngdump/pngdump
48 tools/pngdump/pngdump -o $@ -c $<
50 data/lut.s: tools/lutgen