libresman

view examples/imgthumbs/Makefile @ 5:bd9b4ff19c93

more stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 08:02:08 +0200
parents 469ce01809bc
children bebc065a941f
line source
1 # change PREFIX to install elsewhere (default: /usr/local)
2 PREFIX = /usr/local
4 src = $(wildcard src/*.c)
5 obj = $(src:.c=.o)
6 bin = imgthumbs
8 CFLAGS = -pedantic -Wall -g -I../../src
9 LDFLAGS = $(libgl) -limago
11 ifeq ($(shell uname -s), Darwin)
12 libgl = -framework OpenGL -framework GLUT -lGLEW
13 else
14 libgl = -lGL -lGLU -lglut -lGLEW
15 endif
17 $(bin): $(obj)
18 $(CC) -o $@ $(obj) $(LDFLAGS)
20 .PHONY: clean
21 clean:
22 rm -f $(obj) $(bin)
24 .PHONY: install
25 install:
26 mkdir -p $(DESTDIR)$(PREFIX)/bin
27 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
29 .PHONY: uninstall
30 uninstall:
31 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)