commit a91597aa78eeb75768004c31334d1854d55c5cf3 parent c6f865074f43f08eb7a6db1afb7770c087a9d991 Author: Connor Lane Smith <cls@lubutu.com> Date: Mon, 21 May 2012 15:28:31 +0100 make install header files Diffstat:
Makefile | | | 16 | +++++++++++----- |
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile @@ -5,15 +5,18 @@ include config.mk 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 $@ $(OBJ) utftest: utftest.o libutf.a - $(CC) $(LDFLAGS) -o $@ utftest.o libutf.a + $(CC) $(LDFLAGS) -o $@ utftest.o $(LIB) .c.o: $(CC) $(CFLAGS) -c $< @@ -23,10 +26,13 @@ runetypebody.h: mkrunetype.awk $(UCD) 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)