libpsys

view examples/simple/Makefile @ 1:874a942853ad

foobar
author John Tsiombikas <nuclear@mutantstargoat.com>
date Sat, 24 Sep 2011 20:44:42 +0300
parents
children 6e5342a2529a
line source
1 src = $(wildcard *.c)
2 obj = $(src:.c=.o)
3 dep = $(obj:.o=.d)
4 bin = simple
6 incdir = ../../src
7 libdir = ../..
8 liba = $(libdir)/libpsys.a
10 CC = gcc
11 CFLAGS = -pedantic -Wall -g -I$(incdir) `pkg-config --cflags vmath`
12 LDFLAGS = -L$(libdir) $(liba) $(libgl) -lanim `pkg-config --libs vmath` -lm
14 ifeq ($(shell uname -s), Darwin)
15 libgl = -framework OpenGL -framework GLUT
16 else
17 libgl = -lGL -lGLU -lglut
18 endif
20 $(bin): $(obj) $(liba)
21 $(CC) -o $@ $(obj) $(LDFLAGS)
23 -include $(dep)
25 %.d: %.c
26 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.o=.d) >$@
28 .PHONY: clean
29 clean:
30 rm -f $(obj) $(bin)