libgoatvr

annotate example/Makefile @ 24:d659cbedde1d

works on linux with 0.4.4
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 14 Jan 2015 08:03:27 +0200
parents 6896f9cf9621
children 5136dfcea7b1
rev   line source
nuclear@5 1 src = $(wildcard src/*.c)
nuclear@5 2 obj = $(src:.c=.o)
nuclear@5 3 bin = test
nuclear@5 4
nuclear@5 5 vrlib_root = ..
nuclear@7 6 vrlib = $(vrlib_root)/libgoatvr.so
nuclear@5 7
nuclear@9 8 warn = -Wall
nuclear@9 9
nuclear@9 10 CFLAGS = -pedantic $(warn) -g `pkg-config --cflags sdl2` -I$(vrlib_root)/src
nuclear@9 11 LDFLAGS = $(libgl) `pkg-config --libs sdl2` -L$(vrlib_root) -lgoatvr -Wl,-rpath -Wl,$(vrlib_root)/
nuclear@5 12
nuclear@5 13 ifeq ($(shell uname -s), Darwin)
nuclear@5 14 libgl = -framework OpenGL -lGLEW
nuclear@9 15 warn += -Wno-deprecated-declarations
nuclear@5 16 else
nuclear@5 17 libgl = -lGL -lGLU -lGLEW
nuclear@5 18 endif
nuclear@5 19
nuclear@5 20 $(bin): $(obj) $(vrlib)
nuclear@5 21 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@5 22
nuclear@5 23 .PHONY: $(vrlib)
nuclear@5 24 $(vrlib):
nuclear@5 25 $(MAKE) -C $(vrlib_root)
nuclear@5 26
nuclear@5 27 .PHONY: clean
nuclear@5 28 clean:
nuclear@5 29 rm -f $(obj) $(bin)