]> git.ozlabs.org Git - ponghero.git/blobdiff - ccan/ccan_tools/talloc/Makefile
Prepare for release: rename to ponghero and pull in ccan.
[ponghero.git] / ccan / ccan_tools / talloc / Makefile
diff --git a/ccan/ccan_tools/talloc/Makefile b/ccan/ccan_tools/talloc/Makefile
new file mode 100644 (file)
index 0000000..a887b38
--- /dev/null
@@ -0,0 +1,72 @@
+#!gmake
+#
+prefix = /usr/local
+datarootdir = ${prefix}/share
+exec_prefix = ${prefix}
+includedir = ${prefix}/include
+libdir = ${exec_prefix}/lib
+mandir = ${datarootdir}/man
+
+srcdir = .
+builddir = .
+XSLTPROC = /usr/bin/xsltproc
+INSTALLCMD = @INSTALL@
+CC = gcc
+CFLAGS = -g -O2 -DHAVE_CONFIG_H= -I. -I.
+EXTRA_TARGETS = doc
+
+.SUFFIXES: .c .o .3 .3.xml .xml .html
+
+LIBOBJ = talloc.o
+
+all: showflags libtalloc.a testsuite $(EXTRA_TARGETS)
+
+showflags:
+       @echo 'talloc will be compiled with flags:'
+       @echo '  CFLAGS = $(CFLAGS)'
+       @echo '  LIBS = $(LIBS)'
+
+testsuite: $(LIBOBJ) testsuite.o
+       $(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS)
+
+libtalloc.a: $(LIBOBJ)
+       ar -rv $@ $(LIBOBJ)
+       @-ranlib $@
+
+install: all 
+       ${INSTALLCMD} -d $(DESTDIR)$(libdir)
+       ${INSTALLCMD} -d $(DESTDIR)$(libdir)/pkgconfig
+       ${INSTALLCMD} -m 755 libtalloc.a $(DESTDIR)$(libdir)
+       ${INSTALLCMD} -d $(DESTDIR)${includedir}
+       ${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(DESTDIR)$(includedir)
+       ${INSTALLCMD} -m 644 talloc.pc $(DESTDIR)$(libdir)/pkgconfig
+       if [ -f talloc.3 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man3; fi
+       if [ -f talloc.3 ];then ${INSTALLCMD} -m 644 talloc.3 $(DESTDIR)$(mandir)/man3; fi
+
+doc: talloc.3 talloc.3.html
+
+.3.xml.3:
+       -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+.xml.html:
+       -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
+
+clean:
+       rm -f *~ $(LIBOBJ) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
+
+test: testsuite
+       ./testsuite
+
+gcov:
+       gcov talloc.c
+
+installcheck: 
+       $(MAKE) test
+
+distclean: clean
+       rm -f *~ */*~
+       rm -f Makefile
+       rm -f config.log config.status config.h config.cache
+
+realdistclean: distclean
+       rm -f configure config.h.in