glviewvol
view Makefile @ 3:32c4a7160350
den kanei kryo stin ellada
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 28 Dec 2014 21:48:15 +0200 |
parents | |
children | 04330eb80b36 |
line source
1 csrc = $(wildcard src/*.c)
2 ccsrc = $(wildcard src/*.cc)
3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
4 dep = $(obj:.o=.d)
6 bin = dicomview
8 #opt = -O3 -ffast-math
9 dbg = -g
10 def = -DUSE_GLUT
11 #inc =
13 CFLAGS = -pedantic -Wall $(opt) $(dbg) $(def) $(inc)
14 CXXFLAGS = $(CFLAGS)
15 LDFLAGS = $(libgl) -lm -limago
17 ifeq ($(shell uname -s), Darwin)
18 libgl = -framework OpenGL -framework GLUT -lGLEW
19 else
20 libgl = -lGL -lGLU -lglut -lGLEW
21 endif
23 $(bin): $(obj)
24 $(CXX) -o $@ $(obj) $(LDFLAGS)
26 -include $(dep)
28 %.d: %.c
29 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
31 %.d: %.cc
32 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
34 .PHONY: clean
35 clean:
36 rm -f $(obj) $(bin)
38 .PHONY: cleandep
39 cleandep:
40 rm -f $(dep)
42 .PHONY: install
43 install:
44 mkdir -p $(DESTDIR)$(PREFIX)/bin
45 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
47 .PHONY: uninstall
48 rm -f $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)