libgoatvr

diff example/Makefile @ 5:e63cb28fc644

working on the linux side a bit
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 18 Sep 2014 10:56:45 +0300
parents
children 6896f9cf9621
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/example/Makefile	Thu Sep 18 10:56:45 2014 +0300
     1.3 @@ -0,0 +1,26 @@
     1.4 +src = $(wildcard src/*.c)
     1.5 +obj = $(src:.c=.o)
     1.6 +bin = test
     1.7 +
     1.8 +vrlib_root = ..
     1.9 +vrlib = $(vrlib_root)/libgoatvr.a
    1.10 +
    1.11 +CFLAGS = -pedantic -Wall -g `pkg-config --cflags sdl2` -I$(vrlib_root)/src
    1.12 +LDFLAGS = $(libgl) `pkg-config --libs sdl2` $(vrlib)
    1.13 +
    1.14 +ifeq ($(shell uname -s), Darwin)
    1.15 +	libgl = -framework OpenGL -lGLEW
    1.16 +else
    1.17 +	libgl = -lGL -lGLU -lGLEW
    1.18 +endif
    1.19 +
    1.20 +$(bin): $(obj) $(vrlib)
    1.21 +	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.22 +
    1.23 +.PHONY: $(vrlib)
    1.24 +$(vrlib):
    1.25 +	$(MAKE) -C $(vrlib_root)
    1.26 +
    1.27 +.PHONY: clean
    1.28 +clean:
    1.29 +	rm -f $(obj) $(bin)