nuclear@1: src = $(wildcard src/*.cc) \ nuclear@1: $(wildcard src/audio/*.cc) \ nuclear@1: $(wildcard libs/vmath/*.cc) nuclear@1: csrc = $(wildcard src/*.c) \ nuclear@1: $(wildcard src/dsys/*.c) \ nuclear@1: $(wildcard libs/vmath/*.c) \ nuclear@1: $(wildcard libs/imago/*.c) \ nuclear@1: $(wildcard libs/libjpeg/*.c) \ nuclear@1: $(wildcard libs/libpng/*.c) \ nuclear@1: $(wildcard libs/zlib/*.c) \ nuclear@1: $(wildcard libs/ogg/*.c) \ nuclear@1: $(wildcard libs/vorbis/*.c) nuclear@1: nuclear@0: obj = $(src:.cc=.o) $(csrc:.c=.o) nuclear@0: dep = $(obj:.o=.d) nuclear@0: bin = halloween nuclear@0: nuclear@0: opt = -O2 nuclear@0: nuclear@1: inc = -Isrc -Ilibs/libjpeg -Ilibs/zlib -Ilibs/libpng -Ilibs/imago \ nuclear@1: -Ilibs/ogg -Ilibs/vorbis nuclear@2: warn = -pedantic -Wall nuclear@0: nuclear@2: CFLAGS = $(warn) -g $(opt) $(inc) nuclear@2: CXXFLAGS = $(warn) -g $(opt) $(inc) nuclear@1: LDFLAGS = $(libgl) $(libal) -lm -ldl -lpthread nuclear@1: nuclear@1: sys = $(shell uname -s) nuclear@1: ifeq ($(sys), Darwin) nuclear@2: libgl = -framework OpenGL -framework GLUT -lGLEW nuclear@2: libal = -framework OpenAL nuclear@2: warn += -Wno-deprecated-declarations nuclear@2: else nuclear@1: libgl = -lGL -lGLU -lglut -lGLEW nuclear@1: libal = -lopenal nuclear@1: endif nuclear@1: nuclear@1: $(bin): $(obj) Makefile nuclear@0: $(CXX) -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: %.d: %.cc nuclear@0: @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@0: nuclear@0: .PHONY: clean nuclear@0: clean: nuclear@0: rm -f $(obj) $(bin) nuclear@0: nuclear@0: .PHONY: cleandep nuclear@0: cleandep: nuclear@0: rm -f $(dep)