r18076: convert talloc to the new libreplace system
[samba.git] / source / lib / talloc / Makefile.in
1 #!gmake
2 #
3 prefix = @prefix@
4 datarootdir = @datarootdir@
5 exec_prefix = @exec_prefix@
6 includedir = @includedir@
7 libdir = @libdir@
8 mandir = @mandir@
9 VPATH = @srcdir@:@libreplacedir@
10 srcdir = @srcdir@
11 builddir = @builddir@
12 XSLTPROC = @XSLTPROC@
13 INSTALLCMD = @INSTALL@
14 CC = @CC@
15 CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H= -I. -I@srcdir@ -I@libreplacedir@
16 EXTRA_TARGETS = @DOC_TARGET@
17
18 .SUFFIXES: .c .o .3 .3.xml .xml .html
19
20 LIBOBJ = @TALLOCOBJ@ @LIBREPLACEOBJ@
21
22 all: libtalloc.a testsuite $(EXTRA_TARGETS)
23
24 testsuite: $(LIBOBJ) testsuite.o
25         $(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS)
26
27 libtalloc.a: $(LIBOBJ)
28         ar -rv $@ $(LIBOBJ)
29         @-ranlib $@
30
31 install: all 
32         ${INSTALLCMD} -d ${libdir}
33         ${INSTALLCMD} -m 755 libtalloc.a $(libdir)
34         ${INSTALLCMD} -d ${includedir}
35         ${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(includedir)
36         ${INSTALLCMD} -m 644 talloc.pc $(libdir)/pkgconfig
37         if [ -f talloc.3 ];then ${INSTALLCMD} -d ${mandir}/man3; fi
38         if [ -f talloc.3 ];then ${INSTALLCMD} -m 644 talloc.3 $(mandir)/man3; fi
39
40 doc: talloc.3 talloc.3.html
41
42 .3.xml.3:
43         -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
44
45 .xml.html:
46         -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
47
48 clean:
49         rm -f *~ $(LIBOBJ) libtalloc.a testsuite *.gc?? talloc.3 talloc.3.html
50
51 test: testsuite
52         ./testsuite
53
54 gcov:
55         gcov talloc.c
56
57 installcheck: 
58         $(MAKE) test