nuclear@10: csrc = $(wildcard src/*.c) $(wildcard src/imtk/*.c) $(wildcard src/glew/*.c) nuclear@0: ccsrc = $(wildcard src/*.cc) nuclear@0: obj = $(ccsrc:.cc=.o) $(csrc:.c=.o) nuclear@10: dep = $(ccsrc:.cc=.d) $(csrc:.c=.d) nuclear@0: bin = rayfract nuclear@0: nuclear@10: sys := $(shell uname -s | sed 's/MINGW.*/mingw/') nuclear@10: ifeq ($(sys), mingw) nuclear@10: bin = rayfract.exe nuclear@10: libgl = -lopengl32 -lglu32 -lfreeglut nuclear@10: obj = $(ccsrc:.cc=.w32.o) $(csrc:.c=.w32.o) nuclear@10: else ifeq ($(sys), Darwin) nuclear@10: libgl = -framework OpenGL -framework GLUT nuclear@0: else nuclear@10: libgl = -lGL -lGLU -lglut nuclear@0: endif nuclear@0: nuclear@10: CFLAGS = -pedantic -Wall -g -Isrc/glew -I/usr/local/include -DGLEW_STATIC -MMD nuclear@10: CXXFLAGS = -pedantic -Wall -g -Isrc/glew -I/usr/local/include -DGLEW_STATIC -MMD nuclear@10: LDFLAGS = -L/usr/local/lib $(libgl) nuclear@0: nuclear@0: $(bin): $(obj) nuclear@0: $(CXX) -o $@ $(obj) $(LDFLAGS) nuclear@0: nuclear@10: -include $(dep) nuclear@10: nuclear@10: %.w32.o: %.c nuclear@10: $(CC) -o $@ $(CFLAGS) -c $< nuclear@10: nuclear@10: %.w32.o: %.cc nuclear@10: $(CXX) -o $@ $(CXXFLAGS) -c $< nuclear@10: nuclear@0: .PHONY: clean nuclear@0: clean: nuclear@0: rm -f $(obj) $(bin) nuclear@10: nuclear@10: .PHONY: cleandep nuclear@10: cleandep: nuclear@10: rm -f $(dep) nuclear@10: nuclear@10: .PHONY: win nuclear@10: win: nuclear@10: $(MAKE) sys=mingw CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ nuclear@10: nuclear@10: .PHONY: clean-win nuclear@10: clean-win: nuclear@10: $(MAKE) sys=mingw CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ clean nuclear@10: nuclear@10: .PHONY: cleandep-win nuclear@10: cleandep-win: nuclear@10: $(MAKE) sys=mingw CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ cleandep