vrseasons

view 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
line source
1 csrc = $(wildcard src/*.c)
2 ccsrc = $(wildcard src/*.cc)
3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
4 dep = $(obj:.o=.d)
5 bin = vrseasons
7 sys = $(shell uname -s)
9 use_glut = 1
11 CFLAGS = -pedantic -Wall -g
12 CXXFLAGS = $(CFLAGS)
13 LDFLAGS = $(libgl_$(sys)) -ldl -lgoatvr
15 libgl_Linux = -lGL -lGLU -lGLEW
16 libgl_Darwin = -framework OpenGL -lGLEW
18 ifdef use_glut
19 CFLAGS += -DUSE_GLUT
20 libgl_Linux += -lglut
21 libgl_Darwin += -framework GLUT
22 endif
24 $(bin): $(obj)
25 $(CXX) -o $@ $(obj) $(LDFLAGS)
27 -include $(dep)
29 %.d: %.c
30 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
32 %.d: %.cc
33 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
35 .PHONY: clean
36 clean:
37 rm -f $(obj) $(bin)
39 .PHONY: cleandep
40 cleandep:
41 rm -f $(dep)