rayfract

diff Makefile @ 0:09bb67c000bc

ray-fract repository
author John Tsiombikas <nuclear@siggraph.org>
date Thu, 21 Oct 2010 23:39:26 +0300
parents
children 03022062c464
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Thu Oct 21 23:39:26 2010 +0300
     1.3 @@ -0,0 +1,23 @@
     1.4 +csrc = $(wildcard src/*.c)
     1.5 +ccsrc = $(wildcard src/*.cc)
     1.6 +obj = $(ccsrc:.cc=.o) $(csrc:.c=.o)
     1.7 +bin = rayfract
     1.8 +
     1.9 +ifeq ($(shell uname -s), Darwin)
    1.10 +	libgl = -framework OpenGL -framework GLUT -lGLEW
    1.11 +else
    1.12 +	libgl = -lGL -lglut -lGLEW
    1.13 +endif
    1.14 +
    1.15 +CC = gcc
    1.16 +CXX = g++
    1.17 +CFLAGS = -pedantic -Wall -g `pkg-config --cflags vmath`
    1.18 +CXXFLAGS = -pedantic -Wall -g `pkg-config --cflags vmath`
    1.19 +LDFLAGS = $(libgl) `pkg-config --libs vmath`
    1.20 +
    1.21 +$(bin): $(obj)
    1.22 +	$(CXX) -o $@ $(obj) $(LDFLAGS)
    1.23 +
    1.24 +.PHONY: clean
    1.25 +clean:
    1.26 +	rm -f $(obj) $(bin)