nuclear@1: src = $(wildcard *.c) nuclear@1: obj = $(src:.c=.o) nuclear@1: dep = $(obj:.o=.d) nuclear@1: bin = simple nuclear@1: nuclear@1: incdir = ../../src nuclear@1: libdir = ../.. nuclear@1: liba = $(libdir)/libpsys.a nuclear@1: nuclear@1: CC = gcc nuclear@1: CFLAGS = -pedantic -Wall -g -I$(incdir) `pkg-config --cflags vmath` nuclear@1: LDFLAGS = -L$(libdir) $(liba) $(libgl) -lanim `pkg-config --libs vmath` -lm nuclear@1: nuclear@1: ifeq ($(shell uname -s), Darwin) nuclear@1: libgl = -framework OpenGL -framework GLUT nuclear@1: else nuclear@1: libgl = -lGL -lGLU -lglut nuclear@1: endif nuclear@1: nuclear@1: $(bin): $(obj) $(liba) nuclear@1: $(CC) -o $@ $(obj) $(LDFLAGS) nuclear@1: nuclear@1: -include $(dep) nuclear@1: nuclear@1: %.d: %.c nuclear@1: @$(CPP) $(CFLAGS) $< -MM -MT $(@:.o=.d) >$@ nuclear@1: nuclear@1: .PHONY: clean nuclear@1: clean: nuclear@1: rm -f $(obj) $(bin)