view3d
view Makefile.in @ 8:5562a637e5aa
load multiple files and concatenate them
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 23 Jan 2012 08:51:59 +0200 |
parents | |
children |
line source
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.o)
3 dep = $(obj:.o=.d)
4 bin = view3d
6 CFLAGS = -pedantic -Wall -g $(incdir)
7 LDFLAGS = $(libdir) $(libgl) -lassimp -lm -limago
9 ifeq ($(shell uname -s), Darwin)
10 libgl = -framework OpenGL -framework GLUT -lGLEW
11 incdir = -I/opt/local/include
12 libdir = -L/opt/local/lib
13 else
14 libgl = -lGL -lGLU -lglut -lGLEW
15 endif
17 $(bin): $(obj)
18 $(CC) -o $@ $(obj) $(LDFLAGS)
20 -include $(dep)
22 %.d: %.c
23 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
25 .PHONY: clean
26 clean:
27 rm -f $(obj) $(bin)
29 .PHONY: install
30 install: $(bin)
31 mkdir -p $(INSTDIR)$(PREFIX)/bin
32 cp $(bin) $(INSTDIR)$(PREFIX)/bin/$(bin)
34 .PHONY: uninstall
35 uninstall:
36 rm -f $(INSTDIR)$(PREFIX)/bin/$(bin)