libpsys

annotate examples/simple/Makefile @ 20:0a53b22f7caf

the billboarding was wrong ...
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 18 Sep 2012 09:38:48 +0300
parents 874a942853ad
children
rev   line source
nuclear@1 1 src = $(wildcard *.c)
nuclear@1 2 obj = $(src:.c=.o)
nuclear@1 3 dep = $(obj:.o=.d)
nuclear@1 4 bin = simple
nuclear@1 5
nuclear@1 6 incdir = ../../src
nuclear@1 7 libdir = ../..
nuclear@1 8 liba = $(libdir)/libpsys.a
nuclear@1 9
nuclear@1 10 CC = gcc
nuclear@1 11 CFLAGS = -pedantic -Wall -g -I$(incdir) `pkg-config --cflags vmath`
nuclear@2 12 LDFLAGS = -L$(libdir) $(liba) $(libgl) -lanim -limago `pkg-config --libs vmath` -lm
nuclear@1 13
nuclear@1 14 ifeq ($(shell uname -s), Darwin)
nuclear@1 15 libgl = -framework OpenGL -framework GLUT
nuclear@1 16 else
nuclear@1 17 libgl = -lGL -lGLU -lglut
nuclear@1 18 endif
nuclear@1 19
nuclear@1 20 $(bin): $(obj) $(liba)
nuclear@1 21 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@1 22
nuclear@1 23 -include $(dep)
nuclear@1 24
nuclear@1 25 %.d: %.c
nuclear@1 26 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.o=.d) >$@
nuclear@1 27
nuclear@1 28 .PHONY: clean
nuclear@1 29 clean:
nuclear@1 30 rm -f $(obj) $(bin)