summaryrefslogtreecommitdiff
path: root/source3/Makefile.in
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-07-07 00:02:50 +0200
committerMichael Adam <obnox@samba.org>2008-07-07 20:34:02 +0200
commit1b20cf1324e154cd7b3dcee3450a5c8af4361d16 (patch)
tree4709ed9778cd09ec5474b7ccb72fafa15fc9c836 /source3/Makefile.in
parent2e694978f5a21cfd8ce21f5a34ab5bd4ad817dda (diff)
downloadsamba-1b20cf1324e154cd7b3dcee3450a5c8af4361d16.tar.gz
samba-1b20cf1324e154cd7b3dcee3450a5c8af4361d16.tar.bz2
samba-1b20cf1324e154cd7b3dcee3450a5c8af4361d16.zip
build: handle libsmbclient by SMB_LIBRARY() and correctly create soname file.
Create libsmbclient.so as a symlink to libsmbclient.so.0. Michael (This used to be commit c463bd0cb9927176eec89e25788c6ea78eafdd16)
Diffstat (limited to 'source3/Makefile.in')
-rw-r--r--source3/Makefile.in36
1 files changed, 26 insertions, 10 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index eb9a6a26ee..0d92b8d5e9 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1525,7 +1525,7 @@ bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIB
MKSYMS_SH = $(srcdir)/script/mksyms.sh
-SHLIBS = libtalloc libtdb @LIBWBCLIENT@ @LIBSMBCLIENT@ @LIBSMBSHAREMODES@ @LIBADDNS@ libnetapi
+SHLIBS = libtalloc libtdb @LIBWBCLIENT@ libsmbclient @LIBSMBSHAREMODES@ @LIBADDNS@ libnetapi
shlibs: $(SHLIBS)
@@ -1846,16 +1846,26 @@ LIBSMBCLIENT_OBJ0 = \
LIBSMBCLIENT_OBJ = $(LIBSMBCLIENT_OBJ0) @LIBWBCLIENT_STATIC@
-LIBSMBCLIENT=bin/libsmbclient.a @LIBSMBCLIENT_SHARED@
+LIBSMBCLIENT_SHARED_TARGET=@LIBSMBCLIENT_SHARED_TARGET@
+LIBSMBCLIENT_SOVER=$(shell grep \^$(LIBSMBCLIENT_SHARED_TARGET) $(builddir)/library-versions | cut -d: -f2)
+LIBSMBCLIENT_SHARED_TARGET_SONAME=$(LIBSMBCLIENT_SHARED_TARGET).$(LIBSMBCLIENT_SOVER)
+LIBSMBCLIENT_STATIC_TARGET=@LIBSMBCLIENT_STATIC_TARGET@
+LIBSMBCLIENT=$(LIBSMBCLIENT_STATIC_TARGET) @LIBSMBCLIENT_SHARED@
+#LIBSMBCLIENT_SYMS=$(srcdir)/exports/libsmbclient.@SYMSEXT@
+LIBSMBCLIENT_HEADERS=$(srcdir)/include/libsmbclient.h
-bin/libsmbclient.@SHLIBEXT@: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
+$(LIBSMBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking shared library $@
@$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) \
@LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @LIBWBCLIENT_SHARED@ $(LIBS) \
$(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
- @SONAMEFLAG@`basename $@`.$(SONAME_VER)
+ @SONAMEFLAG@`basename $@`
-bin/libsmbclient.a: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ0)
+$(LIBSMBCLIENT_SHARED_TARGET): $(LIBSMBCLIENT_SHARED_TARGET_SONAME)
+ @rm -f $@
+ @ln -s `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` $@
+
+$(LIBSMBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ0)
@echo Linking non-shared library $@
@-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ0)
@@ -1863,16 +1873,22 @@ libsmbclient: $(LIBSMBCLIENT)
installlibsmbclient:: installdirs libsmbclient
@$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
- -$(INSTALLLIBCMD_SH) bin/libsmbclient.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
- -$(INSTALLLIBCMD_A) bin/libsmbclient.a $(DESTDIR)$(LIBDIR)
+ -$(INSTALLLIBCMD_SH) $(LIBSMBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
+ @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)`
+ -if test -e $(LIBSMBCLIENT_SHARED_TARGET_SONAME) ; then \
+ ln -s -f `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` \
+ $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)` ; \
+ fi
+ -$(INSTALLLIBCMD_A) $(LIBSMBCLIENT_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
@$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
- -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/include/libsmbclient.h $(DESTDIR)${prefix}/include
+ -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBSMBCLIENT_HEADERS) $(DESTDIR)${prefix}/include
installclientlib:: installlibsmbclient
uninstalllibsmbclient::
- -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/libsmbclient.@SHLIBEXT@
- -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libsmbclient.a
+ -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)`
+ -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)`
+ -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_STATIC_TARGET)`
-rm -f $(DESTDIR)${prefix}/include/libsmbclient.h
uninstallclientlib:: uninstalllibsmbclient