Use common signal helper implementation.
[samba.git] / source3 / Makefile.in
index d026e5207d5e467e5b0636dd7bc5da86ac2a7e9f..d1eb3d5538530b8d4eb97e23d6ea45d180582547 100644 (file)
@@ -127,6 +127,7 @@ LOGFILEBASE = @logfilebase@
 CONFIGFILE = $(CONFIGDIR)/smb.conf
 LMHOSTSFILE = $(CONFIGDIR)/lmhosts
 CTDBDIR = @ctdbdir@
+NCALRPCDIR = @ncalrpcdir@
 
 # This is where smbpasswd et al go
 PRIVATEDIR = @privatedir@
@@ -150,12 +151,7 @@ CODEPAGEDIR = @codepagedir@
 # the directory where pid files go
 PIDDIR = @piddir@
 
-FLAGS1 = $(CFLAGS) @FLAGS1@ @SAMBA_CPPFLAGS@ $(CPPFLAGS)
-FLAGS2 =
-FLAGS3 =
-FLAGS4 = -I$(CTDBDIR)/include
-FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4)
-FLAGS  = $(ISA) $(FLAGS5) -I$(srcdir)/lib -D_SAMBA_BUILD_=3
+FLAGS = -I. -I$(srcdir) @FLAGS1@ @SAMBA_CPPFLAGS@ $(CPPFLAGS) -I$(CTDBDIR)/include $(ISA) -I$(srcdir)/lib -D_SAMBA_BUILD_=3
 
 PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
        -DPRIVATE_DIR=\"$(PRIVATE_DIR)\" \
@@ -171,6 +167,7 @@ PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
        -DLOGFILEBASE=\"$(LOGFILEBASE)\" \
        -DSHLIBEXT=\"@SHLIBEXT@\" \
        -DCTDBDIR=\"$(CTDBDIR)\" \
+       -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
        -DCONFIGDIR=\"$(CONFIGDIR)\" \
        -DCODEPAGEDIR=\"$(CODEPAGEDIR)\" \
        -DCACHEDIR=\"$(CACHEDIR)\" \
@@ -180,7 +177,7 @@ PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
 
 SBIN_PROGS = bin/smbd@EXEEXT@ bin/nmbd@EXEEXT@ @SWAT_SBIN_TARGETS@ @EXTRA_SBIN_PROGS@
 
-ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@ @CIFSUPCALL_PROGS@
+ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@
 
 BIN_PROGS1 = bin/smbclient@EXEEXT@ bin/net@EXEEXT@ bin/smbspool@EXEEXT@ \
        bin/testparm@EXEEXT@ bin/smbstatus@EXEEXT@ bin/smbget@EXEEXT@
@@ -230,7 +227,7 @@ MODULES = $(VFS_MODULES) $(PDB_MODULES) $(RPC_MODULES) $(IDMAP_MODULES) \
 # object file lists
 ######################################################################
 
-TDB_OBJ = lib/util_tdb.o \
+TDB_LIB_OBJ = lib/util_tdb.o \
          lib/dbwrap.o lib/dbwrap_tdb.o \
          lib/dbwrap_ctdb.o \
          lib/dbwrap_rbt.o @LIBTDB_STATIC@
@@ -254,7 +251,7 @@ LIBNDR_DRSUAPI_OBJ = librpc/ndr/ndr_drsuapi.o \
                     librpc/gen_ndr/ndr_drsuapi.o \
                     librpc/gen_ndr/ndr_drsblobs.o
 
-COMPRESSION_OBJ = lib/compression/mszip.o
+COMPRESSION_OBJ = ../lib/compression/mszip.o
 
 DRSUAPI_OBJ = $(LIBNDR_DRSUAPI_OBJ) \
              $(COMPRESSION_OBJ)
@@ -318,28 +315,29 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) \
          lib/interfaces.o lib/rbtree.o lib/memcache.o \
          lib/util_transfer_file.o lib/async_req.o \
          lib/async_sock.o \
-         $(TDB_OBJ) \
+         $(TDB_LIB_OBJ) \
          $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
-         lib/interface.o lib/md4.o \
+         lib/interface.o ../lib/crypto/md4.o \
          lib/pidfile.o \
