nuclear@0: src = $(wildcard src/*.c) nuclear@0: obj = $(src:.c=.o) nuclear@0: dep = $(obj:.o=.d) nuclear@1: bin = metaballs nuclear@0: nuclear@2: # uncomment the following line to disable shaders (for old systems like SGI or whatever) nuclear@2: #nosdr = -DNO_SHADERS nuclear@2: nuclear@0: CC = gcc nuclear@5: CFLAGS = -pedantic -Wall -g -I../../src $(inc) $(nosdr) nuclear@1: LDFLAGS = -L../.. -lmetasurf $(libgl) nuclear@0: nuclear@0: ifeq ($(shell uname -s), Darwin) nuclear@5: inc = -I/opt/local/include nuclear@5: libgl = -L/opt/local/lib -framework OpenGL -framework GLUT -lGLEW nuclear@0: else nuclear@0: libgl = -lGL -lGLU -lglut -lGLEW nuclear@0: endif nuclear@0: nuclear@0: $(bin): $(obj) nuclear@0: $(CC) -o $@ $(obj) $(LDFLAGS) nuclear@0: nuclear@0: -include $(dep) nuclear@0: nuclear@0: %.d: %.c nuclear@0: @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@0: nuclear@0: .PHONY: clean nuclear@0: clean: nuclear@0: rm -f $(obj) $(bin) nuclear@0: nuclear@0: nuclear@0: .PHONY: cleandep nuclear@0: cleandep: nuclear@0: rm -f $(dep)