metasurf

annotate examples/metaballs/Makefile @ 11:430d8dde62aa

random changes
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 23 Aug 2015 07:17:56 +0300
parents 246260d95415
children
rev   line source
nuclear@0 1 src = $(wildcard src/*.c)
nuclear@0 2 obj = $(src:.c=.o)
nuclear@0 3 dep = $(obj:.o=.d)
nuclear@1 4 bin = metaballs
nuclear@0 5
nuclear@2 6 # uncomment the following line to disable shaders (for old systems like SGI or whatever)
nuclear@2 7 #nosdr = -DNO_SHADERS
nuclear@2 8
nuclear@0 9 CC = gcc
nuclear@5 10 CFLAGS = -pedantic -Wall -g -I../../src $(inc) $(nosdr)
nuclear@8 11 LDFLAGS = -L../.. -lmetasurf $(libgl) -lm
nuclear@0 12
nuclear@0 13 ifeq ($(shell uname -s), Darwin)
nuclear@5 14 inc = -I/opt/local/include
nuclear@5 15 libgl = -L/opt/local/lib -framework OpenGL -framework GLUT -lGLEW
nuclear@0 16 else
nuclear@7 17 libgl = -L/usr/local/lib -lGL -lGLU -lglut -lGLEW
nuclear@0 18 endif
nuclear@0 19
nuclear@0 20 $(bin): $(obj)
nuclear@0 21 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@0 22
nuclear@0 23 -include $(dep)
nuclear@0 24
nuclear@0 25 %.d: %.c
nuclear@0 26 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@0 27
nuclear@0 28 .PHONY: clean
nuclear@0 29 clean:
nuclear@0 30 rm -f $(obj) $(bin)
nuclear@0 31
nuclear@0 32
nuclear@0 33 .PHONY: cleandep
nuclear@0 34 cleandep:
nuclear@0 35 rm -f $(dep)