-         lib/signal.o lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \
+         ../lib/util/signal.o lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \
+         ../lib/util/time.o \
          lib/ufc.o lib/genrand.o lib/username.o \
          lib/util_pw.o lib/access.o lib/smbrun.o \
-         lib/bitmap.o lib/crc32.o lib/dprintf.o \
-         lib/xfile.o lib/wins_srv.o $(UTIL_REG_OBJ) \
+         lib/bitmap.o ../lib/crypto/crc32.o lib/dprintf.o $(UTIL_REG_OBJ) \
+         ../lib/util/xfile.o ../lib/util/util_strlist.o lib/wins_srv.o \
          lib/util_str.o lib/clobber.o lib/util_sid.o lib/util_uuid.o \
-         lib/util_unistr.o lib/util_file.o lib/data_blob.o \
+         lib/util_unistr.o lib/util_file.o ../lib/util/data_blob.o \
          lib/util.o lib/util_sock.o lib/sock_exec.o lib/util_sec.o \
          lib/substitute.o lib/fsusage.o lib/dbwrap_util.o \
          lib/ms_fnmatch.o lib/select.o lib/errmap_unix.o \
          lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \
-         lib/md5.o lib/hmacmd5.o lib/arc4.o lib/iconv.o \
-         lib/pam_errors.o intl/lang_tdb.o lib/conn_tdb.o \
+         ../lib/crypto/md5.o ../lib/crypto/hmacmd5.o ../lib/crypto/arcfour.o \
+         lib/iconv.o lib/pam_errors.o intl/lang_tdb.o lib/conn_tdb.o \
          lib/adt_tree.o lib/gencache.o \
          lib/module.o lib/events.o lib/ldap_escape.o @CHARSET_STATIC@ \
          lib/secdesc.o lib/util_seaccess.o lib/secace.o lib/secacl.o \
          libads/krb5_errs.o lib/system_smbd.o lib/audit.o $(LIBNDR_OBJ) \
-         lib/file_id.o
+         lib/file_id.o lib/idmap_cache.o
 
 LIB_DUMMY_OBJ = lib/dummysmbd.o lib/dummyroot.o
 LIB_NONSMBD_OBJ = $(LIB_OBJ) $(LIB_DUMMY_OBJ)
@@ -381,7 +379,9 @@ LIBADS_SERVER_OBJ = libads/kerberos_verify.o libads/authdata.o \
 
 SECRETS_OBJ = passdb/secrets.o passdb/machine_sid.o
 
-LIBNBT_OBJ = libcli/nbt/nbtname.o \
+LIBNBT_OBJ = ../libcli/nbt/nbtname.o \
+            ../libcli/netlogon.o \
+            ../libcli/ndr_netlogon.o \
             librpc/gen_ndr/ndr_nbt.o \
             librpc/gen_ndr/ndr_svcctl.o
 
@@ -623,6 +623,8 @@ VFS_TSMSM_OBJ = modules/vfs_tsmsm.o
 VFS_FILEID_OBJ = modules/vfs_fileid.o
 VFS_AIO_FORK_OBJ = modules/vfs_aio_fork.o
 VFS_SYNCOPS_OBJ = modules/vfs_syncops.o
+VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o
+VFS_SMB_TRAFFIC_ANALYZER_OBJ = modules/vfs_smb_traffic_analyzer.o
 
 PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
 
@@ -637,6 +639,7 @@ AUTH_SERVER_OBJ = auth/auth_server.o
 AUTH_UNIX_OBJ = auth/auth_unix.o
 AUTH_WINBIND_OBJ = auth/auth_winbind.o
 AUTH_SCRIPT_OBJ = auth/auth_script.o
+AUTH_NETLOGOND_OBJ = auth/auth_netlogond.o
 
 AUTH_OBJ = auth/auth.o @AUTH_STATIC@ auth/auth_util.o auth/token_util.o \
           auth/auth_compat.o auth/auth_ntlmssp.o \
@@ -740,6 +743,10 @@ TESTPARM_OBJ = utils/testparm.o \
                $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
               $(LIBSAMBA_OBJ)
 
