goat3d

diff goatview/Makefile @ 19:b35427826b60

- added XML format reading support - wrote a rudimentary version of goatview
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 27 Sep 2013 06:58:37 +0300
parents
children b59a3650ed51
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/goatview/Makefile	Fri Sep 27 06:58:37 2013 +0300
     1.3 @@ -0,0 +1,34 @@
     1.4 +src = $(wildcard src/*.c)
     1.5 +obj = $(src:.c=.o)
     1.6 +dep = $(obj:.o=.d)
     1.7 +bin = goatview
     1.8 +
     1.9 +goat_root = ..
    1.10 +libgoat = $(goat_root)/libgoat3d.so.0.1
    1.11 +
    1.12 +CC = clang
    1.13 +CPP = clang -E
    1.14 +CFLAGS = -pedantic -Wall -g -I$(goat_root)/src
    1.15 +LDFLAGS = $(libgoat) -Wl,-rpath=$(goat_root) $(libgl)
    1.16 +
    1.17 +ifeq ($(shell uname -s), Darwin)
    1.18 +	libgl = -framework OpenGL -framework GLUT -lGLEW
    1.19 +else
    1.20 +	libgl = -lGL -lGLU -lglut -lGLEW
    1.21 +endif
    1.22 +
    1.23 +$(bin): $(obj) $(libgoat)
    1.24 +	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.25 +
    1.26 +-include $(dep)
    1.27 +
    1.28 +%.d: %.c
    1.29 +	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.30 +
    1.31 +.PHONY: clean
    1.32 +clean:
    1.33 +	rm -f $(obj) $(bin)
    1.34 +
    1.35 +.PHONY: cleandep
    1.36 +cleandep:
    1.37 +	rm -f $(dep)