libgoatvr

view example/Makefile @ 31:ec6edfe7774c

forgot to add the glext.h file
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 12 Apr 2015 02:02:04 +0300
parents d12592558809
children
line source
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.o)
3 bin = test
5 vrlib_root = $(shell pwd)/..
6 vrlib = $(vrlib_root)/libgoatvr.so
8 warn = -Wall
10 CFLAGS = -pedantic $(warn) -g `pkg-config --cflags sdl2` -I$(vrlib_root)/src
11 LDFLAGS = $(libgl) -L$(vrlib_root) -Wl,-rpath=$(vrlib_root) -lgoatvr `pkg-config --libs sdl2`
13 ifeq ($(shell uname -s), Darwin)
14 libgl = -framework OpenGL -lGLEW
15 warn += -Wno-deprecated-declarations
16 else
17 libgl = -lGL -lGLU -lGLEW
18 endif
20 $(bin): $(obj) $(vrlib)
21 $(CC) -o $@ $(obj) $(LDFLAGS)
23 .PHONY: $(vrlib)
24 $(vrlib):
25 $(MAKE) -C $(vrlib_root)
27 .PHONY: clean
28 clean:
29 rm -f $(obj) $(bin)