libutf

UTF-8 library
git clone git://git.suckless.org/libutf
Log | Files | Refs | README | LICENSE

commit 88cf7e1262ee8df5c468714571a5fff581b9546c
parent 658e9b2bbd0d4304fd922732527b56249d0393e9
Author: Connor Lane Smith <cls@lubutu.com>
Date:   Mon, 21 May 2012 15:23:00 +0100

add make install
Diffstat:
Makefile | 10++++++++--
config.mk | 4+++-
2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -10,8 +10,7 @@ UCD = UnicodeData-6.1.0.txt all: libutf.a utftest libutf.a: $(OBJ) - rm -f $@ - $(AR) rc $@ $(OBJ) + $(AR) -rcs $@ $(OBJ) utftest: utftest.o libutf.a $(CC) $(LDFLAGS) -o $@ utftest.o libutf.a @@ -22,5 +21,12 @@ utftest: utftest.o libutf.a runetypebody.h: mkrunetype.awk $(UCD) $(AWK) -f mkrunetype.awk $(UCD) > $@ +install: libutf.a + mkdir -p $(DESTDIR)$(PREFIX)/lib + cp libutf.a $(DESTDIR)$(PREFIX)/lib + +uninstall: + rm -f $(PREFIX)/lib/libutf.a + clean: rm -f libutf.a utftest utftest.o $(OBJ) diff --git a/config.mk b/config.mk @@ -1,7 +1,9 @@ # See LICENSE file for copyright and license details. +PREFIX = /usr/local + CFLAGS = -ansi -pedantic -Os -Wall -Wextra -LDFLAGS = +LDFLAGS = -s CC = cc AWK = awk