r25953: AIX make doesn't support $^.
[garming/samba-autobuild/.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@
16 EXTRA_TARGETS = @DOC_TARGET@
17 PICFLAG = @PICFLAG@
18 PACKAGE_VERSION = @PACKAGE_VERSION@
19 SHLIBEXT = @SHLIBEXT@
20 SHLD_FLAGS = @SHLD_FLAGS@
21 SONAMEFLAG = @SONAMEFLAG@
22
23 .SUFFIXES: .c .o .3 .3.xml .xml .html
24
25 LIBOBJ = @TALLOC_OBJ@ @LIBREPLACEOBJ@
26
27 SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
28 SONAME = libtalloc.$(SHLIBEXT).1
29
30 .c.o:
31         $(CC) $(PICFLAG) -o $@ -c $< $(CFLAGS)
32
33 all: showflags libtalloc.a $(SOLIB) testsuite $(EXTRA_TARGETS)
34
35 showflags:
36         @echo 'talloc will be compiled with flags:'
37         @echo '  CFLAGS = $(CFLAGS)'
38         @echo '  LIBS = $(LIBS)'
39
40 testsuite: $(LIBOBJ) testsuite.o
41         $(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS)
42
43 libtalloc.a: $(LIBOBJ)
44         ar -rv $@ $(LIBOBJ)
45         @-ranlib $@
46
47 $(SOLIB): $(LIBOBJ)
48         $(CC) $(SHLD_FLAGS) -o $@ $(LIBOBJ) $(SONAMEFLAG)$(SONAME)
49
50 install: all 
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
60
61 doc: talloc.3 talloc.3.html
62
63 .3.xml.3:
64         -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
65
66 .xml.html:
67         -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
68
69 clean:
70         rm -f *~ $(LIBOBJ) $(SOLIB) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
71
72 test: testsuite
73         ./testsuite
74
75 gcov:
76         gcov talloc.c
77
78 installcheck: 
79         $(MAKE) test
80
81 distclean: clean
82         rm -f *~ */*~
83         rm -f Makefile
84         rm -f config.log config.status config.h config.cache
85
86 realdistclean: distclean
87         rm -f configure config.h.in