glviewvol
view Makefile @ 6:f22be47a3572
moved to TransferFuncs completely
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 30 Dec 2014 06:22:54 +0200 |
parents | 7bdf40403b9c |
children | 71b479ffb9f7 |
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)