gba-x3dtest
annotate 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 |
rev | line source |
---|---|
nuclear@5 | 1 # vi:set filetype=make: |
nuclear@5 | 2 src = $(filter-out src/main.c,$(wildcard src/*.c)) $(wildcard src/sdlsys/*.c) |
nuclear@5 | 3 obj = $(src:.c=.x86.o) |
nuclear@5 | 4 dep = $(obj:.o=.d) |
nuclear@16 | 5 bin = x3dtest |
nuclear@5 | 6 |
nuclear@9 | 7 warn = -Wall -Wno-unused-function |
nuclear@9 | 8 |
nuclear@9 | 9 CFLAGS = -pedantic $(warn) -g `pkg-config sdl --cflags` -Isrc -Isrc/sdlsys |
nuclear@5 | 10 LDFLAGS = `pkg-config sdl --libs` -lm |
nuclear@5 | 11 |
nuclear@5 | 12 $(bin): $(obj) |
nuclear@5 | 13 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@5 | 14 |
nuclear@5 | 15 %.x86.o: %.c |
nuclear@5 | 16 $(CC) $(CFLAGS) -o $@ -c $< |
nuclear@5 | 17 |
nuclear@9 | 18 -include $(dep) |
nuclear@9 | 19 |
nuclear@9 | 20 %.x86.d: %.c |
nuclear@9 | 21 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@9 | 22 |
nuclear@5 | 23 .PHONY: clean |
nuclear@5 | 24 clean: |
nuclear@5 | 25 rm -f $(obj) $(bin) |