r4397 dynis - in /branches/dynis/libnsbmp: Makefile libnsbmp.pc.in

netsurf at semichrome.net netsurf at semichrome.net
Wed Jun 18 23:12:23 BST 2008


Author: dynis
Date: Wed Jun 18 17:12:23 2008
New Revision: 4397

URL: http://source.netsurf-browser.org?rev=4397&view=rev
Log:
Added Makefile for installation

Added:
    branches/dynis/libnsbmp/Makefile
    branches/dynis/libnsbmp/libnsbmp.pc.in

Added: branches/dynis/libnsbmp/Makefile
URL: http://source.netsurf-browser.org/branches/dynis/libnsbmp/Makefile?rev=4397&view=auto
==============================================================================
--- branches/dynis/libnsbmp/Makefile (added)
+++ branches/dynis/libnsbmp/Makefile Wed Jun 18 17:12:23 2008
@@ -1,0 +1,55 @@
+AR = ar
+CC = gcc
+LD = gcc
+DOXYGEN = doxygen
+INSTALL = install
+SED = sed
+MKDIR = mkdir
+PKG_CONFIG = pkg-config
+
+ARFLAGS = -cru
+CFLAGS = -g -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align \
+	-Wwrite-strings -Wstrict-prototypes \
+	-Wnested-externs -Werror -pedantic -std=c99 \
+	-Wno-format-zero-length -Wformat-security -Wstrict-aliasing=2 \
+	-Wmissing-format-attribute -Wunused -Wunreachable-code \
+	-Wformat=2 -Werror-implicit-function-declaration \
+	-Wmissing-declarations -Wmissing-prototypes
+LDFLAGS = -g -L./
+
+# Installation prefix, if not already defined (e.g. on command line)
+PREFIX ?= /usr/local
+DESTDIR ?=
+
+.PHONY: all clean docs install uninstall
+
+all: libnsbmp.a
+	
+libnsbmp.a: libnsbmp.o libnsbmp.pc
+	${AR} ${ARFLAGS} libnsbmp.a libnsbmp.o
+
+libnsbmp.pc: libnsbmp.pc.in
+	$(SED) -e 's#PREFIX#$(PREFIX)#' libnsbmp.pc.in > libnsbmp.pc
+
+%.o: %.c
+	${CC} -c ${CFLAGS} -o $@ $<
+
+docs:
+	${DOXYGEN}
+
+clean:
+	rm -f $(wildcard *.o) $(wildcard *.a) libnsbmp.pc
+	rm -rf doc
+
+install: libnsbmp.a libnsbmp.pc
+	$(MKDIR) -p $(DESTDIR)$(PREFIX)/lib/pkgconfig
+	$(MKDIR) -p $(DESTDIR)$(PREFIX)/lib
+	$(MKDIR) -p $(DESTDIR)$(PREFIX)/include
+	$(INSTALL) --mode=644 -t $(DESTDIR)$(PREFIX)/lib libnsbmp.a
+	$(INSTALL) --mode=644 -t $(DESTDIR)$(PREFIX)/include libnsbmp.h
+	$(INSTALL) --mode=644 -t $(DESTDIR)$(PREFIX)/lib/pkgconfig libnsbmp.pc
+
+uninstall:
+	rm $(DESTDIR)$(PREFIX)/lib/libnsbmp.a
+	rm $(DESTDIR)$(PREFIX)/include/libnsbmp.h
+	rm $(DESTDIR)$(PREFIX)/lib/pkgconfig/libnsbmp.pc

Added: branches/dynis/libnsbmp/libnsbmp.pc.in
URL: http://source.netsurf-browser.org/branches/dynis/libnsbmp/libnsbmp.pc.in?rev=4397&view=auto
==============================================================================
--- branches/dynis/libnsbmp/libnsbmp.pc.in (added)
+++ branches/dynis/libnsbmp/libnsbmp.pc.in Wed Jun 18 17:12:23 2008
@@ -1,0 +1,10 @@
+prefix=PREFIX
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: libnsbmp
+Description: Provides bmp loading and conversion
+Version: 0.0.1
+Libs: -L${libdir} -lnsbmp
+Cflags: -I${includedir}




More information about the netsurf-commits mailing list