summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2009-02-14 18:42:29 (GMT)
committer Daniel Silverstone <dsilvers@netsurf-browser.org>2009-02-14 18:42:29 (GMT)
commit8792e1bf88db8af72e839a22c1229eb4eb096a1b (patch)
tree5b266fe8b93345b362c8952c8283e669be7b1321
parentefd270a69c96e5585d4b47f76af0763c98ad6682 (diff)
downloadlibwapcaplet-8792e1bf88db8af72e839a22c1229eb4eb096a1b.tar.gz
libwapcaplet-8792e1bf88db8af72e839a22c1229eb4eb096a1b.tar.bz2
Install wapcaplet.
svn path=/trunk/libwapcaplet/; revision=6511
-rw-r--r--Makefile15
-rw-r--r--libwapcaplet.pc.in10
2 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 81a0bbf..949eff2 100644
--- a/Makefile
+++ b/Makefile
@@ -5,17 +5,32 @@ LIB := libwapcaplet.a
SRCS := libwapcaplet.c
HDRS := libwapcaplet/libwapcaplet.h
+PREFIX ?= /usr/local
+
TESTSRCS := testmain.c basictests.c memorytests.c
TARGET ?= debug
BUILDDIR := build-$(TARGET)
+MKDIR ?= mkdir -p
+SED ?= sed
+INSTALL ?= install
+
all: $(BUILDDIR)/$(LIB)
test: $(BUILDDIR)/testrunner
$(BUILDDIR)/testrunner
+install: all
+ $(MKDIR) $(PREFIX)/lib/pkgconfig $(PREFIX)/include/libwapcaplet
+ $(SED) -e 's#PREFIX#$(PREFIX)#' libwapcaplet.pc.in >libwapcaplet.pc
+ $(INSTALL) -m 644 libwapcaplet.pc $(PREFIX)/lib/pkgconfig
+ $(INSTALL) -m 644 $(BUILDDIR)/$(LIB) $(PREFIX)/lib/$(LIB)
+ for F in $(HDRS); do \
+ $(INSTALL) -m 644 include/$$F $(PREFIX)/include/libwapcaplet; \
+ done
+
CFLAGS := -Iinclude -Wall -Werror
ifeq ($(TARGET),debug)
diff --git a/libwapcaplet.pc.in b/libwapcaplet.pc.in
new file mode 100644
index 0000000..fe44a63
--- a/dev/null
+++ b/libwapcaplet.pc.in
@@ -0,0 +1,10 @@
+prefix=PREFIX
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: libwapcaplet
+Description: String internalisation dictionary
+Version: 0.0.1
+Libs: -L${libdir} -lwapcaplet
+Cflags: -I${includedir}