metasurf

annotate examples/simple/Makefile @ 4:2c575855f707

added simple example
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 25 Oct 2011 23:21:32 +0300
parents
children 94220a9600b3
rev   line source
nuclear@4 1 src = $(wildcard *.c)
nuclear@4 2 obj = $(src:.c=.o)
nuclear@4 3 bin = simple
nuclear@4 4
nuclear@4 5 CC = gcc
nuclear@4 6 CFLAGS = -pedantic -Wall -g -I../../src
nuclear@4 7 LDFLAGS = -L../.. -lmetasurf $(libgl)
nuclear@4 8
nuclear@4 9 ifeq ($(shell uname -s), Darwin)
nuclear@4 10 libgl = -framework OpenGL -framework GLUT
nuclear@4 11 else
nuclear@4 12 libgl = -lGL -lGLU -lglut
nuclear@4 13 endif
nuclear@4 14
nuclear@4 15 $(bin): $(obj)
nuclear@4 16 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@4 17
nuclear@4 18 .PHONY: clean
nuclear@4 19 clean:
nuclear@4 20 rm -f $(obj) $(bin)