rayfract

annotate Makefile @ 5:48e0e7d33d9e

foo
author John Tsiombikas <nuclear@siggraph.org>
date Sat, 28 May 2011 22:31:07 +0300
parents 03022062c464
children c27b24c9fdd2
rev   line source
nuclear@0 1 csrc = $(wildcard src/*.c)
nuclear@0 2 ccsrc = $(wildcard src/*.cc)
nuclear@0 3 obj = $(ccsrc:.cc=.o) $(csrc:.c=.o)
nuclear@0 4 bin = rayfract
nuclear@0 5
nuclear@0 6 ifeq ($(shell uname -s), Darwin)
nuclear@0 7 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@0 8 else
nuclear@4 9 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@0 10 endif
nuclear@0 11
nuclear@0 12 CC = gcc
nuclear@0 13 CXX = g++
nuclear@4 14 CFLAGS = -pedantic -Wall -g `pkg-config --cflags vmath`
nuclear@4 15 CXXFLAGS = -pedantic -Wall -g `pkg-config --cflags vmath`
nuclear@4 16 LDFLAGS = $(libgl) `pkg-config --libs vmath freetype2` -limtk
nuclear@0 17
nuclear@0 18 $(bin): $(obj)
nuclear@0 19 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 20
nuclear@0 21 .PHONY: clean
nuclear@0 22 clean:
nuclear@0 23 rm -f $(obj) $(bin)