Makefile.in: Added target for makeyodldocs - not used by default.
[kai/samba.git] / source / Makefile.in
index a8301303f1b00c92633f1e92c9caf9b1b314b5c5..59e824bd8e9784d497c4dcdd8279958f1b4e45c5 100644 (file)
@@ -19,6 +19,7 @@ INSTALLCMD=@INSTALL@
 
 VPATH=@srcdir@
 srcdir=@srcdir@
+builddir=@builddir@
 SHELL=/bin/sh
 
 BASEDIR=$(prefix)/samba
@@ -39,7 +40,7 @@ NMBLOGFILE = $(VARDIR)/log.nmb
 CONFIGFILE = $(LIBDIR)/smb.conf
 LMHOSTSFILE = $(LIBDIR)/lmhosts
 DRIVERFILE = $(LIBDIR)/printers.def
-SMB_PASSWD = $(BINDIR)/smbpasswd
+PASSWD_PROGRAM = /bin/passwd
 SMB_PASSWD_FILE = $(BASEDIR)/private/smbpasswd
 
 # This is where SWAT images and help files go
@@ -62,22 +63,23 @@ CODEPAGELIST= 437 737 850 852 861 932 866 949 950 936
 SMBRUN = $(BINDIR)/smbrun
 
 
-PASSWD_FLAGS = -DSMB_PASSWD=\"$(SMB_PASSWD)\" -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\"
-FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -DSMBLOGFILE=\"$(SMBLOGFILE)\" -DNMBLOGFILE=\"$(NMBLOGFILE)\"
+PASSWD_FLAGS = -DPASSWD_PROGRAM=\"$(PASSWD_PROGRAM)\" -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\"
+FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper -DSMBLOGFILE=\"$(SMBLOGFILE)\" -DNMBLOGFILE=\"$(NMBLOGFILE)\"
 FLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"  
 FLAGS3 = -DSWATDIR=\"$(SWATDIR)\" -DSBINDIR=\"$(SBINDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DSMBRUN=\"$(SMBRUN)\" -DCODEPAGEDIR=\"$(CODEPAGEDIR)\"
-FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\"
+FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\" -DBINDIR=\"$(BINDIR)\"
 FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4) -DHAVE_INCLUDES_H
 FLAGS  = $(FLAGS5) $(PASSWD_FLAGS)
 
 SPROGS = bin/smbd bin/nmbd bin/swat
 PROGS1 = bin/smbclient bin/testparm bin/testprns bin/smbrun bin/smbstatus 
-PROGS2 = bin/rpcclient bin/smbpasswd bin/make_smbcodepage
+PROGS2 = bin/rpcclient bin/smbpasswd bin/make_smbcodepage @WRAP@ @WRAP32@
 MPROGS = @MPROGS@
 PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup bin/make_printerdef 
 
-SCRIPTS = script/smbtar script/addtosmbpass
+SCRIPTS = script/smbtar script/addtosmbpass script/convert_smbpasswd
 
+QUOTAOBJS=@QUOTAOBJS@
 
 ######################################################################
 # object file lists
@@ -87,11 +89,14 @@ LIB_OBJ = lib/charcnv.o lib/charset.o lib/debug.o lib/fault.o \
           lib/getsmbpass.o lib/interface.o lib/kanji.o lib/md4.o \
           lib/membuffer.o lib/netmask.o lib/pidfile.o lib/replace.o \
           lib/signal.o lib/slprintf.o lib/system.o lib/time.o lib/ufc.o \
-          lib/util.o lib/genrand.o lib/username.o lib/access.o lib/smbrun.o \
-         lib/bitmap.o 
+          lib/genrand.o lib/username.o lib/access.o lib/smbrun.o \
+         lib/bitmap.o lib/crc32.o lib/snprintf.o \
+               lib/util_str.o lib/util_sid.o \
+               lib/util_unistr.o lib/util_file.o \
+               lib/util.o lib/util_sock.o
 
 UBIQX_OBJ = ubiqx/ubi_BinTree.o ubiqx/ubi_Cache.o ubiqx/ubi_SplayTree.o \
-            ubiqx/ubi_dLinkList.o ubiqx/ubi_sLinkList.o
+            ubiqx/ubi_dLinkList.o ubiqx/ubi_sLinkList.o ubiqx/debugparse.o
 
 PARAM_OBJ = param/loadparm.o param/params.o 
 
@@ -99,7 +104,7 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/namequery.o libsmb/nmblib.o \
              libsmb/nterr.o libsmb/smbdes.o libsmb/smbencrypt.o \
              libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o
 
