libresman
view examples/imgthumbs/Makefile @ 11:bebc065a941f
doesn't work yet
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 07 Feb 2014 07:50:02 +0200 |
parents | 026cdd1737ff |
children | 6b9974a8bdae |
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 $(resman) -lpthread
11 ifeq ($(shell uname -s), Darwin)
12 libgl = -framework OpenGL -framework GLUT -lGLEW
13 else
14 libgl = -lGL -lGLU -lglut -lGLEW
15 endif
17 resman = ../../libresman.a
19 $(bin): $(obj) resman
20 $(CC) -o $@ $(obj) $(LDFLAGS)
22 .PHONY: resman
23 resman:
24 $(MAKE) -C ../..
26 .PHONY: clean
27 clean:
28 rm -f $(obj) $(bin)
30 .PHONY: install
31 install:
32 mkdir -p $(DESTDIR)$(PREFIX)/bin
33 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
35 .PHONY: uninstall
36 uninstall:
37 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)