fbee

diff Makefile @ 1:2471e9b63432

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 07 Feb 2013 16:03:32 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Thu Feb 07 16:03:32 2013 +0200
     1.3 @@ -0,0 +1,25 @@
     1.4 +gfxsys_cflags = `sdl-config --cflags`
     1.5 +gfxsys_ldflags = `sdl-config --libs`
     1.6 +
     1.7 +src = $(wildcard src/*.c)
     1.8 +obj = $(src:.c=.o)
     1.9 +lib_a = libfbee.a
    1.10 +bin = fbee_test
    1.11 +
    1.12 +inc = -Iinclude -Isrc
    1.13 +
    1.14 +CFLAGS = -pedantic -Wall -g $(inc) $(gfxsys_cflags)
    1.15 +LDFLAGS = $(gfxsys_ldflags)
    1.16 +
    1.17 +$(bin): test.o $(lib_a)
    1.18 +	$(CC) -o $@ test.o $(lib_a) $(LDFLAGS)
    1.19 +
    1.20 +$(lib_a): $(obj)
    1.21 +	$(AR) rcs $@ $(obj)
    1.22 +
    1.23 +%.d: %.c
    1.24 +	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.25 +
    1.26 +.PHONY: clean
    1.27 +clean:
    1.28 +	rm -f $(obj) $(bin) test.o $(lib_a)