metasurf

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/examples/simple/Makefile	Tue Oct 25 23:21:32 2011 +0300
     1.3 @@ -0,0 +1,20 @@
     1.4 +src = $(wildcard *.c)
     1.5 +obj = $(src:.c=.o)
     1.6 +bin = simple
     1.7 +
     1.8 +CC = gcc
     1.9 +CFLAGS = -pedantic -Wall -g -I../../src
    1.10 +LDFLAGS = -L../.. -lmetasurf $(libgl)
    1.11 +
    1.12 +ifeq ($(shell uname -s), Darwin)
    1.13 +	libgl = -framework OpenGL -framework GLUT
    1.14 +else
    1.15 +	libgl = -lGL -lGLU -lglut
    1.16 +endif
    1.17 +
    1.18 +$(bin): $(obj)
    1.19 +	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.20 +
    1.21 +.PHONY: clean
    1.22 +clean:
    1.23 +	rm -f $(obj) $(bin)