summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-11-06 19:24:12 +0100
committerMichael Adam <obnox@samba.org>2008-02-13 01:40:10 +0100
commit5e914f2c1367490a61ca000d51ecbd3bd20cd0a4 (patch)
treeb696e75525a9f0267f5f4a4982d0e9be26a1640d
parent9673162236c5ab5e1d52b6bb4b3af6902e9adcf4 (diff)
downloadsamba-5e914f2c1367490a61ca000d51ecbd3bd20cd0a4.tar.gz
samba-5e914f2c1367490a61ca000d51ecbd3bd20cd0a4.tar.bz2
samba-5e914f2c1367490a61ca000d51ecbd3bd20cd0a4.zip
r25882: Build shared library of talloc as well.
(cherry picked from commit 3692ba8299d4177289ca401fa467143ad14ccad4) (This used to be commit ddfc86b71d7e6fa3d1bd6fcaca4f31dd262e84d2)
-rw-r--r--source3/lib/talloc/Makefile.in19
-rw-r--r--source3/lib/talloc/configure.ac5
2 files changed, 22 insertions, 2 deletions
diff --git a/source3/lib/talloc/Makefile.in b/source3/lib/talloc/Makefile.in
index 18b48c3459..c9fcddf35c 100644
--- a/source3/lib/talloc/Makefile.in
+++ b/source3/lib/talloc/Makefile.in
@@ -14,12 +14,23 @@ INSTALLCMD = @INSTALL@
CC = @CC@
CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H= -I. -I@srcdir@
EXTRA_TARGETS = @DOC_TARGET@
+PICFLAG = @PICFLAG@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+SHLIBEXT = @SHLIBEXT@
+SHLD_FLAGS = @SHLD_FLAGS@
+SONAMEFLAG = @SONAMEFLAG@
.SUFFIXES: .c .o .3 .3.xml .xml .html
LIBOBJ = @TALLOC_OBJ@ @LIBREPLACEOBJ@
-all: showflags libtalloc.a testsuite $(EXTRA_TARGETS)
+SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
+SONAME = libtalloc.$(SHLIBEXT).1
+
+.c.o:
+ $(CC) $(PICFLAG) -o $@ -c $< $(CFLAGS)
+
+all: showflags libtalloc.a $(SOLIB) testsuite $(EXTRA_TARGETS)
showflags:
@echo 'talloc will be compiled with flags:'
@@ -33,10 +44,14 @@ libtalloc.a: $(LIBOBJ)
ar -rv $@ $(LIBOBJ)
@-ranlib $@
+$(SOLIB): $(LIBOBJ)
+ $(CC) $(SONAMEFLAG)$(SONAME) $(SHLD_FLAGS) -o $@ $^
+
install: all
${INSTALLCMD} -d $(DESTDIR)$(libdir)
${INSTALLCMD} -d $(DESTDIR)$(libdir)/pkgconfig
${INSTALLCMD} -m 755 libtalloc.a $(DESTDIR)$(libdir)
+ ${INSTALLCMD} -m 755 $(SOLIB) $(DESTDIR)$(libdir)
${INSTALLCMD} -d $(DESTDIR)${includedir}
${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(DESTDIR)$(includedir)
${INSTALLCMD} -m 644 talloc.pc $(DESTDIR)$(libdir)/pkgconfig
@@ -52,7 +67,7 @@ doc: talloc.3 talloc.3.html
-test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
clean:
- rm -f *~ $(LIBOBJ) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
+ rm -f *~ $(LIBOBJ) $(SOLIB) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
test: testsuite
./testsuite
diff --git a/source3/lib/talloc/configure.ac b/source3/lib/talloc/configure.ac
index afc2a944f0..d76052007c 100644
--- a/source3/lib/talloc/configure.ac
+++ b/source3/lib/talloc/configure.ac
@@ -15,4 +15,9 @@ if test -n "$XSLTPROC"; then
fi
AC_SUBST(DOC_TARGET)
+AC_LD_PICFLAG
+AC_LD_SHLIBEXT
+AC_LD_SONAMEFLAG
+AC_LD_SHLDFLAGS
+
AC_OUTPUT(Makefile talloc.pc)