1 ###########################################################################
2 # Makefile.in for Samba - rewritten for autoconf support
3 # Copyright Andrew Tridgell 1992-1998
4 ###########################################################################
7 exec_prefix=@
exec_prefix@
26 # we don't use sbindir because we want full compatibility with
27 # the previous releases of Samba
30 VARDIR
= @localstatedir@
32 SAMBABOOK
= @sambabook@
34 # The permissions to give the executables
37 # set these to where to find various files
38 # These can be overridden by command line switches (see smbd(8))
39 # or in smb.conf (see smb.conf(5))
40 SMBLOGFILE
= $(VARDIR
)/smb
41 NMBLOGFILE
= $(VARDIR
)/nmb
42 CONFIGFILE
= $(LIBDIR
)/smb.conf
43 LMHOSTSFILE
= $(LIBDIR
)/lmhosts
44 DRIVERFILE
= $(LIBDIR
)/printers.def
45 PASSWD_PROGRAM
= /bin
/passwd
46 # This is where smbpasswd et al go
47 PRIVATEDIR
= @privatedir@
49 SMB_PASSWD_FILE
= $(PRIVATEDIR
)/smbpasswd
51 # This is where SWAT images and help files go
54 # the directory where lock files go
57 # The directory where code page definition files go
58 CODEPAGEDIR
= $(BASEDIR
)/share
60 # The current codepage definition list.
61 CODEPAGELIST
= 437 737 775 850 852 861 932 866 949 950 936 1251 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
63 # where you are going to have the smbrun binary. This defaults to the
64 # install directory. This binary is needed for correct printing
65 # and magic script execution. This should be an absolute path!
66 # Also not that this should include the name "smbrun" on the end (the
67 # name of the executable)
68 SMBRUN
= $(BINDIR
)/smbrun
71 PASSWD_FLAGS
= -DPASSWD_PROGRAM
=\"$(PASSWD_PROGRAM
)\" -DSMB_PASSWD_FILE
=\"$(SMB_PASSWD_FILE
)\"
72 FLAGS1
= $(CFLAGS
) -Iinclude
-I
$(srcdir)/include -I
$(srcdir)/ubiqx
-I
$(srcdir)/smbwrapper
$(CPPFLAGS
) -DSMBLOGFILE
=\"$(SMBLOGFILE
)\" -DNMBLOGFILE
=\"$(NMBLOGFILE
)\"
73 FLAGS2
= -DCONFIGFILE
=\"$(CONFIGFILE
)\" -DLMHOSTSFILE
=\"$(LMHOSTSFILE
)\"
74 FLAGS3
= -DSWATDIR
=\"$(SWATDIR
)\" -DSBINDIR
=\"$(SBINDIR
)\" -DLOCKDIR
=\"$(LOCKDIR
)\" -DSMBRUN
=\"$(SMBRUN
)\" -DCODEPAGEDIR
=\"$(CODEPAGEDIR
)\"
75 FLAGS4
= -DDRIVERFILE
=\"$(DRIVERFILE
)\" -DBINDIR
=\"$(BINDIR
)\"
76 FLAGS5
= $(FLAGS1
) $(FLAGS2
) $(FLAGS3
) $(FLAGS4
) -DHAVE_INCLUDES_H
77 FLAGS
= $(ISA
) $(FLAGS5
) $(PASSWD_FLAGS
)
78 FLAGS32
= $(ISA32
) $(FLAGS5
) $(PASSWD_FLAGS
)
80 SPROGS
= bin
/smbd bin
/nmbd bin
/swat
81 PROGS1
= bin
/smbclient bin
/smbspool bin
/testparm bin
/testprns bin
/smbstatus @RUNPROG@
82 PROGS2
= bin
/rpcclient bin
/smbpasswd bin
/make_smbcodepage bin
/make_unicodemap @WRAP@ @WRAP32@
84 PROGS
= $(PROGS1
) $(PROGS2
) $(MPROGS
) bin
/nmblookup bin
/make_printerdef
85 SHAREDPROGS
= bin
/smbd.shared bin
/nmbd.shared bin
/smbpasswd.shared bin
/smbmount.shared bin
/smbmnt.shared bin
/smbumount.shared bin
/libsmb.a
87 SCRIPTS
= $(srcdir)/script
/smbtar
$(srcdir)/script
/addtosmbpass
$(srcdir)/script
/convert_smbpasswd
91 ######################################################################
93 ######################################################################
95 LIB_OBJ
= lib
/charcnv.o lib
/charset.o lib
/debug.o lib
/fault.o \
96 lib
/getsmbpass.o lib
/interface.o lib
/kanji.o lib
/md4.o \
97 lib
/interfaces.o lib
/pidfile.o lib
/replace.o \
98 lib
/signal.o lib
/slprintf.o lib
/system.o lib
/doscalls.o lib
/time.o \
99 lib
/ufc.o lib
/genrand.o lib
/username.o lib
/access.o lib
/smbrun.o \
100 lib
/bitmap.o lib
/crc32.o lib
/snprintf.o \
101 lib
/util_str.o lib
/util_sid.o \
102 lib
/util_unistr.o lib
/util_file.o \
103 lib
/util.o lib
/util_sock.o lib
/util_sec.o smbd
/ssl.o lib
/fnmatch.o \
104 lib
/talloc.o lib
/hash.o
106 UBIQX_OBJ
= ubiqx
/ubi_BinTree.o ubiqx
/ubi_Cache.o ubiqx
/ubi_SplayTree.o \
107 ubiqx
/ubi_dLinkList.o ubiqx
/ubi_sLinkList.o ubiqx
/debugparse.o
109 PARAM_OBJ
= param
/loadparm.o param
/params.o
111 LIBSMB_OBJ
= libsmb
/clientgen.o libsmb
/namequery.o libsmb
/nmblib.o \
112 libsmb
/nterr.o libsmb
/smbdes.o libsmb
/smbencrypt.o \
113 libsmb
/smberr.o libsmb
/credentials.o libsmb
/pwd_cache.o \
116 RPC_SERVER_OBJ
= rpc_server
/srv_lsa.o \
117 rpc_server
/srv_lsa_hnd.o rpc_server
/srv_netlog.o \
118 rpc_server
/srv_pipe_hnd.o rpc_server
/srv_reg.o \
119 rpc_server
/srv_samr.o rpc_server
/srv_srvsvc.o \
120 rpc_server
/srv_util.o rpc_server
/srv_wkssvc.o \
121 rpc_server
/srv_pipe.o
123 RPC_PARSE_OBJ
= rpc_parse
/parse_lsa.o rpc_parse
/parse_misc.o \
124 rpc_parse
/parse_net.o rpc_parse
/parse_prs.o \
125 rpc_parse
/parse_reg.o rpc_parse
/parse_rpc.o \
126 rpc_parse
/parse_samr.o rpc_parse
/parse_srv.o \
127 rpc_parse
/parse_wks.o rpc_parse
/parse_sec.o
130 rpc_client
/cli_login.o \
131 rpc_client
/cli_netlogon.o \
132 rpc_client
/cli_pipe.o \
133 rpc_client
/cli_lsarpc.o \
134 rpc_client
/cli_wkssvc.o \
135 rpc_client
/cli_srvsvc.o \
136 rpc_client
/cli_reg.o \
137 rpc_client
/cli_samr.o
140 LOCKING_OBJ
= locking
/locking.o locking
/locking_shm.o locking
/locking_slow.o \
141 locking
/shmem.o locking
/shmem_sysv.o
143 PASSDB_OBJ
= passdb
/passdb.o passdb
/smbpassfile.o passdb
/smbpass.o \
144 passdb
/pass_check.o passdb
/ldap.o passdb
/nispass.o passdb
/smbpasschange.o
146 PROFILE_OBJ
= profile
/profile.o
148 SMBD_OBJ1
= smbd
/server.o smbd
/files.o smbd
/chgpasswd.o smbd
/connection.o \
149 smbd
/dfree.o smbd
/dir.o smbd
/password.o smbd
/conn.o smbd
/fileio.o \
150 smbd
/ipc.o smbd
/mangle.o smbd
/negprot.o \
151 smbd
/message.o smbd
/nttrans.o smbd
/pipes.o smbd
/predict.o \
152 smbd
/$(QUOTAOBJS
) smbd
/reply.o smbd
/trans2.o smbd
/uid.o \
153 smbd
/dosmode.o smbd
/filename.o smbd
/open.o smbd
/close.o smbd
/blocking.o \
154 smbd
/process.o smbd
/oplock.o smbd
/service.o smbd
/error.o
156 PRINTING_OBJ
= printing
/pcap.o printing
/print_svid.o printing
/printing.o \
157 printing
/print_cups.o
159 SMBD_OBJ
= $(SMBD_OBJ1
) $(PARAM_OBJ
) $(LIBSMB_OBJ
) $(UBIQX_OBJ
) \
160 $(RPC_SERVER_OBJ
) $(RPC_CLIENT_OBJ
) $(RPC_PARSE_OBJ
) \
161 $(LOCKING_OBJ
) $(PASSDB_OBJ
) $(PRINTING_OBJ
) $(PROFILE_OBJ
) $(LIB_OBJ
)
163 SMBDSHARED_OBJ
= $(SMBD_OBJ1
) $(RPC_SERVER_OBJ
) \
164 $(LOCKING_OBJ
) $(PROFILE_OBJ
) #$(PRINTING_OBJ)
166 NMBD_OBJ1
= nmbd
/asyncdns.o nmbd
/nmbd.o nmbd
/nmbd_become_dmb.o \
167 nmbd
/nmbd_become_lmb.o nmbd
/nmbd_browserdb.o \
168 nmbd
/nmbd_browsesync.o nmbd
/nmbd_elections.o \
169 nmbd
/nmbd_incomingdgrams.o nmbd
/nmbd_incomingrequests.o \
170 nmbd
/nmbd_lmhosts.o nmbd
/nmbd_logonnames.o nmbd
/nmbd_mynames.o \
171 nmbd
/nmbd_namelistdb.o nmbd
/nmbd_namequery.o \
172 nmbd
/nmbd_nameregister.o nmbd
/nmbd_namerelease.o \
173 nmbd
/nmbd_nodestatus.o nmbd
/nmbd_packets.o \
174 nmbd
/nmbd_processlogon.o nmbd
/nmbd_responserecordsdb.o \
175 nmbd
/nmbd_sendannounce.o nmbd
/nmbd_serverlistdb.o \
176 nmbd
/nmbd_subnetdb.o nmbd
/nmbd_winsproxy.o nmbd
/nmbd_winsserver.o \
177 nmbd
/nmbd_workgroupdb.o nmbd
/nmbd_synclists.o
179 NMBD_OBJ
= $(NMBD_OBJ1
) $(PARAM_OBJ
) $(LIBSMB_OBJ
) $(UBIQX_OBJ
) \
182 NMBDSHARED_OBJ
= $(NMBD_OBJ1
)
184 SWAT_OBJ
= web
/cgi.o web
/diagnose.o web
/startstop.o web
/statuspage.o \
185 web
/swat.o
$(LIBSMB_OBJ
) $(LOCKING_OBJ
) \
186 $(PARAM_OBJ
) $(PASSDB_OBJ
) $(RPC_CLIENT_OBJ
) $(RPC_PARSE_OBJ
) \
187 $(UBIQX_OBJ
) $(LIB_OBJ
) $(PRINTING_OBJ
)
189 SMBRUN_OBJ
= utils
/smbrun.o lib
/util_sec.o
191 SMBSH_OBJ
= smbwrapper
/smbsh.o smbwrapper
/shared.o \
192 $(PARAM_OBJ
) $(UBIQX_OBJ
) $(LIB_OBJ
)
194 MAKE_SMBCODEPAGE_OBJ
= utils
/make_smbcodepage.o
$(PARAM_OBJ
) \
195 $(UBIQX_OBJ
) $(LIB_OBJ
)
197 MAKE_UNICODEMAP_OBJ
= utils
/make_unicodemap.o
$(PARAM_OBJ
) \
198 $(UBIQX_OBJ
) $(LIB_OBJ
)
200 MAKE_PRINTERDEF_OBJ
= utils
/make_printerdef.o
$(PARAM_OBJ
) \
201 $(UBIQX_OBJ
) $(LIB_OBJ
)
203 STATUS_OBJ
= utils
/status.o
$(LOCKING_OBJ
) $(PARAM_OBJ
) \
204 $(UBIQX_OBJ
) $(PROFILE_OBJ
) $(LIB_OBJ
)
206 TESTPARM_OBJ
= utils
/testparm.o \
207 $(PARAM_OBJ
) $(UBIQX_OBJ
) $(LIB_OBJ
)
209 TESTPRNS_OBJ
= utils
/testprns.o
$(PARAM_OBJ
) $(PRINTING_OBJ
) $(UBIQX_OBJ
) \
212 SMBPASSWD_OBJ
= utils
/smbpasswd.o
$(PARAM_OBJ
) $(LIBSMB_OBJ
) $(PASSDB_OBJ
) \
213 $(UBIQX_OBJ
) $(RPC_CLIENT_OBJ
) $(RPC_PARSE_OBJ
) $(LIB_OBJ
)
215 SMBPASSWDSHARED_OBJ
= utils
/smbpasswd.o
217 RPCCLIENT_OBJ
= rpcclient
/rpcclient.o \
218 rpcclient
/display.o \
219 rpcclient
/cmd_lsarpc.o \
220 rpcclient
/cmd_wkssvc.o \
221 rpcclient
/cmd_samr.o \
222 rpcclient
/cmd_reg.o \
223 rpcclient
/cmd_srvsvc.o \
224 rpcclient
/cmd_netlogon.o \
225 $(PARAM_OBJ
) $(LIBSMB_OBJ
) $(UBIQX_OBJ
) $(LIB_OBJ
) \
226 $(RPC_CLIENT_OBJ
) $(RPC_PARSE_OBJ
) $(PASSDB_OBJ
)
228 SMBWRAPPER_OBJ
= smbwrapper
/smbw.o smbwrapper
/wrapped.o \
229 smbwrapper
/smbw_dir.o smbwrapper
/smbw_stat.o \
230 smbwrapper
/realcalls.o smbwrapper
/shared.o \
231 $(LIBSMB_OBJ
) $(PARAM_OBJ
) \
232 $(UBIQX_OBJ
) $(LIB_OBJ
)
234 CLIENT_OBJ
= client
/client.o client
/clitar.o \
235 $(PARAM_OBJ
) $(LIBSMB_OBJ
) $(UBIQX_OBJ
) $(LIB_OBJ
)
237 CUPS_OBJ
= client
/smbspool.o
$(PARAM_OBJ
) $(LIBSMB_OBJ
) $(UBIQX_OBJ
) $(LIB_OBJ
)
239 MOUNT_OBJ
= client
/smbmount.o \
240 $(PARAM_OBJ
) $(LIBSMB_OBJ
) $(UBIQX_OBJ
) $(LIB_OBJ
)
242 MOUNTSHARED_OBJ
= client
/smbmount.o
244 MNT_OBJ
= client
/smbmnt.o \
245 $(PARAM_OBJ
) $(LIBSMB_OBJ
) $(UBIQX_OBJ
) $(LIB_OBJ
)
247 MNTSHARED_OBJ
= client
/smbmnt.o
249 UMOUNT_OBJ
= client
/smbumount.o \
250 $(PARAM_OBJ
) $(LIBSMB_OBJ
) $(UBIQX_OBJ
) $(LIB_OBJ
)
252 UMOUNTSHARED_OBJ
= client
/smbumount.o
254 NMBLOOKUP_OBJ
= utils
/nmblookup.o
$(PARAM_OBJ
) $(UBIQX_OBJ
) \
255 $(LIBSMB_OBJ
) $(LIB_OBJ
)
257 SMBTORTURE_OBJ
= utils
/torture.o utils
/nbio.o
$(LIBSMB_OBJ
) $(PARAM_OBJ
) \
258 $(UBIQX_OBJ
) $(LIB_OBJ
)
260 MASKTEST_OBJ
= utils
/masktest.o
$(LIBSMB_OBJ
) $(PARAM_OBJ
) \
261 $(UBIQX_OBJ
) $(LIB_OBJ
)
263 RPCTORTURE_OBJ
= utils
/rpctorture.o \
264 rpcclient
/display.o \
265 rpcclient
/cmd_lsarpc.o \
266 rpcclient
/cmd_wkssvc.o \
267 rpcclient
/cmd_samr.o \
268 rpcclient
/cmd_srvsvc.o \
269 rpcclient
/cmd_netlogon.o \
270 $(PARAM_OBJ
) $(LIBSMB_OBJ
) $(UBIQX_OBJ
) $(LIB_OBJ
) \
271 $(RPC_CLIENT_OBJ
) $(RPC_PARSE_OBJ
) $(PASSDB_OBJ
)
273 DEBUG2HTML_OBJ
= utils
/debug2html.o ubiqx
/debugparse.o
275 SMBFILTER_OBJ
= utils
/smbfilter.o
$(LIBSMB_OBJ
) $(PARAM_OBJ
) \
276 $(UBIQX_OBJ
) $(LIB_OBJ
)
278 PROTO_OBJ
= $(SMBD_OBJ
) $(NMBD_OBJ
) $(SWAT_OBJ
) $(CLIENT_OBJ
) \
279 $(RPCCLIENT_OBJ
) $(SMBWRAPPER_OBJ
) $(SMBTORTURE_OBJ
)
281 LIBSMBSHARED_OBJ
= $(LIB_OBJ
) $(LIBSMB_OBJ
) $(PARAM_OBJ
) $(UBIQX_OBJ
) \
282 $(PASSDB_OBJ
) $(RPC_PARSE_OBJ
) #$(RPC_CLIENT_OBJ)
284 LIBSMB_PICOBJS
= $(LIBSMBSHARED_OBJ
:.o
=.po
)
286 PICOBJS
= $(SMBWRAPPER_OBJ
:.o
=.po
)
287 PICOBJS32
= $(SMBWRAPPER_OBJ
:.o
=.po32
)
289 ######################################################################
291 ######################################################################
293 all : CHECK
$(SPROGS
) $(PROGS
)
295 shared
: CHECK
$(SHAREDPROGS
)
297 smbwrapper
: CHECK bin
/smbsh bin
/smbwrapper.@SHLIBEXT@ @WRAP32@
299 smbtorture
: CHECK bin
/smbtorture
301 masktest
: CHECK bin
/masktest
303 rpctorture
: CHECK bin
/rpctorture
305 debug2html
: CHECK bin
/debug2html
307 smbfilter
: CHECK bin
/smbfilter
310 .SUFFIXES
: .c .o .po .po32
313 @echo
"Using FLAGS = $(FLAGS)"
314 @echo
"Using FLAGS32 = $(FLAGS32)"
315 @echo
"Using LIBS = $(LIBS)"
317 MAKEDIR
= || exec false
; \
318 if
test -d
"$$dir"; then
:; else \
319 echo mkdir
"$$dir"; \
320 mkdir
-p
"$$dir" >/dev
/null
2>&1 || \
323 exec false
; fi || exec false
325 # the lines below containing `@MAINT@' are for atomatic dependency tracking
326 # they will only work with GNU make, gcc and --enable-maintainer-mode
327 # without --enable-maintainer-mode, they do nothing
328 .c.o
: @MAINT@ .deps
/.dummy
329 @if
(: >> $@ ||
: > $@
) >/dev
/null
2>&1; then
rm -f
$@
; else \
330 dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR
); fi
331 @MAINT@ @if
(: >> .deps
/$@ ||
: > .deps
/$@
) >/dev
/null
2>&1; then
:; \
332 @MAINT@
else dir=.deps
/`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` \
333 @MAINT@
$(MAKEDIR
); fi
; rm -f .deps
/$@ .deps
/$@d
335 @
$(CC
) -I.
-I
$(srcdir) $(FLAGS
) -c
$< \
336 -o
$@ @MAINT@
-Wp
,-MD
,.deps
/$@
337 @BROKEN_CC@
-mv
`echo $@ | sed 's%^.*/%%g'` $@
338 @MAINT@ @sed
's|^'`echo $@ | sed 's,.*/,,'`':|$@:|' \
339 @MAINT@
<.deps
/$@
>.deps
/$@d
&& \
340 @MAINT@
rm -f .deps
/$@
&& : >.deps
/.stamp
342 .c.po
: @MAINT@ .deps
/.dummy
343 @if
(: >> $@ ||
: > $@
) >/dev
/null
2>&1; then
rm -f
$@
; else \
344 dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR
); fi
345 @MAINT@ @if
(: >> .deps
/$@ ||
: > .deps
/$@
) >/dev
/null
2>&1; then
:; \
346 @MAINT@
else dir=.deps
/`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` \
347 @MAINT@
$(MAKEDIR
); fi
; rm -f .deps
/$@ .deps
/$@d
348 @echo Compiling
$*.c with @PICFLAG@
349 @
$(CC
) -I.
-I
$(srcdir) $(FLAGS
) @PICFLAG@
-c
$< \
350 -o
$*.po.o @MAINT@
-Wp
,-MD
,.deps
/$@
351 @BROKEN_CC@
-mv
`echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@.o
352 @MAINT@ @sed
's|^'`echo $*\.po\.o | sed 's,.*/,,'`':|$@:|' \
353 @MAINT@
<.deps
/$@
>.deps
/$@d
&& \
354 @MAINT@
rm -f .deps
/$@
&& : >.deps
/.stamp
358 .c.po32
: @MAINT@ .deps
/.dummy
359 @if
(: >> $@ ||
: > $@
) >/dev
/null
2>&1; then
rm -f
$@
; else \
360 dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR
); fi
361 @MAINT@ @if
(: >> .deps
/$@ ||
: > .deps
/$@
) >/dev
/null
2>&1; then
:; \
362 @MAINT@
else dir=.deps
/`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` \
363 @MAINT@
$(MAKEDIR
); fi
; rm -f .deps
/$@ .deps
/$@d
364 @echo Compiling
$*.c with @PICFLAG@ and
-32
365 @
$(CC
) -32 -I.
-I
$(srcdir) $(FLAGS32
) @PICFLAG@
-c
$< \
366 -o
$*.po32.o @MAINT@
-Wp
,-MD
,.deps
/$@
367 @BROKEN_CC@
-mv
`echo $@ | sed -e 's%^.*/%%g' -e 's%\.po32$$%.o%'` $@.o
368 @MAINT@ @sed
's|^'`echo $*.po32.o | sed 's,.*/,,'`':|$@:|' \
369 @MAINT@
<.deps
/$@
>.deps
/$@d
&& \
370 @MAINT@
rm -f .deps
/$@
&& : >.deps
/.stamp
374 @if
(: >> $@ ||
: > $@
) >/dev
/null
2>&1; then
:; else \
375 dir=bin
$(MAKEDIR
); fi
376 @
: >> $@ ||
: > $@
# what a fancy emoticon!
378 bin
/smbd
: $(SMBD_OBJ
) bin
/.dummy
380 @
$(CC
) $(FLAGS
) -o
$@
$(SMBD_OBJ
) $(LDFLAGS
) $(LIBS
)
382 bin
/smbd.shared
: $(SMBDSHARED_OBJ
) bin
/libsmb.@SHLIBEXT@ bin
/.dummy
384 @
$(CC
) $(FLAGS
) -o
$@
$(SMBDSHARED_OBJ
) $(LDFLAGS
) $(LIBS
) -Lbin
-lsmb
386 bin
/nmbd
: $(NMBD_OBJ
) bin
/.dummy
388 @
$(CC
) $(FLAGS
) -o
$@
$(NMBD_OBJ
) $(LDFLAGS
) $(LIBS
)
390 bin
/nmbd.shared
: $(NMBDSHARED_OBJ
) bin
/libsmb.@SHLIBEXT@ bin
/.dummy
392 @
$(CC
) $(FLAGS
) -o
$@
$(NMBDSHARED_OBJ
) $(LDFLAGS
) $(LIBS
) -Lbin
-lsmb
394 bin
/swat
: $(SWAT_OBJ
) bin
/.dummy
396 @
$(CC
) $(FLAGS
) -o
$@
$(SWAT_OBJ
) $(LDFLAGS
) $(LIBS
)
398 bin
/smbrun
: $(SMBRUN_OBJ
) bin
/.dummy
400 @
$(CC
) $(FLAGS
) -o
$@
$(SMBRUN_OBJ
) $(LDFLAGS
) $(LIBS
)
402 bin
/rpcclient
: $(RPCCLIENT_OBJ
) bin
/.dummy
404 @
$(CC
) $(FLAGS
) -o
$@
$(RPCCLIENT_OBJ
) $(LDFLAGS
) $(LIBS
)
406 bin
/smbclient
: $(CLIENT_OBJ
) bin
/.dummy
408 @
$(CC
) $(FLAGS
) -o
$@
$(CLIENT_OBJ
) $(LDFLAGS
) $(LIBS
)
410 bin
/smbspool
: $(CUPS_OBJ
) bin
/.dummy
412 @
$(CC
) $(FLAGS
) -o
$@
$(CUPS_OBJ
) $(LDFLAGS
) $(LIBS
)
414 bin
/smbmount
: $(MOUNT_OBJ
) bin
/.dummy
416 @
$(CC
) $(FLAGS
) -o
$@
$(MOUNT_OBJ
) $(LIBS
)
418 bin
/smbmount.shared
: $(MOUNTSHARED_OBJ
) bin
/.dummy
420 @
$(CC
) $(FLAGS
) -o
$@
$(MOUNTSHARED_OBJ
) $(LDFLAGS
) $(LIBS
) -Lbin
-lsmb
422 bin
/smbmnt
: $(MNT_OBJ
) bin
/.dummy
424 @
$(CC
) $(FLAGS
) -o
$@
$(MNT_OBJ
) $(LIBS
)
426 bin
/smbmnt.shared
: $(MNTSHARED_OBJ
) bin
/.dummy
428 @
$(CC
) $(FLAGS
) -o
$@
$(MNTSHARED_OBJ
) $(LDFLAGS
) $(LIBS
) -Lbin
-lsmb
430 bin
/smbumount
: $(UMOUNT_OBJ
) bin
/.dummy
432 @
$(CC
) $(FLAGS
) -o
$@
$(UMOUNT_OBJ
) $(LIBS
)
434 bin
/smbumount.shared
: $(UMOUNTSHARED_OBJ
) bin
/.dummy
436 @
$(CC
) $(FLAGS
) -o
$@
$(UMOUNTSHARED_OBJ
) $(LDFLAGS
) $(LIBS
) -Lbin
-lsmb
438 bin
/testparm
: $(TESTPARM_OBJ
) bin
/.dummy
440 @
$(CC
) $(FLAGS
) -o
$@
$(TESTPARM_OBJ
) $(LDFLAGS
) $(LIBS
)
442 bin
/testprns
: $(TESTPRNS_OBJ
) bin
/.dummy
444 @
$(CC
) $(FLAGS
) -o
$@
$(TESTPRNS_OBJ
) $(LDFLAGS
) $(LIBS
)
446 bin
/smbstatus
: $(STATUS_OBJ
) bin
/.dummy
448 @
$(CC
) $(FLAGS
) -o
$@
$(STATUS_OBJ
) $(LDFLAGS
) $(LIBS
)
450 bin
/smbpasswd
: $(SMBPASSWD_OBJ
) bin
/.dummy
452 @
$(CC
) $(FLAGS
) -o
$@
$(SMBPASSWD_OBJ
) $(LDFLAGS
) $(LIBS
)
454 bin
/smbpasswd.shared
: $(SMBPASSWDSHARED_OBJ
) bin
/libsmb.@SHLIBEXT@ bin
/.dummy
456 @
$(CC
) $(FLAGS
) -o
$@
$(SMBPASSWDSHARED_OBJ
) $(LDFLAGS
) $(LIBS
) -Lbin
-lsmb
458 bin
/make_smbcodepage
: $(MAKE_SMBCODEPAGE_OBJ
) bin
/.dummy
460 @
$(CC
) $(FLAGS
) -o
$@
$(MAKE_SMBCODEPAGE_OBJ
) $(LDFLAGS
) $(LIBS
)
462 bin
/make_unicodemap
: $(MAKE_UNICODEMAP_OBJ
) bin
/.dummy
464 @
$(CC
) $(FLAGS
) -o
$@
$(MAKE_UNICODEMAP_OBJ
) $(LDFLAGS
) $(LIBS
)
466 bin
/nmblookup
: $(NMBLOOKUP_OBJ
) bin
/.dummy
468 @
$(CC
) $(FLAGS
) -o
$@
$(NMBLOOKUP_OBJ
) $(LDFLAGS
) $(LIBS
)
470 bin
/make_printerdef
: $(MAKE_PRINTERDEF_OBJ
) bin
/.dummy
472 @
$(CC
) $(FLAGS
) -o
$@
$(MAKE_PRINTERDEF_OBJ
) $(LDFLAGS
) $(LIBS
)
474 bin
/smbtorture
: $(SMBTORTURE_OBJ
) bin
/.dummy
476 @
$(CC
) $(FLAGS
) -o
$@
$(SMBTORTURE_OBJ
) $(LDFLAGS
) $(LIBS
)
478 bin
/masktest
: $(MASKTEST_OBJ
) bin
/.dummy
480 @
$(CC
) $(FLAGS
) -o
$@
$(MASKTEST_OBJ
) $(LDFLAGS
) $(LIBS
)
482 bin
/rpctorture
: $(RPCTORTURE_OBJ
) bin
/.dummy
484 @
$(CC
) $(FLAGS
) -o
$@
$(RPCTORTURE_OBJ
) $(LDFLAGS
) $(LIBS
)
486 bin
/debug2html
: $(DEBUG2HTML_OBJ
) bin
/.dummy
488 @
$(CC
) $(FLAGS
) -o
$@
$(DEBUG2HTML_OBJ
) $(LDFLAGS
) $(LIBS
)
490 bin
/smbfilter
: $(SMBFILTER_OBJ
) bin
/.dummy
492 @
$(CC
) $(FLAGS
) -o
$@
$(SMBFILTER_OBJ
) $(LDFLAGS
) $(LIBS
)
494 bin
/smbwrapper.@SHLIBEXT@
: $(PICOBJS
)
495 @echo Linking shared library
$@
496 @
$(LD
) @LDSHFLAGS@
-o
$@
$(PICOBJS
) $(LDFLAGS
) $(LIBS
)
498 bin
/smbwrapper
.32.@SHLIBEXT@
: $(PICOBJS32
)
499 @echo Linking shared library
$@
500 @
$(LD
) -32 @LDSHFLAGS@
-o
$@
$(PICOBJS32
) $(LDFLAGS
) $(LIBS
)
502 bin
/smbsh
: $(SMBSH_OBJ
) bin
/.dummy
504 @
$(CC
) $(FLAGS
) -o
$@
$(SMBSH_OBJ
) $(LDFLAGS
) $(LIBS
)
506 bin
/libsmb.@SHLIBEXT@
: $(LIBSMB_PICOBJS
) bin
/.dummy
507 @echo Linking shared library
$@
508 @
$(LD
) @LDSHFLAGS@
-o
$@
$(LIBSMB_PICOBJS
) $(LDFLAGS
) $(LIBS
)
510 bin
/libsmb.a
: $(LIBSMB_PICOBJS
) bin
/.dummy
511 @
$(AR
) cruv
$@
$(LIBSMB_PICOBJS
)
514 install: installbin installman installscripts installcp installswat
517 $(SHELL
) $(srcdir)/install-sh
-d
-m
$(INSTALLPERMS
) \
518 $(BASEDIR
) $(SBINDIR
) $(BINDIR
) $(LIBDIR
) $(VARDIR
) $(CODEPAGEDIR
)
520 installservers
: all installdirs
521 @
$(SHELL
) $(srcdir)/script
/installbin.sh
$(INSTALLPERMS
) $(BASEDIR
) $(SBINDIR
) $(LIBDIR
) $(VARDIR
) $(SPROGS
)
523 installbin
: all installdirs
524 @
$(SHELL
) $(srcdir)/script
/installbin.sh
$(INSTALLPERMS
) $(BASEDIR
) $(SBINDIR
) $(LIBDIR
) $(VARDIR
) $(SPROGS
)
525 @
$(SHELL
) $(srcdir)/script
/installbin.sh
$(INSTALLPERMS
) $(BASEDIR
) $(BINDIR
) $(LIBDIR
) $(VARDIR
) $(PROGS
)
527 installscripts
: installdirs
528 @
$(SHELL
) $(srcdir)/script
/installscripts.sh
$(INSTALLPERMS
) $(BINDIR
) $(SCRIPTS
)
530 installcp
: installdirs
531 @
$(SHELL
) $(srcdir)/script
/installcp.sh
$(srcdir) $(LIBDIR
) $(CODEPAGEDIR
) $(BINDIR
) $(CODEPAGELIST
)
533 installswat
: installdirs
534 @
$(SHELL
) $(srcdir)/script
/installswat.sh
$(SWATDIR
) $(srcdir) $(SAMBABOOK
)
536 # revert to the previously installed version
538 @
$(SHELL
) $(srcdir)/script
/revert.sh
$(SBINDIR
) $(SPROGS
)
539 @
$(SHELL
) $(srcdir)/script
/revert.sh
$(BINDIR
) $(PROGS
) $(SCRIPTS
)
542 @
$(SHELL
) $(srcdir)/script
/installman.sh
$(MANDIR
) $(srcdir) "@ROFF@"
544 uninstall: uninstallman uninstallbin uninstallscripts uninstallcp
547 @
$(SHELL
) $(srcdir)/script
/uninstallman.sh
$(MANDIR
) $(srcdir)
550 @
$(SHELL
) $(srcdir)/script
/uninstallbin.sh
$(INSTALLPERMS
) $(BASEDIR
) $(SBINDIR
) $(LIBDIR
) $(VARDIR
) $(SPROGS
)
551 @
$(SHELL
) $(srcdir)/script
/uninstallbin.sh
$(INSTALLPERMS
) $(BASEDIR
) $(BINDIR
) $(LIBDIR
) $(VARDIR
) $(PROGS
)
554 @
$(SHELL
) $(srcdir)/script
/uninstallscripts.sh
$(INSTALLPERMS
) $(BINDIR
) $(SCRIPTS
)
557 @
$(SHELL
) $(srcdir)/script
/uninstallcp.sh
$(CODEPAGEDIR
) $(CODEPAGELIST
)
560 -rm -f core
*/*~
*~
*/*.o
*/*.po
*/*.po32
*/*.@SHLIBEXT@ bin
/*.a
563 @echo rebuilding
include/proto.h
564 @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
567 etags
`find . -name "*.[ch]" | grep -v /CVS/`
570 ctags
`find . -name "*.[ch]" | grep -v /CVS/`
573 -rm -f config.log
$(PROGS
) $(SPROGS
) $(SHAREDPROGS
) bin
/.dummy
577 -rm -f
include/config.h
include/stamp-h Makefile
578 -rm -f config.status config.cache so_locations
582 # This target is for documenation updators. It regenerates
583 # the man pages and HTML docs from the YODL source files.
584 # In order for this target to work YODL must be installed
585 # and working on your system. JRA.
587 @
$(SHELL
) $(srcdir)/script
/makeyodldocs.sh
$(srcdir)
589 # this target is really just for my use. It only works on a limited
590 # range of machines and is used to produce a list of potentially
591 # dead (ie. unused) functions in the code. (tridge)
593 nm
*/*.o |grep
'U ' | awk
'{print $$2}' |
sort -u
> nmused.txt
594 nm
*/*.o |grep
'T ' | awk
'{print $$3}' |
sort -u
> nmfns.txt
595 comm
-13 nmused.txt nmfns.txt
597 # Rules for maintainers (--enable-maintainer-mode)
599 AUTOHEADER
=@AUTOHEADER@
601 # when configure.in is updated, reconfigure
602 $(srcdir)/configure
: @MAINT@
$(srcdir)/configure.in
$(srcdir)/aclocal.m4
603 cd
$(srcdir) && $(AUTOCONF
)
605 config.status
: $(srcdir)/configure
606 $(SHELL
) .
/config.status
--recheck
608 Makefile
: $(srcdir)/Makefile.in config.status \
609 include/stamp-h
# just to ensure that config.h is up-to-date
610 CONFIG_FILES
=$@ CONFIG_HEADERS
= $(SHELL
) .
/config.status
612 # note that nothing depends on config.h, so will probably be rebuilt
613 # only when explicitly requested, unless dependency tracking is enabled
614 include/config.h
: include/stamp-h
617 include/stamp-h
: $(srcdir)/include/config.h.in config.status
618 CONFIG_FILES
= CONFIG_HEADERS
=include/config.h
$(SHELL
) .
/config.status
619 @echo
> include/stamp-h
621 $(srcdir)/include/config.h.in
: $(srcdir)/include/stamp-h.in
624 $(srcdir)/include/stamp-h.in
: @MAINT@
$(srcdir)/acconfig.h
$(srcdir)/configure.in
625 cd
$(srcdir) && $(AUTOHEADER
)
628 # automatic dependency tracking rules
630 @if
(: >> $@ ||
: > $@
) >/dev
/null
2>&1; then
:; else \
631 dir=.deps
$(MAKEDIR
); fi
632 @
: >> $@ ||
: > $@
# what a fancy emoticon!
634 .deps
/.stamp
: .deps
/.dummy
637 .deps
/depend
: .deps
/.stamp
638 @echo Updating dependencies
639 @
: | cat
`find .deps -type f -name \*d` >$@
2>/dev
/null || true
641 @MAINT@
-include .deps
/depend