+TEST_LP_LOAD_OBJ = param/test_lp_load.o \
+                  $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
+                  $(POPT_LIB_OBJ) $(LIBSAMBA_OBJ)
+
 PASSWD_UTIL_OBJ = utils/passwd_util.o
 
 SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSWD_UTIL_OBJ) $(PASSCHANGE_OBJ) \
@@ -950,13 +957,14 @@ SHARESEC_OBJ  = $(SHARESEC_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
                $(LIBSAMBA_OBJ) \
                 $(POPT_LIB_OBJ)
 
-TALLOCTORT_OBJ = @tallocdir@/testsuite.o $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
-                 $(LIBSAMBA_OBJ)
+TALLOCTORT_OBJ = @tallocdir@/testsuite.o @tallocdir@/testsuite_main.o \
+               $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSAMBA_OBJ)
 
-REPLACETORT_OBJ = lib/replace/test/testsuite.o \
-               lib/replace/test/getifaddrs.o \
-               lib/replace/test/os2_delete.o \
-               lib/replace/test/strptime.o \
+REPLACETORT_OBJ = @libreplacedir@/test/testsuite.o \
+               @libreplacedir@/test/getifaddrs.o \
+               @libreplacedir@/test/os2_delete.o \
+               @libreplacedir@/test/strptime.o \
+               @libreplacedir@/test/main.o \
                $(LIBREPLACE_OBJ)
 
 NDRDUMP_OBJ = librpc/tools/ndrdump.o \
@@ -980,10 +988,22 @@ PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_
                $(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) \
                $(LDB_OBJ)
 
-IDMAP_OBJ     = winbindd/idmap.o winbindd/idmap_cache.o winbindd/idmap_util.o @IDMAP_STATIC@
+IDMAP_OBJ     = winbindd/idmap.o winbindd/idmap_util.o @IDMAP_STATIC@
 
 NSS_INFO_OBJ = winbindd/nss_info.o @NSS_INFO_STATIC@
 
+IDMAP_HASH_OBJ = \
+               winbindd/idmap_hash/idmap_hash.o \
+               winbindd/idmap_hash/mapfile.o
+
+IDMAP_ADEX_OBJ = \
+               winbindd/idmap_adex/idmap_adex.o \
+               winbindd/idmap_adex/cell_util.o \
+               winbindd/idmap_adex/likewise_cell.o \
+               winbindd/idmap_adex/provider_unified.o \
+               winbindd/idmap_adex/gc_util.o \
+               winbindd/idmap_adex/domain_util.o
+
 WINBINDD_OBJ1 = \
                winbindd/winbindd.o       \
                winbindd/winbindd_user.o  \
@@ -1059,10 +1079,10 @@ LDBDEL_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbdel.o
 LDBMODIFY_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbmodify.o
 
 WINBIND_KRB5_LOCATOR_OBJ1 = nsswitch/winbind_krb5_locator.o
-WINBIND_KRB5_LOCATOR_OBJ = $(WINBIND_KRB5_LOCATOR_OBJ1) $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ)
+WINBIND_KRB5_LOCATOR_OBJ = $(WINBIND_KRB5_LOCATOR_OBJ1) $(LIBREPLACE_OBJ)
 
-POPT_OBJ=popt/findme.o popt/popt.o popt/poptconfig.o \
-          popt/popthelp.o popt/poptparse.o
+POPT_OBJ=../lib/popt/findme.o ../lib/popt/popt.o ../lib/popt/poptconfig.o \
+          ../lib/popt/popthelp.o ../lib/popt/poptparse.o
 
 INIPARSER_OBJ = iniparser_build/iniparser.o iniparser_build/dictionary.o \
                iniparser_build/strlib.o
@@ -1127,6 +1147,8 @@ pam_smbpass: SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@
 
 pam_winbind: SHOWFLAGS bin/pam_winbind.@SHLIBEXT@
 
+gpext_modules:: $(GPEXT_MODULES)
+
 torture:: SHOWFLAGS $(TORTURE_PROGS)
 
 smbtorture : SHOWFLAGS bin/smbtorture@EXEEXT@
@@ -1169,14 +1191,13 @@ modules:: SHOWFLAGS $(MODULES)
 
 #####################################################################
 ## Perl IDL Compiler
