A cool idea from mbp: create a big shared library of all Samba objects
authorTim Potter <tpot@samba.org>
Fri, 15 Nov 2002 00:33:55 +0000 (00:33 +0000)
committerTim Potter <tpot@samba.org>
Fri, 15 Nov 2002 00:33:55 +0000 (00:33 +0000)
which we can use to link against Samba unit test programs.  Now we can
compile and link unit tests without having to create 4MB executables
for each program

It's called libbigballofmud.so both to discourage casual usage and
also to reflect what the dependencies within Samba have become.
(This used to be commit a59f731256f3a1c09f32452de9483b44088c942b)

source3/Makefile.in

index 0532b7a228b878ae8be783a25560f8f1ca7d449a..c82eb5dad3d5ac144dee2b23ddb041da391d7da2 100644 (file)
@@ -385,6 +385,18 @@ LIBSMBCLIENT_OBJ = libsmb/libsmbclient.o libsmb/libsmb_compat.o \
                   libsmb/libsmb_cache.o $(LIB_OBJ) \
                   $(LIBSMB_OBJ) $(PARAM_OBJ) $(UBIQX_OBJ)
 
+# This shared library is intended for linking with unit test programs
+# to test Samba internals.  It's called libbigballofmud.so to
+# discourage casual usage.
+
+LIBBIGBALLOFMUD_MAJOR = 0
+
+LIBBIGBALLOFMUD_OBJ = $(LIB_OBJ) $(UBIQX_OBJ) $(PARAM_OBJ) $(SECRETS_OBJ) \
+       $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ) \
+       $(GROUPDB_OBJ)
+
+LIBBIGBALLOFMUD_PICOBJS = $(LIBBIGBALLOFMUD_OBJ:.o=.po)
+
 CLIENT_OBJ1 = client/client.o client/clitar.o 
 
 CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
@@ -795,6 +807,11 @@ bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS)
        @echo Linking libsmbclient non-shared library $@
        -$(AR) -rc $@ $(LIBSMBCLIENT_PICOBJS) 
 
+bin/libbigballofmud.@SHLIBEXT@: $(LIBBIGBALLOFMUD_PICOBJS)
+       @echo Linking bigballofmud shared library $@
+       $(SHLD) $(LDSHFLAGS) -o $@ $(LIBBIGBALLOFMUD_PICOBJS) $(LIBS) \
+               @SONAMEFLAG@`basename $@`.$(LIBBIGBALLOFMUD_MAJOR)
+
 libsmbclient: bin/libsmbclient.a bin/libsmbclient.@SHLIBEXT@
 
 nsswitch/libnss_wins.@SHLIBEXT@: $(NSS_OBJ)
@@ -1124,4 +1141,3 @@ dangerous-installcheck:
        SATYR_SUITEDIR=../testsuite/satyr/ prefix=$(BASEDIR) \
        LIBSMB_PROG=$(SBINDIR)/smbd \
        testdir=./testdir $(SHELL) satyr
-