libdrawtext

view tools/font2glyphmap/Makefile @ 50:4452a6143d12

install / uninstall targets for font2glyphmap
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 30 Oct 2015 06:26:15 +0200
parents 03699346d59f
children
line source
1 PREFIX = /usr/local
3 src = $(wildcard src/*.c)
4 obj = $(src:.c=.o)
5 bin = font2glyphmap
7 CC = gcc
8 CFLAGS = -pedantic -Wall -g -I../../src -I/usr/local/include
9 LDFLAGS = -L. -L/usr/local/lib -ldrawtext
11 ifeq ($(shell uname -s), Darwin)
12 lib_so = libdrawtext.dylib
13 else
14 lib_so = libdrawtext.so.0.2
15 endif
17 $(bin): $(obj) $(lib_so) $(font)
18 $(CC) -o $@ $(obj) $(LDFLAGS)
20 $(lib_so): ../../$(lib_so)
21 rm -f $@
22 ln -s $< $@
24 .PHONY: clean
25 clean:
26 rm -f $(obj) $(bin) $(lib_so)
28 .PHONY: install
29 install:
30 mkdir -p $(DESTDIR)$(PREFIX)/bin
31 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
33 .PHONY: uninstall
34 uninstall:
35 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)