-IDL_FILES = lsa.idl dfs.idl echo.idl winreg.idl initshutdown.idl \
-       srvsvc.idl svcctl.idl eventlog.idl wkssvc.idl netlogon.idl notify.idl \
-       epmapper.idl messaging.idl xattr.idl misc.idl samr.idl security.idl \
-       dssetup.idl krb5pac.idl ntsvcs.idl libnetapi.idl drsuapi.idl drsblobs.idl \
-       nbt.idl
-
-idl::
-       @IDL_FILES="$(IDL_FILES)" CPP="$(CPP)" PERL="$(PERL)" \
+samba3-idl::
+       @IDL_FILES="lsa.idl dfs.idl echo.idl winreg.idl initshutdown.idl \
+               srvsvc.idl svcctl.idl eventlog.idl wkssvc.idl netlogon.idl notify.idl \
+               epmapper.idl messaging.idl xattr.idl misc.idl samr.idl security.idl \
+               dssetup.idl krb5pac.idl ntsvcs.idl libnetapi.idl drsuapi.idl drsblobs.idl \
+               nbt.idl" \
+               CPP="$(CPP)" PIDL="../pidl/pidl" \
         srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh $(PIDL_ARGS)
 
 
@@ -1190,7 +1211,7 @@ everything:: all libtalloc libsmbclient libnetapi debug2html smbfilter talloctor
 .SUFFIXES: .c .o .lo
 
 SHOWFLAGS::
-       @echo "Using FLAGS      = $(FLAGS)"
+       @echo "Using CFLAGS     = $(CFLAGS)"
        @echo "      PICFLAG    = $(PICFLAG)"
        @echo "      LIBS       = $(LIBS)"
        @echo "      LDFLAGS    = $(LDFLAGS)"
@@ -1208,11 +1229,11 @@ MAKEDIR = || exec false; \
          exec false; fi || exec false
 
 # Run a static checker.
-CHECK_CC = $(CC_CHECKER) -I. -I$(srcdir) $(FLAGS) $(PICFLAG) -c $< -o $@
+CHECK_CC = $(CC_CHECKER) $(CFLAGS) $(PICFLAG) -c $< -o $@
 # Compile a source file.
-COMPILE_CC = $(CC) -I. -I$(srcdir) $(FLAGS) $(PICFLAG) -c $< -o $@
+COMPILE_CC = $(CC) $(CFLAGS) $(PICFLAG) -c $< -o $@
 # Compile a source file with the installation paths defined.
-COMPILE_CC_PATH = $(CC) -I. -I$(srcdir) $(PATH_FLAGS) $(FLAGS) $(PICFLAG) -c $< -o $@
+COMPILE_CC_PATH = $(CC) $(PATH_FLAGS) $(CFLAGS) $(PICFLAG) -c $< -o $@
 
 COMPILE = $(COMPILE_CC)
 
@@ -1226,7 +1247,7 @@ COMPILE = $(COMPILE_CC)
        @echo Compiling $*.c
        @$(COMPILE) && exit 0;\
                echo "The following command failed:" 1>&2;\
-               echo "$(COMPILE_CC)" 1>&2;\
+               echo "$(subst ",\",$(COMPILE_CC))" 1>&2;\
                $(COMPILE_CC) >/dev/null 2>&1
 @BROKEN_CC@    -mv `echo $@ | sed 's%^.*/%%g'` $@
 
@@ -1560,9 +1581,8 @@ MKSYMS_SH = $(srcdir)/script/mksyms.sh
 #
 #-------------------------------------------------------------------
 
-TALLOC_OBJ = @TALLOC_OBJS@
 
-LIBTALLOC_OBJ0 = $(TALLOC_OBJ)
+LIBTALLOC_OBJ0 = @LIBTALLOC_OBJ0@
 LIBTALLOC_OBJ = $(LIBTALLOC_OBJ0) $(LIBREPLACE_OBJ)
 
 LIBTALLOC_SHARED_TARGET=@LIBTALLOC_SHARED_TARGET@
@@ -1627,7 +1647,7 @@ shlibs test_shlibs: @LIBTALLOC_SHARED@
 #
 #-------------------------------------------------------------------
 
