libpsys
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/examples/simple/Makefile Sat Sep 24 20:44:42 2011 +0300 1.3 @@ -0,0 +1,30 @@ 1.4 +src = $(wildcard *.c) 1.5 +obj = $(src:.c=.o) 1.6 +dep = $(obj:.o=.d) 1.7 +bin = simple 1.8 + 1.9 +incdir = ../../src 1.10 +libdir = ../.. 1.11 +liba = $(libdir)/libpsys.a 1.12 + 1.13 +CC = gcc 1.14 +CFLAGS = -pedantic -Wall -g -I$(incdir) `pkg-config --cflags vmath` 1.15 +LDFLAGS = -L$(libdir) $(liba) $(libgl) -lanim `pkg-config --libs vmath` -lm 1.16 + 1.17 +ifeq ($(shell uname -s), Darwin) 1.18 + libgl = -framework OpenGL -framework GLUT 1.19 +else 1.20 + libgl = -lGL -lGLU -lglut 1.21 +endif 1.22 + 1.23 +$(bin): $(obj) $(liba) 1.24 + $(CC) -o $@ $(obj) $(LDFLAGS) 1.25 + 1.26 +-include $(dep) 1.27 + 1.28 +%.d: %.c 1.29 + @$(CPP) $(CFLAGS) $< -MM -MT $(@:.o=.d) >$@ 1.30 + 1.31 +.PHONY: clean 1.32 +clean: 1.33 + rm -f $(obj) $(bin)