r26280: Fix installation if swig is not available.
[Samba/gebeck_regimport.git] / source3 / lib / talloc / Makefile.in
blobda0ecb6ca0ee943474b07685be3faa8fc8c68275
1 #!gmake
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@
16 EXTRA_TARGETS = @DOC_TARGET@
17 PICFLAG = @PICFLAG@
18 PACKAGE_VERSION = @PACKAGE_VERSION@
19 SHLIBEXT = @SHLIBEXT@
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
29 .c.o:
30 $(CC) $(PICFLAG) -o $@ -c $< $(CFLAGS)
32 all: showflags libtalloc.a $(SOLIB) testsuite $(EXTRA_TARGETS)
34 showflags:
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)
43 ar -rv $@ $(LIBOBJ)
44 @-ranlib $@
46 $(SOLIB): $(LIBOBJ)
47 $(CC) $(SHLD_FLAGS) -o $@ $(LIBOBJ) @SONAMEFLAG@$(SONAME)
49 install: all
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
63 .3.xml.3:
64 -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
66 .xml.html:
67 -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
69 clean:
70 rm -f *~ $(LIBOBJ) $(SOLIB) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
72 test: testsuite
73 ./testsuite
75 gcov:
76 gcov talloc.c
78 installcheck:
79 $(MAKE) test
81 distclean: clean
82 rm -f *~ */*~
83 rm -f Makefile
84 rm -f config.log config.status config.h config.cache
86 realdistclean: distclean
87 rm -f configure config.h.in