goat3d
view goatview/Makefile @ 58:d317eb4f83da
- made everything compile properly on windows again
- removed libanim/libvmath, we'll use them as external dependencies
- added new maxgoat_stub 3dsmax plugin project. Gets loaded as a max plugin and
loads the actual maxgoat (and later maxgoat_anim) exporters on demand, to
allow reloading the actual exporters without having to restart 3dsmax (which
takes AGES).
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 25 Mar 2014 03:19:55 +0200 |
parents | f8bfc3177582 |
children | 9862541fdcf5 |
line source
1 PREFIX = /usr/local
3 src = $(wildcard src/*.c)
4 obj = $(src:.c=.o)
5 dep = $(obj:.o=.d)
6 bin = goatview
8 goat_root = ..
10 CC = clang
11 CPP = clang -E
12 CFLAGS = -pedantic -Wall -g -I$(goat_root)/src
13 LDFLAGS = $(libgoat) $(libgl)
15 ifeq ($(shell uname -s), Darwin)
16 libgl = -framework OpenGL -framework GLUT -lGLEW
17 libgoat = $(goat_root)/libgoat3d.dylib
18 else
19 libgl = -lGL -lGLU -lglut -lGLEW
20 libgoat = $(goat_root)/libgoat3d.so.0.1
21 endif
23 $(bin): $(obj) $(libgoat)
24 $(CC) -o $@ $(obj) $(LDFLAGS)
26 -include $(dep)
28 %.d: %.c
29 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
31 .PHONY: clean
32 clean:
33 rm -f $(obj) $(bin)
35 .PHONY: cleandep
36 cleandep:
37 rm -f $(dep)
39 .PHONY: install
40 install: $(bin)
41 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
43 .PHONY: uninstall
44 uninstall:
45 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)