istereo2

annotate Makefile @ 20:2b85d05df3f2

animation controls for easier screenshot grabbing
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 02 Oct 2015 04:54:55 +0300
parents 2a0ef5efb8e2
children 9d53a4938ce8
rev   line source
nuclear@9 1 src = $(wildcard src/*.c) $(wildcard src/glut/*.c)
nuclear@9 2 ccsrc = $(wildcard src/*.cc)
nuclear@9 3
nuclear@9 4 obj = $(src:.c=.o) $(ccsrc:.cc=.o)
nuclear@9 5 dep = $(obj:.o=.d)
nuclear@9 6 bin = test
nuclear@9 7
nuclear@9 8 incdir = -Isrc
nuclear@9 9 def = -DNO_FREETYPE
nuclear@9 10
nuclear@9 11 CFLAGS = -pedantic -Wall -g $(def) $(incdir)
nuclear@9 12 CXXFLAGS = $(CFLAGS)
nuclear@10 13 LDFLAGS = $(libgl) -lm -ldl
nuclear@9 14
nuclear@9 15 include libs/Makefile
nuclear@9 16
nuclear@10 17 sys := $(shell uname -s)
nuclear@10 18 ifeq ($(sys), Darwin)
nuclear@10 19 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@10 20 else
nuclear@10 21 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@10 22 endif
nuclear@10 23
nuclear@9 24 $(bin): $(obj)
nuclear@14 25 @echo "Linking $(bin) ..."
nuclear@14 26 @$(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@9 27
nuclear@9 28 -include $(dep)
nuclear@9 29
nuclear@9 30 %.d: %.c
nuclear@9 31 @$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@
nuclear@9 32
nuclear@9 33 %.d: %.cc
nuclear@9 34 @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@
nuclear@9 35
nuclear@9 36 .PHONY: clean
nuclear@9 37 clean:
nuclear@9 38 rm -f $(obj) $(bin)
nuclear@9 39
nuclear@9 40 .PHONY: cleandep
nuclear@9 41 cleandep:
nuclear@9 42 rm -f $(dep)