-LIBTDB_OBJ0 = @TDB_OBJS@
+LIBTDB_OBJ0 = @LIBTDB_OBJ0@
 LIBTDB_OBJ = $(LIBTDB_OBJ0) $(LIBREPLACE_OBJ)
 
 LIBTDB_SHARED_TARGET=@LIBTDB_SHARED_TARGET@
@@ -1699,6 +1719,7 @@ LIBWBCLIENT_OBJ0 = nsswitch/libwbclient/wbclient.o \
                  nsswitch/libwbclient/wbc_pwd.o \
                  nsswitch/libwbclient/wbc_idmap.o \
                  nsswitch/libwbclient/wbc_sid.o \
+                 nsswitch/libwbclient/wbc_guid.o \
                  nsswitch/libwbclient/wbc_pam.o
 LIBWBCLIENT_OBJ = $(LIBWBCLIENT_OBJ0) \
                  $(WBCOMMON_OBJ) \
@@ -1835,7 +1856,9 @@ LIBNETAPI_OBJ0 = lib/netapi/netapi.o \
                 lib/netapi/group.o \
                 lib/netapi/localgroup.o \
                 lib/netapi/samr.o \
-                lib/netapi/sid.o
+                lib/netapi/sid.o \
+                lib/netapi/share.o \
+                lib/netapi/file.o
 
 LIBNETAPI_OBJ  = $(LIBNETAPI_OBJ0) $(LIBNET_OBJ) \
                 $(LIBSMBCONF_OBJ) \
@@ -1917,10 +1940,13 @@ LIBSMBCLIENT_SOVER=@LIBSMBCLIENT_SOVER@
 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_SYMS=$(srcdir)/exports/libsmbclient.@SYMSEXT@
 LIBSMBCLIENT_HEADERS=$(srcdir)/include/libsmbclient.h
 
-$(LIBSMBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
+$(LIBSMBCLIENT_SYMS): $(LIBSMBCLIENT_HEADERS)
+       @$(MKSYMS_SH) $(AWK) $@ $(LIBSMBCLIENT_HEADERS)
+
+$(LIBSMBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_SYMS) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo Linking shared library $@
        @$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) \
                $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(LIBS) \
@@ -1986,10 +2012,13 @@ LIBSMBSHAREMODES_SOVER=@LIBSMBSHAREMODES_SOVER@
 LIBSMBSHAREMODES_SHARED_TARGET_SONAME=$(LIBSMBSHAREMODES_SHARED_TARGET).$(LIBSMBSHAREMODES_SOVER)
 LIBSMBSHAREMODES_STATIC_TARGET=@LIBSMBSHAREMODES_STATIC_TARGET@
 LIBSMBSHAREMODES=$(LIBSMBSHAREMODES_STATIC_TARGET) @LIBSMBSHAREMODES_SHARED@
-#LIBSMBSHAREMODES_SYMS=$(srcdir)/exports/libsmbsharemodes.@SYMSEXT@
+LIBSMBSHAREMODES_SYMS=$(srcdir)/exports/libsmbsharemodes.@SYMSEXT@
 LIBSMBSHAREMODES_HEADERS=$(srcdir)/include/smb_share_modes.h
 
-$(LIBSMBSHAREMODES_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
+$(LIBSMBSHAREMODES_SYMS): $(LIBSMBSHAREMODES_HEADERS)
+       @$(MKSYMS_SH) $(AWK) $@ $(LIBSMBSHAREMODES_HEADERS)
+
+$(LIBSMBSHAREMODES_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) $(LIBSMBSHAREMODES_SYMS) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
        @echo Linking shared library $@
        @$(SHLD_DSO) $(LIBSMBSHAREMODES_OBJ) \
                $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
@@ -2149,15 +2178,15 @@ bin/vlp@EXEEXT@: $(BINARY_PREREQS) $(VLP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
                $(LDAP_LIBS) $(KRB5LIBS) $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
                @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
 
-bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ)
+bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ) @LIBWBCLIENT_SHARED@
        @echo "Linking $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) $(WINBIND_LIBS) \
                @SONAMEFLAG@`basename $@`
 
-bin/pam_winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ)
+bin/pam_winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) @LIBTALLOC_SHARED@ @LIBWBCLIENT_SHARED@
        @echo "Linking shared library $@"
        @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) -lpam @INIPARSERLIBS@ \
