vrseasons
annotate Makefile @ 2:eea1b91dc3d4
added is_complete() to framebuffer object and fixed GL_UNSUPPORTED_FRAMEBUFFER on intel
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 13 Apr 2015 16:51:52 +0300 |
parents | |
children |
rev | line source |
---|---|
nuclear@0 | 1 csrc = $(wildcard src/*.c) |
nuclear@0 | 2 ccsrc = $(wildcard src/*.cc) |
nuclear@0 | 3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) |
nuclear@0 | 4 dep = $(obj:.o=.d) |
nuclear@0 | 5 bin = vrseasons |
nuclear@0 | 6 |
nuclear@0 | 7 sys = $(shell uname -s) |
nuclear@0 | 8 |
nuclear@0 | 9 use_glut = 1 |
nuclear@0 | 10 |
nuclear@0 | 11 CFLAGS = -pedantic -Wall -g |
nuclear@0 | 12 CXXFLAGS = $(CFLAGS) |
nuclear@0 | 13 LDFLAGS = $(libgl_$(sys)) -ldl -lgoatvr |
nuclear@0 | 14 |
nuclear@0 | 15 libgl_Linux = -lGL -lGLU -lGLEW |
nuclear@0 | 16 libgl_Darwin = -framework OpenGL -lGLEW |
nuclear@0 | 17 |
nuclear@0 | 18 ifdef use_glut |
nuclear@0 | 19 CFLAGS += -DUSE_GLUT |
nuclear@0 | 20 libgl_Linux += -lglut |
nuclear@0 | 21 libgl_Darwin += -framework GLUT |
nuclear@0 | 22 endif |
nuclear@0 | 23 |
nuclear@0 | 24 $(bin): $(obj) |
nuclear@0 | 25 $(CXX) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 26 |
nuclear@0 | 27 -include $(dep) |
nuclear@0 | 28 |
nuclear@0 | 29 %.d: %.c |
nuclear@0 | 30 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 31 |
nuclear@0 | 32 %.d: %.cc |
nuclear@0 | 33 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 34 |
nuclear@0 | 35 .PHONY: clean |
nuclear@0 | 36 clean: |
nuclear@0 | 37 rm -f $(obj) $(bin) |
nuclear@0 | 38 |
nuclear@0 | 39 .PHONY: cleandep |
nuclear@0 | 40 cleandep: |
nuclear@0 | 41 rm -f $(dep) |