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@
22 .SUFFIXES: .c .o .3 .3.xml .xml .html
24 LIBOBJ = @TALLOC_OBJ@ @LIBREPLACEOBJ@
26 SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
27 SONAME = libtalloc.$(SHLIBEXT).1
30 $(CC) $(PICFLAG) -o $@ -c $< $(CFLAGS)
32 all: showflags libtalloc.a $(SOLIB) testsuite $(EXTRA_TARGETS)
35 @echo 'talloc will be compiled with flags:'
36 @echo ' CFLAGS = $(CFLAGS)'
37 @echo ' LIBS = $(LIBS)'
39 testsuite: $(LIBOBJ) testsuite.o
40 $(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS)
42 libtalloc.a: $(LIBOBJ)
47 $(CC) $(SHLD_FLAGS) -o $@ $(LIBOBJ) @SONAMEFLAG@$(SONAME)
50 ${INSTALLCMD} -d $(DESTDIR)$(libdir)
51 ${INSTALLCMD} -d $(DESTDIR)$(libdir)/pkgconfig
52 ${INSTALLCMD} -m 755 libtalloc.a $(DESTDIR)$(libdir)
53 ${INSTALLCMD} -m 755 $(SOLIB) $(DESTDIR)$(libdir)
54 ${INSTALLCMD} -d $(DESTDIR)${includedir}
55 ${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(DESTDIR)$(includedir)
56 ${INSTALLCMD} -m 644 talloc.pc $(DESTDIR)$(libdir)/pkgconfig
57 if [ -f talloc.3 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man3; fi
58 if [ -f talloc.3 ];then ${INSTALLCMD} -m 644 talloc.3 $(DESTDIR)$(mandir)/man3; fi
59 which swig >/dev/null 2>&1 && ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)`swig -swiglib` || true
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