gba-x3dtest

view Makefile.sdl @ 16:02cf4011f566

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 25 Jun 2014 18:18:05 +0300
parents b0ed38f13261
children 0a7f402892b3
line source
1 # vi:set filetype=make:
2 src = $(filter-out src/main.c,$(wildcard src/*.c)) $(wildcard src/sdlsys/*.c)
3 obj = $(src:.c=.x86.o)
4 dep = $(obj:.o=.d)
5 bin = x3dtest
7 warn = -Wall -Wno-unused-function
9 CFLAGS = -pedantic $(warn) -g `pkg-config sdl --cflags` -Isrc -Isrc/sdlsys
10 LDFLAGS = `pkg-config sdl --libs` -lm
12 $(bin): $(obj)
13 $(CC) -o $@ $(obj) $(LDFLAGS)
15 %.x86.o: %.c
16 $(CC) $(CFLAGS) -o $@ -c $<
18 -include $(dep)
20 %.x86.d: %.c
21 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
23 .PHONY: clean
24 clean:
25 rm -f $(obj) $(bin)