From 93fd08168fdc881fdef099991bd7a22448841dc4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 28 Oct 2005 18:26:26 +0000 Subject: r11377: Add support for building LIBRARY elements as shared libraries: - Adds -rpath bin/ so you don't have to install Samba in order to use compiled binaries. - Writes out pkg-config files when building shared libs - Supports automatic fallback to MERGEDOBJ (which is the default) or OBJ_LIST (if ld -r is not supported) Building with shared libs reduces the size of the Samba binaries from 197 Mb to 60 Mb (including libraries) on my system (GCC4, with debugging). To build with shared libraries support enabled, run: LIBRARY_OUTPUT_TYPE=SHARED_LIBRARY ./config.status init functions don't get called correctly yet when using shared libs, so you won't be able to actually run anything with success :-) Once init functions are done, I'll look at support for loading shared modules once again. Based on a patch by Peter Novodvorsky (nidd on IRC). (This used to be commit 0b54405685674a2b19a28d77aae5b1136b5a4728) --- source4/lib/basic.mk | 5 ++++- source4/lib/samba3/config.mk | 19 +++++++------------ source4/lib/socket_wrapper/config.mk | 6 +++++- source4/lib/talloc/config.mk | 1 + 4 files changed, 17 insertions(+), 14 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/basic.mk b/source4/lib/basic.mk index 6debed79c9..eb65d27852 100644 --- a/source4/lib/basic.mk +++ b/source4/lib/basic.mk @@ -26,7 +26,10 @@ ADD_OBJ_FILES = \ # End SUBSYSTEM LIBNETIF ############################## -[SUBSYSTEM::TDR] +[LIBRARY::TDR] +MAJOR_VERSION = 0 +MINOR_VERSION = 0 +RELEASE_VERSION = 1 INIT_OBJ_FILES = tdr/tdr.o ############################## diff --git a/source4/lib/samba3/config.mk b/source4/lib/samba3/config.mk index bd135ed7ef..00b9ad7173 100644 --- a/source4/lib/samba3/config.mk +++ b/source4/lib/samba3/config.mk @@ -1,16 +1,11 @@ ################################################ # Start SUBSYSTEM LIBSAMBA3 -[SUBSYSTEM::LIBSAMBA3] -ADD_OBJ_FILES = \ - smbpasswd.o \ - tdbsam.o \ - policy.o \ - idmap.o \ - winsdb.o \ - samba3.o \ - group.o \ - registry.o \ - secrets.o \ - share_info.o +[LIBRARY::LIBSAMBA3] +MAJOR_VERSION = 0 +MINOR_VERSION = 0 +RELEASE_VERSION = 1 +ADD_OBJ_FILES = smbpasswd.o tdbsam.o policy.o \ + idmap.o winsdb.o samba3.o group.o \ + registry.o secrets.o share_info.o # End SUBSYSTEM LIBSAMBA3 ################################################ diff --git a/source4/lib/socket_wrapper/config.mk b/source4/lib/socket_wrapper/config.mk index ed9cf3eb1b..b4a4d8c4d0 100644 --- a/source4/lib/socket_wrapper/config.mk +++ b/source4/lib/socket_wrapper/config.mk @@ -1,7 +1,11 @@ ############################## # Start SUBSYSTEM SOCKET_WRAPPER -[SUBSYSTEM::SOCKET_WRAPPER] +[LIBRARY::SOCKET_WRAPPER] +MAJOR_VERSION = 0 +MINOR_VERSION = 0 +RELEASE_VERSION = 1 NOPROTO = YES +PUBLIC_HEADERS = socket_wrapper.h INIT_OBJ_FILES = socket_wrapper.o # End SUBSYSTEM SOCKET_WRAPPER ############################## diff --git a/source4/lib/talloc/config.mk b/source4/lib/talloc/config.mk index a4be0eb9ff..81a8833a94 100644 --- a/source4/lib/talloc/config.mk +++ b/source4/lib/talloc/config.mk @@ -9,6 +9,7 @@ REQUIRED_SUBSYSTEMS = LIBREPLACE NOPROTO = YES MANPAGE = talloc.3 PUBLIC_HEADERS = talloc.h +DESCRIPTION = A hierarchical pool based memory system with destructors # # End LIBRARY LIBTALLOC ################################################ -- cgit