libresman
diff examples/imgthumbs/Makefile @ 2:026cdd1737ff
added spaceball controls to the example and needless GLEW dependency
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 31 Jan 2014 03:40:00 +0200 |
parents | 469ce01809bc |
children | bebc065a941f |
line diff
1.1 --- a/examples/imgthumbs/Makefile Fri Jan 31 03:17:24 2014 +0200 1.2 +++ b/examples/imgthumbs/Makefile Fri Jan 31 03:40:00 2014 +0200 1.3 @@ -1,3 +1,6 @@ 1.4 +# change PREFIX to install elsewhere (default: /usr/local) 1.5 +PREFIX = /usr/local 1.6 + 1.7 src = $(wildcard src/*.c) 1.8 obj = $(src:.c=.o) 1.9 bin = imgthumbs 1.10 @@ -6,9 +9,9 @@ 1.11 LDFLAGS = $(libgl) -limago 1.12 1.13 ifeq ($(shell uname -s), Darwin) 1.14 - libgl = -framework OpenGL -framework GLUT 1.15 + libgl = -framework OpenGL -framework GLUT -lGLEW 1.16 else 1.17 - libgl = -lGL -lGLU -lglut 1.18 + libgl = -lGL -lGLU -lglut -lGLEW 1.19 endif 1.20 1.21 $(bin): $(obj) 1.22 @@ -17,3 +20,12 @@ 1.23 .PHONY: clean 1.24 clean: 1.25 rm -f $(obj) $(bin) 1.26 + 1.27 +.PHONY: install 1.28 +install: 1.29 + mkdir -p $(DESTDIR)$(PREFIX)/bin 1.30 + cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) 1.31 + 1.32 +.PHONY: uninstall 1.33 +uninstall: 1.34 + rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)