glviewvol
diff Makefile @ 0:7bdf40403b9c
dicom viewer project underway
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 27 Dec 2014 02:35:58 +0200 |
parents | |
children | 04330eb80b36 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile Sat Dec 27 02:35:58 2014 +0200 1.3 @@ -0,0 +1,48 @@ 1.4 +csrc = $(wildcard src/*.c) 1.5 +ccsrc = $(wildcard src/*.cc) 1.6 +obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) 1.7 +dep = $(obj:.o=.d) 1.8 + 1.9 +bin = dicomview 1.10 + 1.11 +#opt = -O3 -ffast-math 1.12 +dbg = -g 1.13 +def = -DUSE_GLUT 1.14 +#inc = 1.15 + 1.16 +CFLAGS = -pedantic -Wall $(opt) $(dbg) $(def) $(inc) 1.17 +CXXFLAGS = $(CFLAGS) 1.18 +LDFLAGS = $(libgl) -lm -limago 1.19 + 1.20 +ifeq ($(shell uname -s), Darwin) 1.21 + libgl = -framework OpenGL -framework GLUT -lGLEW 1.22 +else 1.23 + libgl = -lGL -lGLU -lglut -lGLEW 1.24 +endif 1.25 + 1.26 +$(bin): $(obj) 1.27 + $(CXX) -o $@ $(obj) $(LDFLAGS) 1.28 + 1.29 +-include $(dep) 1.30 + 1.31 +%.d: %.c 1.32 + @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.33 + 1.34 +%.d: %.cc 1.35 + @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.36 + 1.37 +.PHONY: clean 1.38 +clean: 1.39 + rm -f $(obj) $(bin) 1.40 + 1.41 +.PHONY: cleandep 1.42 +cleandep: 1.43 + rm -f $(dep) 1.44 + 1.45 +.PHONY: install 1.46 +install: 1.47 + mkdir -p $(DESTDIR)$(PREFIX)/bin 1.48 + cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) 1.49 + 1.50 +.PHONY: uninstall 1.51 + rm -f $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)