libresman

view examples/imgthumbs/Makefile @ 26:6b9974a8bdae

started BSD/mac support for file watching
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 31 Mar 2014 19:51:00 +0300
parents bebc065a941f
children
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 -Wno-deprecated-declarations
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)