-RPC_SERVER_OBJ = rpc_server/srv_ldap_helpers.o rpc_server/srv_lsa.o \
+RPC_SERVER_OBJ = rpc_server/srv_lsa.o \
                  rpc_server/srv_lsa_hnd.o rpc_server/srv_netlog.o \
                  rpc_server/srv_pipe_hnd.o rpc_server/srv_reg.o \
                  rpc_server/srv_samr.o rpc_server/srv_srvsvc.o \
@@ -109,7 +114,7 @@ RPC_PARSE_OBJ = rpc_parse/parse_lsa.o rpc_parse/parse_misc.o \
                 rpc_parse/parse_net.o rpc_parse/parse_prs.o \
                 rpc_parse/parse_reg.o rpc_parse/parse_rpc.o \
                 rpc_parse/parse_samr.o rpc_parse/parse_srv.o \
-                rpc_parse/parse_wks.o
+                rpc_parse/parse_wks.o rpc_parse/parse_sec.o
 
 RPC_CLIENT_OBJ = \
                rpc_client/cli_login.o    \
@@ -118,6 +123,7 @@ RPC_CLIENT_OBJ = \
                rpc_client/cli_lsarpc.o   \
                rpc_client/cli_wkssvc.o   \
                rpc_client/cli_srvsvc.o   \
+               rpc_client/cli_reg.o   \
                rpc_client/cli_samr.o 
 
 
@@ -131,7 +137,7 @@ SMBD_OBJ1 = smbd/server.o smbd/files.o smbd/chgpasswd.o smbd/connection.o \
             smbd/dfree.o smbd/dir.o smbd/password.o smbd/conn.o smbd/fileio.o \
             smbd/ipc.o smbd/mangle.o smbd/negprot.o \
             smbd/message.o smbd/nttrans.o smbd/pipes.o smbd/predict.o \
-            smbd/quotas.o smbd/reply.o smbd/ssl.o smbd/trans2.o smbd/uid.o \
+            smbd/$(QUOTAOBJS) smbd/reply.o smbd/ssl.o smbd/trans2.o smbd/uid.o \
            smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o smbd/blocking.o \
            smbd/process.o smbd/oplock.o smbd/service.o smbd/error.o
 
@@ -165,6 +171,9 @@ SWAT_OBJ = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \
 
 SMBRUN_OBJ = utils/smbrun.o
 
+SMBSH_OBJ = smbwrapper/smbsh.o smbwrapper/shared.o \
+            $(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
+
 MAKE_SMBCODEPAGE_OBJ = utils/make_smbcodepage.o $(PARAM_OBJ) \
                        $(UBIQX_OBJ) $(LIB_OBJ)
 
@@ -188,25 +197,19 @@ RPCCLIENT_OBJ = rpcclient/rpcclient.o \
              rpcclient/cmd_lsarpc.o \
              rpcclient/cmd_wkssvc.o \
              rpcclient/cmd_samr.o \
+             rpcclient/cmd_reg.o \
+             rpcclient/cmd_srvsvc.o \
+             rpcclient/cmd_netlogon.o \
              $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
              $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ)
-#             rpcclient/cmd_netlogon.o \
-#             rpcclient/cmd_srvsvc.o
-
-SMBWRAPPER_OBJ = smbwrapper/open.o smbwrapper/stat.o \
-               smbwrapper/smbw.o smbwrapper/fstat.o smbwrapper/read.o \
-               smbwrapper/lstat.o smbwrapper/close.o smbwrapper/getdents.o \
-               smbwrapper/fcntl.o smbwrapper/access.o smbwrapper/chdir.o \
-               smbwrapper/write.o smbwrapper/readlink.o smbwrapper/unlink.o \
-               smbwrapper/rename.o smbwrapper/utime.o smbwrapper/chown.o \
-               smbwrapper/chmod.o smbwrapper/lseek.o smbwrapper/getcwd.o \
-               smbwrapper/mkdir.o smbwrapper/rmdir.o smbwrapper/fchdir.o \
-               smbwrapper/opendir.o smbwrapper/readdir.o smbwrapper/telldir.o \
-               smbwrapper/seekdir.o smbwrapper/closedir.o \
+
+SMBWRAPPER_OBJ = smbwrapper/smbw.o smbwrapper/wrapped.o \
+               smbwrapper/smbw_dir.o smbwrapper/smbw_stat.o \
+               smbwrapper/realcalls.o smbwrapper/shared.o \
                $(LIBSMB_OBJ) $(PARAM_OBJ) \
                 $(UBIQX_OBJ) $(LIB_OBJ)
 
