libresman

annotate 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
rev   line source
nuclear@2 1 # change PREFIX to install elsewhere (default: /usr/local)
nuclear@2 2 PREFIX = /usr/local
nuclear@2 3
nuclear@1 4 src = $(wildcard src/*.c)
nuclear@1 5 obj = $(src:.c=.o)
nuclear@1 6 bin = imgthumbs
nuclear@1 7
nuclear@1 8 CFLAGS = -pedantic -Wall -g -I../../src
nuclear@11 9 LDFLAGS = $(libgl) -limago $(resman) -lpthread
nuclear@1 10
nuclear@1 11 ifeq ($(shell uname -s), Darwin)
nuclear@2 12 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@1 13 else
nuclear@2 14 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@1 15 endif
nuclear@1 16
nuclear@11 17 resman = ../../libresman.a
nuclear@11 18
nuclear@11 19 $(bin): $(obj) resman
nuclear@1 20 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@1 21
nuclear@11 22 .PHONY: resman
nuclear@11 23 resman:
nuclear@11 24 $(MAKE) -C ../..
nuclear@11 25
nuclear@1 26 .PHONY: clean
nuclear@1 27 clean:
nuclear@1 28 rm -f $(obj) $(bin)
nuclear@2 29
nuclear@2 30 .PHONY: install
nuclear@2 31 install:
nuclear@2 32 mkdir -p $(DESTDIR)$(PREFIX)/bin
nuclear@2 33 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
nuclear@2 34
nuclear@2 35 .PHONY: uninstall
nuclear@2 36 uninstall:
nuclear@2 37 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)