gba-x3dtest

view Makefile.sdl @ 17:0a7f402892b3

texture mapping
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 26 Jun 2014 06:57:51 +0300
parents 02cf4011f566
children
line source
1 # vi:set filetype=make:
2 src = $(filter-out src/main.c,$(wildcard src/*.c)) $(wildcard src/sdlsys/*.c)
3 imgfiles = $(wildcard *.png)
4 obj = $(src:.c=.x86.o) $(imgfiles:.png=.img.x86.o)
5 dep = $(obj:.o=.d)
6 bin = x3dtest
8 warn = -Wall -Wno-unused-function
10 CFLAGS = -pedantic $(warn) -g `pkg-config sdl --cflags` -I. -Isrc -Isrc/sdlsys
11 LDFLAGS = `pkg-config sdl --libs` -lm
13 $(bin): $(obj)
14 $(CC) -o $@ $(obj) $(LDFLAGS)
16 %.x86.o: %.c
17 $(CC) $(CFLAGS) -o $@ -c $<
19 -include $(dep)
21 %.x86.d: %.c
22 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
24 %.img.c: %.png
25 img2gba $<
27 .PHONY: clean
28 clean:
29 rm -f $(obj) $(bin)