-CLIENT_OBJ = client/client.o client/clientutil.o client/clitar.o \
+CLIENT_OBJ = client/client.o client/clitar.o \
              $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
 
 MOUNT_OBJ = client/smbmount.o client/clientutil.o \
@@ -224,9 +227,23 @@ NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(UBIQX_OBJ) \
 SMBTORTURE_OBJ = utils/torture.o $(LIBSMB_OBJ) $(PARAM_OBJ) \
                  $(UBIQX_OBJ) $(LIB_OBJ)
 
-PROTO_OBJ = $(SMBD_OBJ) $(NMBD_OBJ) $(SWAT_OBJ) $(CLIENT_OBJ) $(RPCCLIENT_OBJ)
+RPCTORTURE_OBJ = utils/rpctorture.o \
+             rpcclient/display.o \
+             rpcclient/cmd_lsarpc.o \
+             rpcclient/cmd_wkssvc.o \
+             rpcclient/cmd_samr.o \
+             rpcclient/cmd_srvsvc.o \
+             rpcclient/cmd_netlogon.o \
+             $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
+             $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ)
+
+DEBUG2HTML_OBJ = utils/debug2html.o ubiqx/debugparse.o
 
-PICOBJS = $(SMBWRAPPER_OBJ:%.o=%.p)
+PROTO_OBJ = $(SMBD_OBJ) $(NMBD_OBJ) $(SWAT_OBJ) $(CLIENT_OBJ) \
+           $(RPCCLIENT_OBJ) $(SMBWRAPPER_OBJ)
+
+PICOBJS = $(SMBWRAPPER_OBJ:.o=.po)
+PICOBJS32 = $(SMBWRAPPER_OBJ:.o=.po32)
 
 ######################################################################
 # now the rules...
@@ -234,131 +251,166 @@ PICOBJS = $(SMBWRAPPER_OBJ:%.o=%.p)
 
 all : CHECK $(SPROGS) $(PROGS) 
 
+smbwrapper : CHECK bin/smbsh bin/smbwrapper.so @WRAP32@
+
+smbtorture : CHECK bin/smbtorture
+
+rpctorture : CHECK bin/rpctorture
+
+debug2html : CHECK bin/debug2html
+
 .SUFFIXES:
-.SUFFIXES: .c .o .h .p
+.SUFFIXES: .c .o .po .po32
 
 CHECK:
        @echo "Using FLAGS = $(FLAGS)"
        @echo "Using LIBS = $(LIBS)"