-               $(PAM_WINBIND_EXTRA_LIBS) @SONAMEFLAG@`basename $@`
+               $(PAM_WINBIND_EXTRA_LIBS) $(LIBTALLOC_LIBS) $(WINBIND_LIBS) @SONAMEFLAG@`basename $@`
 
 bin/builtin.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_BUILTIN_OBJ)
        @echo "Building plugin $@"
@@ -2171,6 +2200,10 @@ bin/script.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SCRIPT_OBJ)
        @echo "Building plugin $@"
        @$(SHLD_MODULE) $(AUTH_SCRIPT_OBJ)
 
+bin/netlogond.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_NETLOGOND_OBJ)
+       @echo "Building plugin $@"
+       @$(SHLD_MODULE) $(AUTH_NETLOGOND_OBJ)
+
 bin/smbserver.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SERVER_OBJ)
        @echo "Building plugin $@"
        @$(SHLD_MODULE) $(AUTH_SERVER_OBJ)
@@ -2207,6 +2240,14 @@ bin/ad.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ad.o
        @echo "Building plugin $@"
        @$(SHLD_MODULE) winbindd/idmap_ad.o
 
+bin/hash.@SHLIBEXT@: $(BINARY_PREREQS) $(IDMAP_HASH_OBJ)
+       @echo "Building plugin $@"
+       @$(SHLD_MODULE) $(IDMAP_HASH_OBJ)
+
+bin/adex.@SHLIBEXT@: $(BINARY_PREREQS) $(IDMAP_ADEX_OBJ)
+       @echo "Building plugin $@"
+       @$(SHLD_MODULE) $(IDMAP_ADEX_OBJ)
+
 bin/tdb2.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_tdb2.o
        @echo "Building plugin $@"
        @$(SHLD_MODULE) winbindd/idmap_tdb2.o
@@ -2374,6 +2415,14 @@ bin/aio_fork.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_FORK_OBJ)
        @echo "Building plugin $@"
        @$(SHLD_MODULE) $(VFS_AIO_FORK_OBJ)
 
+bin/acl_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_XATTR_OBJ)
+       @echo "Building plugin $@"
+       @$(SHLD_MODULE) $(VFS_ACL_XATTR_OBJ)
+
+bin/smb_traffic_analyzer.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ)
+       @echo "Building plugin $@"
+       @$(SHLD_MODULE) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ)
+
 bin/registry.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/registry.o
        @echo "Building plugin $@"
        @$(SHLD_MODULE) libgpo/gpext/registry.o
@@ -2382,6 +2431,10 @@ bin/scripts.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/scripts.o
        @echo "Building plugin $@"
        @$(SHLD_MODULE) libgpo/gpext/scripts.o
 
+bin/security.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/security.o
+       @echo "Building plugin $@"
+       @$(SHLD_MODULE) libgpo/gpext/security.o
+
 #########################################################
 ## IdMap NSS plugins
 
@@ -2454,6 +2507,13 @@ bin/rpc_open_tcp@EXEEXT@: $(BINARY_PREREQS) $(RPC_OPEN_TCP_OBJ) @LIBTALLOC_SHARE
                $(LIBS) $(LIBTALLOC_LIBS) @LIBTDB_SHARED@ $(WINBIND_LIBS) \
                $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS)
 
+bin/test_lp_load@EXEEXT@: $(BINARY_PREREQS) $(TEST_LP_LOAD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
+       @echo "Linking $@"
+       @$(CC) $(FLAGS) -o $@ $(TEST_LP_LOAD_OBJ) \
+               $(LDFLAGS) $(DYNEEXP) $(LIBS) \
+               $(LDAP_LIBS) \
+               $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+
 install:: installservers installbin @INSTALL_CIFSMOUNT@ @INSTALL_CIFSUPCALL@ installman \
                installscripts installdat installmodules @SWAT_INSTALL_TARGETS@ \
                @INSTALL_PAM_MODULES@ installlibs
@@ -2469,7 +2529,7 @@ install-everything:: install installmodules
 # is not used
 
 installdirs::
-       @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(PRIVATEDIR) $(PIDDIR) $(LOCKDIR) $(MANDIR)
+       @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(PRIVATEDIR) $(PIDDIR) $(LOCKDIR) $(MANDIR) $(CODEPAGEDIR) $(MODULESDIR)
 
 installservers:: all installdirs
        @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
@@ -2482,8 +2542,8 @@ installcifsmount:: @CIFSMOUNT_PROGS@
        @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSMOUNT_PROGS@
 
 installcifsupcall:: @CIFSUPCALL_PROGS@
-       @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(ROOTSBINDIR)
-       @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSUPCALL_PROGS@
+       @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(SBINDIR)
+       @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) @CIFSUPCALL_PROGS@
 
 # Some symlinks are required for the 'probing' of modules.
 # This mechanism should go at some point..
