nuclear@0: src = $(wildcard src/*.c) nuclear@0: obj = $(src:.c=.o) nuclear@0: dep = $(obj:.o=.d) nuclear@0: bin = volray nuclear@0: nuclear@0: CC = gcc nuclear@3: CFLAGS = -pedantic -Wall -g $(incdir) nuclear@3: LDFLAGS = $(libdir) $(libgl) -limago -lvmath -lm nuclear@0: nuclear@0: ifeq ($(shell uname -s), Darwin) nuclear@3: libgl = -framework OpenGL -framework GLUT -lGLEW nuclear@3: incdir = -I/opt/local/include nuclear@3: libdir = -L/opt/local/lib nuclear@0: else nuclear@0: libgl = -lGL -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)