-       @(cd $(srcdir) && ls -1d */*.c && echo bin/.) | \
-        sed 's,/[^/]*$$,,;s,^$$,.,' | \
-        while read dir; do \
-          if test ! -d "$$dir"; then \
-            echo mkdir "$$dir" && mkdir "$$dir" || true; \
-          else true; fi; \
-        done
-
-.c.o: @MAINT@ .deps/.dummy obj-dirs
+
+MAKEDIR = || exec false; \
+         if test -d "$$dir"; then :; else \
+         echo mkdir "$$dir"; \
+         mkdir -p "$$dir" >/dev/null 2>&1 || \
+         test -d "$$dir" || \
+         mkdir "$$dir" || \
+         exec false; fi || exec false
+
+# the lines below containing `@MAINT@' are for atomatic dependency tracking
+# they will only work with GNU make, gcc and --enable-maintainer-mode
+# without --enable-maintainer-mode, they do nothing
+.c.o: @MAINT@ .deps/.dummy
+       @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
+        dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
+@MAINT@        @if (: >> .deps/$@ || : > .deps/$@) >/dev/null 2>&1; then :; \
+@MAINT@         else dir=.deps/`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` \
+@MAINT@              $(MAKEDIR); fi; rm -f .deps/$@ .deps/$@d
        @echo Compiling $*.c
-       @dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` && \
-          if test ! -d "$$dir"; then \
-            echo mkdir "$$dir" && mkdir "$$dir" || true; \
-          else true; fi
-       @$(CC) -I. -I$(srcdir) $(FLAGS) -c $< -o $@ \
-       @MAINT@ -Wp,-MD,.deps/`echo $* | sed s,/,_,g`.P && : >.deps/.stamp
-# the line above is for atomatic dependency tracking
-# it will only work with GNU make, gcc and --enable-maintainer-mode
-
-
-.c.p: @MAINT@ .deps/.dummy obj-dirs
-       @echo Compiling $*.c with -fpic
-       @dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` && \
-          if test ! -d "$$dir"; then \
-            echo mkdir "$$dir" && mkdir "$$dir" || true; \
-          else true; fi
-       @$(CC) -I. -I$(srcdir) $(FLAGS) -fpic -c $< -o $@ \
-       @MAINT@ -Wp,-MD,.deps/`echo $* | sed s,/,_,g`.P && : >.deps/.stamp
-
-MKDIR_BIN = if test ! -d bin; then echo mkdir bin && mkdir bin || true; else true; fi
-
-bin/smbd: $(SMBD_OBJ)
+       @$(CC) -I. -I$(srcdir) $(FLAGS) -c $< \
+         -o $@ @MAINT@ -Wp,-MD,.deps/$@ && \
+@MAINT@        sed 's|^'`echo $@ | sed 's,.*/,,'`':|$@:|' \
+@MAINT@          <.deps/$@ >.deps/$@d && \
+@MAINT@        rm -f .deps/$@ && : >.deps/.stamp
+
+.c.po: @MAINT@ .deps/.dummy
+       @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
+         dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
+@MAINT@        @if (: >> .deps/$@ || : > .deps/$@) >/dev/null 2>&1; then :; \
+@MAINT@         else dir=.deps/`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` \
+@MAINT@              $(MAKEDIR); fi; rm -f .deps/$@ .deps/$@d
+       @echo Compiling $*.c with @PICFLAG@
+       @$(CC) -I. -I$(srcdir) $(FLAGS) @PICFLAG@ -c $< \
+         -o $*.po.o @MAINT@ -Wp,-MD,.deps/$@ && \
+@MAINT@        sed 's|^'`echo $*\.po\.o | sed 's,.*/,,'`':|$@:|' \
+@MAINT@          <.deps/$@ >.deps/$@d && \
+@MAINT@        rm -f .deps/$@ && : >.deps/.stamp
+       @mv $*.po.o $@
+
+# this is for IRIX
+.c.po32: @MAINT@ .deps/.dummy
+       @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
+         dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
+@MAINT@        @if (: >> .deps/$@ || : > .deps/$@) >/dev/null 2>&1; then :; \
+@MAINT@         else dir=.deps/`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` \
+@MAINT@              $(MAKEDIR); fi; rm -f .deps/$@ .deps/$@d
+       @echo Compiling $*.c with @PICFLAG@ and -32
+       @$(CC) -32 -I. -I$(srcdir) $(FLAGS) @PICFLAG@ -c $< \
+         -o $*.po32.o @MAINT@ -Wp,-MD,.deps/$@ && \
+@MAINT@        sed 's|^'`echo $*.po32.o | sed 's,.*/,,'`':|$@:|' \
+@MAINT@          <.deps/$@ >.deps/$@d && \
+@MAINT@        rm -f .deps/$@ && : >.deps/.stamp
+       @mv $*.po32.o $@
+
+bin/.dummy:
+       @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
+         dir=bin $(MAKEDIR); fi
+       @: >> $@ || : > $@ # what a fancy emoticon!
+
+bin/smbd: $(SMBD_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS) 
 
-bin/nmbd: $(NMBD_OBJ)
+bin/nmbd: $(NMBD_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/swat: $(SWAT_OBJ)
+bin/swat: $(SWAT_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(LIBS) 
 
-bin/smbrun: $(SMBRUN_OBJ)
+bin/smbrun: $(SMBRUN_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(SMBRUN_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/rpcclient: $(RPCCLIENT_OBJ)
+bin/rpcclient: $(RPCCLIENT_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(RPCCLIENT_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/smbclient: $(CLIENT_OBJ)
+bin/smbclient: $(CLIENT_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/smbmount: $(MOUNT_OBJ)
+bin/smbmount: $(MOUNT_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(MOUNT_OBJ) $(LIBS)
 
-bin/smbmnt: $(MNT_OBJ)
+bin/smbmnt: $(MNT_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(MNT_OBJ) $(LIBS)
 
-bin/smbumount: $(UMOUNT_OBJ)
+bin/smbumount: $(UMOUNT_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(UMOUNT_OBJ) $(LIBS)
 
-bin/testparm: $(TESTPARM_OBJ)
+bin/testparm: $(TESTPARM_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/testprns: $(TESTPRNS_OBJ)
+bin/testprns: $(TESTPRNS_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(TESTPRNS_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/smbstatus: $(STATUS_OBJ)
+bin/smbstatus: $(STATUS_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/smbpasswd: $(SMBPASSWD_OBJ)
+bin/smbpasswd: $(SMBPASSWD_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/make_smbcodepage: $(MAKE_SMBCODEPAGE_OBJ)
+bin/make_smbcodepage: $(MAKE_SMBCODEPAGE_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(MAKE_SMBCODEPAGE_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/nmblookup: $(NMBLOOKUP_OBJ)
+bin/nmblookup: $(NMBLOOKUP_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/make_printerdef: $(MAKE_PRINTERDEF_OBJ)
+bin/make_printerdef: $(MAKE_PRINTERDEF_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(MAKE_PRINTERDEF_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/smbtorture: $(SMBTORTURE_OBJ)
+bin/smbtorture: $(SMBTORTURE_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(LIBS)
 
-smbwrapper/smbwrapper.so: $(PICOBJS)
+bin/rpctorture: $(RPCTORTURE_OBJ) bin/.dummy
+       @echo Linking $@
+       @$(CC) $(FLAGS) -o $@ $(RPCTORTURE_OBJ) $(LDFLAGS) $(LIBS)
+
+bin/debug2html: $(DEBUG2HTML_OBJ) bin/.dummy
        @echo Linking $@
-       @$(LD) -shared -o $@ $(PICOBJS)
+       @$(CC) $(FLAGS) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(LIBS)
+
+bin/smbwrapper.so: $(PICOBJS)
+       @echo Linking shared library $@
+       @$(LD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LIBS)
+
+bin/smbwrapper.32.so: $(PICOBJS32)
+       @echo Linking shared library $@
+       @$(LD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS)
+
+bin/smbsh: $(SMBSH_OBJ) bin/.dummy
+       @echo Linking $@
+       @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS)
 
 install: installbin installman installscripts installcp installswat
 
@@ -403,11 +455,11 @@ uninstallcp:
        @$(SHELL) $(srcdir)/script/uninstallcp.sh $(CODEPAGEDIR) $(CODEPAGELIST)
 
 clean: 
-       -rm -f core */*~ *~ */*.o */*.p
+       -rm -f core */*~ *~ */*.o */*.po */*.po32 */*.so
 
-proto:
+proto: 
        @echo rebuilding include/proto.h
-       @cd $(srcdir) && $(AWK) -f script/mkproto.awk `echo $(PROTO_OBJ) | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort -u | grep -v "ubiqx/"` > include/proto.h
+       @cd $(srcdir) && $(AWK) -f script/mkproto.awk `echo $(PROTO_OBJ) | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort -u | egrep -v 'ubiqx/|wrapped'` > include/proto.h
 
 etags:
        etags `find . -name "*.[ch]"`
@@ -416,13 +468,22 @@ ctags:
        ctags `find . -name "*.[ch]"`
 
 realclean: clean
-       -rm -f config.log $(PROGS) $(SPROGS)
+       -rm -f config.log $(PROGS) $(SPROGS) bin/.dummy
+       -rmdir bin
 
 distclean: realclean
        -rm -f include/config.h include/stamp-h Makefile
        -rm -f config.status config.cache
        -rm -rf .deps
 
+#
+# This target is for documenation updators. It regenerates
+# the man pages and HTML docs from the YODL source files.
+# In order for this target to work YODL must be installed
+# and working on your system. JRA.
+yodldocs:
+       @$(SHELL) $(srcdir)/script/makeyodldocs.sh $(srcdir)
+
 # this target is really just for my use. It only works on a limited
 # range of machines and is used to produce a list of potentially
 # dead (ie. unused) functions in the code. (tridge)
@@ -447,7 +508,7 @@ Makefile: $(srcdir)/Makefile.in config.status \
        CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
 # note that nothing depends on config.h, so will probably be rebuilt
-# only when explicitly requested
+# only when explicitly requested, unless dependency tracking is enabled
 include/config.h: include/stamp-h
        @:
 
@@ -464,13 +525,15 @@ $(srcdir)/include/stamp-h.in: @MAINT@ $(srcdir)/acconfig.h $(srcdir)/configure.i
 
 # automatic dependency tracking rules
 .deps/.dummy:
-       @-if test ! -d .deps; then rm -rf .deps; mkdir .deps; fi
-       @: >$@
+       @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
+         dir=.deps $(MAKEDIR); fi
+       @: >> $@ || : > $@ # what a fancy emoticon!
 
 .deps/.stamp: .deps/.dummy
        @:
 
-.deps/.P: .deps/.stamp
-       @-cat .deps/*.P >$@ 2>/dev/null
+.deps/depend: .deps/.stamp
+       @echo Updating dependencies
+       @: | cat `find .deps -type f -name \*d` >$@ 2>/dev/null || true
 
-@MAINT@-include .deps/.P
+@MAINT@-include .deps/depend