4 datarootdir = @datarootdir@
5 exec_prefix = @exec_prefix@
6 includedir = @includedir@
9 VPATH = @srcdir@:@libreplacedir@
13 INSTALLCMD = @INSTALL@
15 CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H= -I. -I@srcdir@
16 EXTRA_TARGETS = @DOC_TARGET@
18 PACKAGE_VERSION = @PACKAGE_VERSION@
20 SHLD_FLAGS = @SHLD_FLAGS@
21 SONAMEFLAG = @SONAMEFLAG@
23 .SUFFIXES: .c .o .3 .3.xml .xml .html
25 LIBOBJ = @TALLOC_OBJ@ @LIBREPLACEOBJ@
27 SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
28 SONAME = libtalloc.$(SHLIBEXT).1
31 $(CC) $(PICFLAG) -o $@ -c $< $(CFLAGS)
33 all: showflags libtalloc.a $(SOLIB) testsuite $(EXTRA_TARGETS)
36 @echo 'talloc will be compiled with flags:'
37 @echo ' CFLAGS = $(CFLAGS)'
38 @echo ' LIBS = $(LIBS)'
40 testsuite: $(LIBOBJ) testsuite.o
41 $(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS)
43 libtalloc.a: $(LIBOBJ)
48 $(CC) $(SHLD_FLAGS) -o $@ $(LIBOBJ) $(SONAMEFLAG)$(SONAME)
51 ${INSTALLCMD} -d $(DESTDIR)$(libdir)
52 ${INSTALLCMD} -d $(DESTDIR)$(libdir)/pkgconfig
53 ${INSTALLCMD} -m 755 libtalloc.a $(DESTDIR)$(libdir)
54 ${INSTALLCMD} -m 755 $(SOLIB) $(DESTDIR)$(libdir)
55 ${INSTALLCMD} -d $(DESTDIR)${includedir}
56 ${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(DESTDIR)$(includedir)
57 ${INSTALLCMD} -m 644 talloc.pc $(DESTDIR)$(libdir)/pkgconfig
58 if [ -f talloc.3 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man3; fi
59 if [ -f talloc.3 ];then ${INSTALLCMD} -m 644 talloc.3 $(DESTDIR)$(mandir)/man3; fi
61 doc: talloc.3 talloc.3.html
64 -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
67 -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
70 rm -f *~ $(LIBOBJ) $(SOLIB) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
84 rm -f config.log config.status config.h config.cache
86 realdistclean: distclean
87 rm -f configure config.h.in