libpsys
view examples/simple/Makefile @ 8:a10f19674147
ha!
author | John Tsiombikas <nuclear@mutantstargoat.com> |
---|---|
date | Tue, 27 Sep 2011 21:47:27 +0300 |
parents | 874a942853ad |
children |
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 -limago `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)