[hackers] [libutf] make install header files || Connor Lane Smith

From: <hg_AT_suckless.org>
Date: Mon, 21 May 2012 16:28:33 +0200 (CEST)

changeset: 13:d65194e2a1a7
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Mon May 21 15:28:31 2012 +0100
files: Makefile
description:
make install header files


diff -r 47f6b1217763 -r d65194e2a1a7 Makefile
--- a/Makefile Mon May 21 15:23:53 2012 +0100
+++ b/Makefile Mon May 21 15:28:31 2012 +0100
_AT_@ -5,15 +5,18 @@
 SRC = rune.c runetype.c
 OBJ = $(SRC:.c=.o)
 
+LIB = libutf.a
+INC = utf.h
+
 UCD = UnicodeData-6.1.0.txt
 
-all: libutf.a utftest
+all: $(LIB) utftest
 
-libutf.a: $(OBJ)
+$(LIB): $(OBJ)
         $(AR) -rcs $_AT_ $(OBJ)
 
 utftest: utftest.o libutf.a
- $(CC) $(LDFLAGS) -o $_AT_ utftest.o libutf.a
+ $(CC) $(LDFLAGS) -o $_AT_ utftest.o $(LIB)
 
 .c.o:
         $(CC) $(CFLAGS) -c $<
_AT_@ -23,10 +26,13 @@
 
 install: libutf.a
         mkdir -p $(DESTDIR)$(PREFIX)/lib
- cp libutf.a $(DESTDIR)$(PREFIX)/lib
+ cp $(LIB) $(DESTDIR)$(PREFIX)/lib/$(LIB)
+ mkdir -p $(DESTDIR)$(PREFIX)/include
+ cp $(INC) $(DESTDIR)$(PREFIX)/include/$(INC)
 
 uninstall:
- rm -f $(DESTDIR)$(PREFIX)/lib/libutf.a
+ rm -f $(DESTDIR)$(PREFIX)/lib/$(LIB)
+ rm -f $(DESTDIR)$(PREFIX)/include/$(INC)
 
 clean:
         rm -f libutf.a utftest utftest.o $(OBJ)
Received on Mon May 21 2012 - 16:28:33 CEST

This archive was generated by hypermail 2.3.0 : Mon May 21 2012 - 16:36:07 CEST