@@ -2504,6 +2564,8 @@ installmodules:: modules installdirs
        @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) domain.@SHLIBEXT@ trustdomain.@SHLIBEXT@ ntdomain.@SHLIBEXT@
        @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) builtin.@SHLIBEXT@ guest.@SHLIBEXT@ fixed_challenge.@SHLIBEXT@ name_to_ntstatus.@SHLIBEXT@
        @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/ad.@SHLIBEXT@ rfc2307.@SHLIBEXT@ sfu.@SHLIBEXT@ sfu20.@SHLIBEXT@
+       @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/adex.@SHLIBEXT@ adex.@SHLIBEXT@
+       @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/hash.@SHLIBEXT@ hash.@SHLIBEXT@
 
 installscripts:: installdirs
        @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS)
@@ -2599,6 +2661,10 @@ uninstallpammodules::
 # Toplevel clean files
 TOPFILES=dynconfig.o
 
+cleanlibs::
+       -rm -f ../lib/*/*.o ../lib/*/*/*.o \
+               ../libcli/*.o ../libcli/*/*.o
+
 clean:: cleanlibs
        -rm -f include/build_env.h
        -rm -f smbd/build_options.c
@@ -2611,7 +2677,9 @@ clean:: cleanlibs
                $(MODULES) $(TORTURE_PROGS) \
                $(EVERYTHING_PROGS) \
                bin/timelimit \
-               .headers.stamp */src/*.o
+               .headers.stamp */src/*.o \
+               ../lib/*/*.o \
+               ../libcli/*.o ../libcli/*/*.o
        -rm -rf t_dir
 
 include/build_env.h: script/build_env.sh
@@ -2620,18 +2688,12 @@ include/build_env.h: script/build_env.sh
          > $(builddir)/include/build_env.h
 
 proto::
-       @echo
-       @echo "NOTE: 'proto' is no longer a valid make target as proto.h"
-       @echo "and other prototype headers are not generated anymore."
-       @echo
 
-.PHONY: proto
+etags::
+       etags `find $(srcdir)/.. -name "*.[ch]"`
 
-etags:
-       etags `find $(srcdir) -name "*.[ch]" | grep -v /.svn/`
-
-ctags:
-       ctags `find $(srcdir) -name "*.[ch]" | grep -v /.svn/`
+ctags::
+       ctags `find $(srcdir)/.. -name "*.[ch]"`
 
 realclean:: clean
        -rm -f config.log bin/.dummy script/findsmb script/gen-8bit-gap.sh
@@ -2714,3 +2776,24 @@ valgrindtest:: all torture timelimit
         SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
         VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
         PERL="$(PERL)" $(srcdir)/script/tests/selftest.sh ${selftest_prefix} all "${smbtorture4_path}"
+
+# Check for Winbind struct 32/64bit padding
+test_wbpad:
+       @echo "Testing winbind request/response structure for 32/64bit padding"
+       @./script/tests/wb_pad.sh || exit 1;
+
+##
+## Examples:
+##
+
+libsmbclient_examples: libsmbclient
+       $(MAKE) -C ../examples/libsmbclient -f Makefile.internal
+
+clean_libsmbclient_examples:
+       $(MAKE) -C ../examples/libsmbclient -f Makefile.internal clean
+
+libnetapi_examples: libnetapi
+       $(MAKE) -C lib/netapi/examples
+
+clean_libnetapi_examples:
+       $(MAKE) -C lib/netapi/examples clean