Merge branch 'singlecompression' into single
[kai/samba.git] / lib / talloc / talloc.mk
1 TALLOC_OBJ = $(tallocdir)/talloc.o 
2
3 TALLOC_SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
4 TALLOC_SONAME = libtalloc.$(SHLIBEXT).1
5
6 all:: libtalloc.a $(TALLOC_SOLIB) testsuite
7
8 testsuite:: $(LIBOBJ) testsuite.o
9         $(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS)
10
11 libtalloc.a: $(LIBOBJ)
12         ar -rv $@ $(LIBOBJ)
13         @-ranlib $@
14
15 install:: all 
16         ${INSTALLCMD} -d $(DESTDIR)$(libdir)
17         ${INSTALLCMD} -d $(DESTDIR)$(libdir)/pkgconfig
18         ${INSTALLCMD} -m 755 libtalloc.a $(DESTDIR)$(libdir)
19         ${INSTALLCMD} -m 755 $(TALLOC_SOLIB) $(DESTDIR)$(libdir)
20         ${INSTALLCMD} -d $(DESTDIR)${includedir}
21         ${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(DESTDIR)$(includedir)
22         ${INSTALLCMD} -m 644 talloc.pc $(DESTDIR)$(libdir)/pkgconfig
23         if [ -f talloc.3 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man3; fi
24         if [ -f talloc.3 ];then ${INSTALLCMD} -m 644 talloc.3 $(DESTDIR)$(mandir)/man3; fi
25         which swig >/dev/null 2>&1 && ${INSTALLCMD} -d $(DESTDIR)`swig -swiglib` || true
26         which swig >/dev/null 2>&1 && ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)`swig -swiglib` || true
27
28 doc:: talloc.3 talloc.3.html
29
30 clean::
31         rm -f *~ $(LIBOBJ) $(TALLOC_SOLIB) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
32
33 test:: testsuite
34         ./testsuite
35
36 gcov::
37         gcov talloc.c