1 ###########################################################################
2 # Makefile for Samba SMB client/server for unix
3 # Copyright Andrew Tridgell 1992-1996
4 ###########################################################################
6 # The base manpages directory to put the man pages in
7 # Note: $(MANDIR)/man1, $(MANDIR)/man5 and $(MANDIR)/man8 must exist.
10 # The directories to put things in. If you use multiple
11 # architectures or share the samba binaries across NFS then
12 # you will probably want to change this layout.
14 BINDIR = $(BASEDIR)/bin
15 SBINDIR = $(BASEDIR)/sbin
19 # The permissions to give the executables
22 # Add any optimisation or debugging flags here
23 # add -DSYSLOG for syslog support
24 # RPM_OPT_FLAGS is needed when building an RPM distribution package
26 FLAGS1 = $(RPM_OPT_FLAGS)
30 # You will need to use a ANSI C compiler. This means under SunOS 4 you can't
31 # use cc, instead you will have to use gcc.
34 # This may help with some versions of make
37 # The following can be useful for compiling on multiple architectures
38 # just uncommment them putting the right directory in.
42 # set these to where to find various files
43 # These can be overridden by command line switches (see smbd(8))
44 # or in smb.conf (see smb.conf(5))
45 SMBLOGFILE = $(VARDIR)/log/log.smb
46 NMBLOGFILE = $(VARDIR)/log/log.nmb
47 CONFIGFILE = $(LIBDIR)/smb.conf
48 LMHOSTSFILE = $(LIBDIR)/lmhosts
50 # the directory where lock files go
51 LOCKDIR = $(VARDIR)/lock/samba
53 # set this to the default group you want your machine to appear in
54 # for browsing. This can also be set in nmbd (see nmbd(8))
57 # set this to the name of the default account, which is the one
58 # to use when no username or password is specified. This can be overridden
59 # in the runtime configuration file (see smb.conf(5))
60 # NOTE: The account "nobody" may not be a good one as
61 # on many unixes it may not be able to print. Thus you
62 # might have to create a separate guest account that can print.
65 # where you are going to have the smbrun binary. This defaults to the
66 # install directory. This binary is needed for correct printing
67 # and magic script execution. This should be an absolute path!
68 # Also not that this should include the name "smbrun" on the end (the
69 # name of the executable)
70 SMBRUN = $(BINDIR)/smbrun
72 # This is for PAM authentication. RedHat Linux uses PAM.
73 # If you use PAM, then uncomment the following lines:
77 # This is for AFS authentication. If you use AFS then set AFS_BASE
78 # according to your system layout, and uncomment the other lines as well.
79 # AFS_BASE = /usr/afsws
80 # AFS_FLAGS = -DAFS_AUTH -I$(AFS_BASE)/include
81 # AFS_LIBDIR = $(AFS_BASE)/lib
82 # NOTE: You may need to add -laudit in the line below
83 # AFS_LIBS = -L$(AFS_LIBDIR) -L$(AFS_LIBDIR)/afs -lkauth -lprot -lubik \
84 # -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err \
85 # $(AFS_LIBDIR)/afs/util.a
87 # This is for DCE/DFS enablement. Uncomment this so that smbd can
88 # operate as an authenticated user identity to operate on files that
89 # live in the DCE Distributed Filesystem.
90 # DCE_BASE = /opt/dcelocal
91 # DCE_FLAGS = -I$(DCE_BASE)/include
92 # DCE_LIBDIR = -L$(DCE_BASE)/lib
95 # This is for SMB encrypted (lanman) passwords.
96 # you may wish to add -DREPLACE_GETPASS if your getpass() is limited
98 # DES_BASE=/usr/local/libdes
99 # DES_FLAGS= -I$(DES_BASE)
100 # DES_LIB= -L$(DES_BASE) -ldes
101 # PASSWD_FLAGS=-DUSE_LIBDES -DSMB_PASSWD=\"$(BINDIR)/smbpasswd\" -DSMB_PASSWD_FILE=\"$(BASEDIR)/private/smbpasswd\"
103 ######################################
106 # uncomment the following two lines to enable VTP-Support
107 #VTP_FLAGS = -DWITH_VTP
109 ######################################
111 ######################################
112 # WHICH AWK? awk is used for automatic prototype generation. GNU awk works
113 # where inferior awks don't. Sun is one manufacturer who supplies both
114 # a broken awk called 'awk' and a fixed one called 'nawk'. mkproto.awk will
115 # only work with the latter, and even that isn't as good as free GNU awk.
117 # Leave this uncommented; the OS-specific stuff will override it if required
119 ######################################
121 #####################################
122 # WHICH OPERATING SYSTEM?
123 # UNCOMMENT ONE OF THE SECTIONS BELOW
124 # MAKE SURE ONLY *ONE* IS UNCOMMENTED
126 # The following are additional flags that may apply
127 # -DNETGROUP if your machine supports yp netgroups
128 # -DSHADOW_PWD if you are using shadow passwords
129 # -DGETPWANAM if you wish to use getpwanam() call
130 # -DPWDAUTH if you have and want to use the pwdauth() call
131 # -DUFC_CRYPT if you want the fast crypt routine
132 # -DALLOW_CHANGE_PASSWORD if you want users to be able to set their password
133 # remotely (only works on some systems)
134 # -DQUOTAS for quota support in disk_free(). This probably only works
136 # -DFAST_SHARE_MODES=1 if you want the fast shared memory instead of the
137 # slow description files for share mode locking. This
138 # requires the mmap() and lockf() system calls.
140 # NOTE: GETPWANAM & PWDAUTH are mutually exclusive, if you
141 # Define one, you should NOT define the other.
142 #####################################
144 #####################################
145 # for the JAPANESE EXTENSION
146 # select filename's code set for KANJI/KANA in UNIX,
147 # apply the following flag
149 # <code> is select character code set for JAPAN.
150 # sjis: if your machine support SJIS
151 # euc: if your machine support EUC
152 # jis7: if your machine support JIS7
153 # jis8: if your machine support JIS8
154 # junet: if your machine support jis7 + junet rule
155 # hex: if your machine only support 7 bits ascii filename only
156 # convert to hexdecimal code preseeding ':'.
157 # see also README.jis
158 ######################################
161 # This is for SUNOS 4. Use the SUNOS5 entry for Solaris 2.
162 # Note that you cannot use Suns "cc" compiler
163 # as it's not an Ansi-C compiler. Get gcc or acc.
164 # Note that if you have adjunct passwords you may need the GETPWANAM
165 # or PWDAUTH option. There have been reports that using PWDAUTH may crash
166 # your pwdauthd server so GETPWANAM is preferable (and probably faster)
167 # contributed by Andrew.Tridgell@anu.edu.au
172 # Use this for Linux with shadow passwords
173 # contributed by Andrew.Tridgell@anu.edu.au
174 # add -DLINUX_BIGCRYPT is you have shadow passwords but don't have the
175 # right libraries and includes
176 # FLAGSM = -DLINUX -DSHADOW_PWD
179 # Use this for Linux without shadow passwords
180 # contributed by Andrew.Tridgell@anu.edu.au
181 # AXPROC defines DEC Alpha Processor
182 # FLAGSM = -DLINUX -DAXPROC
186 # Use this for Linux with quotas and without shadow passwords
187 # contributed by Andrew.Tridgell@anu.edu.au
188 # AXPROC defines DEC Alpha Processor
189 # FLAGSM = -DLINUX -DAXPROC -DQUOTAS
190 # FLAGSM = -DLINUX -DQUOTAS
193 # Use this for Linux with quota and glibc2
194 # contributed by xeno@mix.hive.no
195 # Tested on the 2.0.30 kernel and ext2fs filesystem.
196 # FLAGSM = -DLINUX -DQUOTAS -DNO_ASMSIGNALH -DGLIBC2
197 # LIBSM = -L/lib/libc5-compat -lcrypt
199 # This is for SUNOS5.4 and later (also known as Solaris 2.4 and later)
200 # contributed by Andrew.Tridgell@anu.edu.au
201 # FLAGSM = -DSUNOS5 -DSHADOW_PWD -DNETGROUP
202 # LIBSM = -lsocket -lnsl
205 # This is for SUNOS 5.2 and 5.3 (also known as Solaris 2.2 and 2.3)
206 # contributed by hdsi@newtech.net
207 # FLAGSM = -DSUNOS5 -DSHADOW_PWD -DNETGROUP -DNO_STRFTIME
208 # LIBSM = -lsocket -lnsl
212 # contributed by dsfrost@oai6.yk.fujitsu.co.jp
213 # FLAGSM = -DSVR4 -DSHADOW_PWD
214 # LIBSM = -lsocket -lnsl
217 # Contributed by mark@scot1.ucsalf.ac.uk
218 # FLAGSM = -DSVR4 -DSHADOW_PWD -DALLOW_CHANGE_PASSWORD
219 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
222 # This is for the Motorola 88xxx/9xx range of machines
223 # Contributed by RPE@monnet.com
224 # FLAGSM = -DSVR4 -DSHADOW_PWD -DGETTIMEOFDAY1
225 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
228 # This is for UNIXWARE
229 # FLAGSM = -Xa -DSVR4 -DSHADOW_PWD
230 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
233 # This is for ULTRIX. Add -DULTRIX_AUTH for Ultrix enhanced security.
234 # contributed by iversen@dsfys1.fi.uib.no
239 # This is for OSF1 (Alpha)
240 # contributed by errath@balu.kfunigraz.ac.at
241 # NOTE: You may need -warning_unresolved if you get unresolved symbols
245 # This is for OSF1 with DCE/DFS
246 # contributed by Jim Doyle <doyle@oec.com>
247 # FLAGSM = -DOSF1 -DDFS_AUTH -DSIGCLD_IGNORE -DNO_SIGNAL_TEST
248 # LIBSM = -ldce -lpthreads -lmach -lc_r
250 # This is for OSF1 (Alpha) with NIS and Fast Crypt
251 # contributed by David Gardiner <dgardine@cssip.edu.au>
252 # FLAGSM = -DOSF1 -DNETGROUP -DUFC_CRYPT
256 # This is for OSF1 (Alpha) V2.0 Enhanced Security
257 # contributed by Udo Linauer <ul@eacpc4.tuwien.ac.at>
258 # FLAGSM = -DOSF1 -DOSF1_ENH_SEC
263 # contributed by tomc@osi.curtin.edu.au
267 # This is for AIX 3.2.5 with DCE/DFS
268 # contributed by Jim Doyle <doyle@oec.com>
269 # FLAGSM = -DAIX -DDFS_AUTH -DSIGCLD_IGNORE -DNO_SIGNAL_TEST
270 # LIBSM = -lc_r -ldce -lpthreads
274 # contributed by tomh@metrics.com
275 # versions of BSDI prior to 2.0 may need to add -DUSE_F_FSIZE for
276 # disk usage stats to be correct
281 # This is for NetBSD. Add -DNETBSD_1_0 if you are using 1.0
282 # contributed by noses@oink.rhein.de
283 # FLAGSM = -DNETBSD -DSHADOW_PWD
287 # This is for SEQUENT.
288 # Contributed by fwk@ix.netcom.com (Frank Keeney) and
289 # rpwillia@Pentagon-EMH6.army.mil (Ray Williams)
290 # tested on DYNIX/ptx(R) V2.1.0
291 # FLAGSM = -DSEQUENT -DSHADOW_PWD -DHAVE_TIMEZONE
292 # LIBSM = -lrpc -lsocket -lPW -linet -lnsl -lseq -lsec
295 # This is for SEQUENT PTX 4.1.x
296 # Contributed by bressler@iftccu.ca.boeing.com (Rick Bressler)
297 # based on Keeny and Williams contribution.
298 # tested on DYNIX/ptx(R) V4.1.3
299 # FLAGSM = -DSEQUENT -DSHADOW_PWD -DHAVE_TIMEZONE -DPTX4
300 # LIBSM = -lrpc -lsocket -lPW -lnsl -lseq -lsec
303 # This is for HP-UX. Note that some systems don't like the -Aa switch.
304 # contributed by Pasi.Kaara@atk.tpo.fi
305 # You will need -DREPLACE_GETPASS if you use smb encryption
306 # FLAGSM = -DHPUX -Aa -D_HPUX_SOURCE -D_POSIX_SOURCE
309 # This is for HP-UX with DCE/DFS
310 # contributed by Jim Doyle <doyle@oec.com>
311 # FLAGSM = -DHPUX -Aa -D_HPUX_SOURCE -D_POSIX_SOURCE -DDFS_AUTH -D_REENTRANT -I/usr/include/reentrant
312 # LIBSM = -ldce -lM -lc_r
314 # HP-UX 10.x Trusted System
315 # Contributed by David-Michael Lincke (dlincke@sgcl1.unisg.ch)
316 # FLAGSM = +O3 -Ae -DHPUX -DHPUX_10_TRUSTED
321 # contributed by lpc@solomon.technet.sg (Michael Chua)
322 # FOR SGI IRIX 4.x.x, use the following line
323 # FLAGSM = -DSGI -DHAVE_TIMEZONE
326 # FOR SGI IRIX 5.x.x, use this line instead
327 # FLAGSM = -DSGI5 -DSHADOW_PWD -DHAVE_TIMEZONE
331 # This is for FreeBSD
332 # contributed by kuku@acds.physik.rwth-aachen.de
333 # NOTE: You may need to add -DBSD44 if you have password problems
338 # This is for NEXTSTEP Release 2.X
340 # contributed by brad@cac.washington.edu (Brad Greer)
344 # This is for NEXTSTEP Release 3.0 and greater (including OPENSTEP for Mach).
345 # contributed by brad@cac.washington.edu (Brad Greer)
346 # additional configuration by pmarcos@next.com (Paul Marcos)
347 # For compiling n-way fat executables, you should append the appropriat -arch
348 # flags to the FLAGSM variable. Valid flags are:
353 # To compile 4-way fat, you would append
354 # -arch m68k -arch i386 -arch hppa -arch sparc
359 # NOTE: ISC is also known as "INTERACTIVE"
360 # This is for Sunsoft ISC SVR3V4 running in POSIX mode
361 # contributed by pim@cti-software.nl (Pim Zandbergen)
362 # FLAGSM = -posix -D_SYSV3 -DISC -DSHADOW_PWD
363 # LIBSM = -lsec -lcrypt -linet
365 # This is for Sunsoft ISC SVR3V4 running in iBCS2 mode
366 # contributed by pim@cti-software.nl (Pim Zandbergen)
367 # FLAGSM = -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_SYSV3\
368 # -DISC -DSHADOW_PWD -DREPLACE_GETWD -DREPLACE_RENAME
369 # LIBSM = -lsec -lcrypt -linet -lcposix
372 # This is for A/UX 3.0
373 # Contributed by root@dolphin.csudh.edu (Jon S. Stevens)
377 # This is for Altos Series 386/1000
378 # Contributed by cal@zls.com
379 # FLAGSM = -DALTOS -DHAS_RDCHK
380 # LIBSM = -lsocket -lxenix
383 #Note: The SCO entries require the libcrypt library. You can get it via
384 #anonymous ftp from ftp.sco.com:/SLS/lng225b.* or ftp.uu.net:/vendors/sco
386 # Use this for SCO with shadow passwords. Tested on "Open enterprise 3.0"
387 # SCO changes from Heinz Mauelshagen (mauelsha@ez.da.telekom.de)
388 # FLAGSM = -DSCO -DSHADOW_PWD -DNETGROUP
389 # LIBSM = -lyp -lrpc -lyp -lsec -lsocket -lcrypt_i -lintl
391 # Use this for SCO with shadow passwords, without YP.
392 # Tested on "Open Enterprise Server 3.0" (John Owens john@micros.com)
393 # Also, use "CC = cc" above.
394 # FLAGSM = -DSCO -DSHADOW_PWD
395 # LIBSM = -lsec -lsocket -lcrypt_i
397 # Use this for SCO with TCB passwords (default).
398 # Tested on "Open enterprise 3.0". Contributed by lance@fox.com.
400 # FLAGSM = -DSCO -DSecureWare
401 # LIBSM = -lprot_s -lcrypt -lsocket -lm -lc_s
403 # Use this for SCO Unix 3.2v2 (ODT 1.1) with TCB passwords (default).
404 # Contributed by Stephen.Rothwell@pd.necisa.oz.au
405 # N.B. this needs gcc
406 # FLAGSM = -DSCO -DSecureWare -DSCO3_2_2
407 # LIBSM = -lprot -lcrypt_i -lsocket -lm -lintl
409 # This is for the european distribution of SCO.
410 # Contributed by Urmet.Janes@gwhite.goodwin.ee
411 # FLAGSM = -DSCO -DSHADOW_PWD
412 # LIBSM = -lsec -lsocket /usr/lib/libcrypt_i.a -lintl
414 # Use this for SCO OpenServer 5 with TCB passwords (default).
415 # contributed by Scott Michel <scottm@intime.intime.com>
416 # you may also like to add the -dy switch (recommended by Marnus van
417 # Niekerk, mvn@pixie.co.za)
419 # FLAGSM = -DSCO -DSecureWare -DEVEREST -DUSE_MMAP
420 # LIBSM = -lprot -lcurses -lcrypt -lsocket -lPW -lm -lx -lc_s -lc
423 # This is for intergraph.
424 # contributed by cjkiick@flinx.b11.ingr.com
425 # modified by ttj@sknsws61.sjo.statkart.no
426 # FLAGSM = -DCLIX -D_INGR_EXTENSIONS=1
427 # LIBSM = -lbsd -lc_s
430 # Contributed by ross@augie.insci.com (Ross Andrus)
434 # This is for Apollo Domain/OS sr10.3 (systype = BSD4.3)
435 # Added 1994-07-08 Stephen C. Steel <steve@qv3donald.LeidenUniv.nl>
436 # additional patches by jmi@csd.cri.dk (John Mills)
437 # you may need the "-A ansi" switch to cc
438 # FLAGSM = -DAPOLLO -D_INCLUDE_BSD_SOURCE -D_INCLUDE_XOPEN_SOURCE
443 # contributed by Jim Barry <jim@ilp.com> and
444 # Charles Gay-Jones <charlie@ilp.com>
445 # FLAGSM = -DRiscIX -DNOSTRDUP
449 # This is for System V with some berkely extensions (Motorola 88k R32V3.2).
450 # contributed by tonyb@plaza.ds.adp.com (Tony D. Birnseth)
452 # LIBSM = -lgen -lbsd -lnsl
456 # contributed by Peter Olsson <pol@leissner.se>
457 # NOTE: You may need an updated libc.a from your vendor as older
458 # versions have broken mktime calls and no initgroups() call
459 # NOTE2: You may need -lpasswd if you use shadow passwords
460 # NOTE3: Please read the file DNIX.txt in the docs directory. It
461 # contains important information about uid handling under DNIX, you may
462 # need to patch your C library.
463 # FLAGSM = -DDNIX -I/usr/include/bsd
467 # This is for Cray, Unicos 8.0
468 # contributed by velo@sesun3.epfl.ch (Martin Ouwehand)
469 # FLAGSM = -DCRAY -U__STDC__ -DQUOTAS
473 # contributed by Victor Balashov <balashov@cv.jinr.dubna.su>
474 # and Ulrich Hahn <ulrich.hahn@zdv.uni-tuebingen.de>
475 # FLAGSM= -DCONVEX -DSHADOW_PWD
478 # This is for SMP_DC.OSx v1.1-94c079 on Pyramid S series
479 # contributed by jeffrey@itm.org
480 # FLAGSM = -DSOLARIS -DSHADOW_PWD -DBSD_COMP
481 # LIBSM = -lsocket -lnsl
483 # This is for QNX 4.22
484 # Contributed by eldo@invisa.satlink.net (Eldo Loguzzo)
485 # FLAGSM = -DQNX -DGUEST_SESSSETUP=1
489 # This is for SONY NEWS, NEWS-OS 4.2.x
490 # contributed by sky@sm.sony.co.jp (Katushi Sato)
491 # FLAGSM = -DNEWS42 -DKANJI=\"sjis\"
495 # This is for SONY NEWS, NEWS-OS 6.1.x
496 # contributed by kobo@sm.sony.co.jp (Yoichi Kobori)
497 # FLAGSM = -Xa -DSVR4 -DNEWS61 -DSHADOW_PWD -DNETGROUP -DGETTIMEOFDAY1 -DKANJI=\"euc\"\ -D_SONYILS_H
498 # LIBSM = -lsocket -lnsl
501 # This is for OS/2 using EMX 0.9b
502 # Contributed by jasonr@pec.co.nz (Jason Rumney)
504 # LIBSM = -Zexe -lsocket
507 # This is for LYNX 2.3.0 (gcc v2.6)
508 # Contributed by woelfel@hpe.fzk.de (Manfred Woelfel)
509 # FLAGSM = -DLYNX -DUFC_CRYPT -mposix
513 # This is for MachTen (a unix like system for Macintoshes)
514 # contributed by Trevor Strohman (trev@figment.tenon.com)
520 # contributed by John Agnew <johna@bfs.Unibol.COM>
521 # FLAGSM = -systype svr4 -std -DSVR4
522 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
525 # This is for B.O.S. (Bull Operating System)
526 # Contributed by koine@fileita.it
527 # FLAGSM = -DBOS -DNO_RESOURCEH -DUSE_WAITPID
531 # This for Amiga using GCC and ixemul.library 43.0 or later.
532 # contributed by Rask Ingemann Lambertsen <rask@k4315.kampsax.dtu.dk>
533 # The binaries will support both AmiTCP and AS225R2 compatible
534 # protocol stacks because of the use of ixnet.library.
535 # Other protocol stacks will be supported automatically if
536 # support for them is added to ixnet.library.
537 # The binaries will have automatic stack extension :-)
538 # smbd must be run from inetd :-(
539 # FLAGSM = -DAMIGA -Dfork=vfork -mstackextend
544 ######################################################################
545 # DON'T EDIT BELOW THIS LINE
546 ######################################################################
548 CFLAGS1 = $(FLAGS1) -DSMBLOGFILE=\"$(SMBLOGFILE)\" -DNMBLOGFILE=\"$(NMBLOGFILE)\"
549 CFLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
550 CFLAGS3 = -DLOCKDIR=\"$(LOCKDIR)\" -DSMBRUN=\"$(SMBRUN)\"
551 CFLAGS4 = -DWORKGROUP=\"$(WORKGROUP)\" -DGUEST_ACCOUNT=\"$(GUESTACCOUNT)\"
552 CFLAGS5 = $(CFLAGS1) $(CFLAGS2) $(CFLAGS3) $(CFLAGS4) $(FLAGSM) $(AFS_FLAGS)
553 CFLAGS = $(CFLAGS5) $(PAM_FLAGS) $(DCE_FLAGS) $(DES_FLAGS) $(PASSWD_FLAGS) $(VTP_FLAGS)
554 LIBS = $(LIBS1) $(LIBSM) $(PAM_LIBS) $(DCE_LIBS) $(DES_LIB)
557 PROGS1 = smbclient testparm testprns smbrun smbstatus smbpasswd
558 PROGS = $(PROGS1) nmblookup
559 SCRIPTS = smbtar addtosmbpass
561 all : CHECK $(SPROGS) $(PROGS)
564 @$(SHELL) $(srcdir)checkos.sh $(FLAGSM)
565 @echo "Using CFLAGS = $(CFLAGS)"
566 @echo "Using LIBS = $(LIBS)"
568 INCLUDES1 = version.h local.h includes.h smb.h
570 INCLUDES = $(INCLUDES1) $(INCLUDES2)
572 UTILOBJ1 = util.o system.o charset.o kanji.o fault.o smbencrypt.o charcnv.o
573 UTILOBJ2 = $(UTILOBJ1) md4.o loadparm.o params.o pcap.o username.o time.o
574 UTILOBJ = $(UTILOBJ2) interface.o replace.o
575 PARAMOBJ = $(UTILOBJ) ufc.o smbpass.o access.o shmem.o
576 SMBDOBJ1 = $(PARAMOBJ) trans2.o pipes.o message.o dir.o printing.o locking.o
577 SMBDOBJ2 = ipc.o reply.o mangle.o chgpasswd.o password.o quotas.o uid.o
578 SMBDOBJ = predict.o $(SMBDOBJ1) $(SMBDOBJ2) $(VTP_OBJ)
579 NMBDOBJ1 = nmblib.o namepacket.o nameresp.o nmbsync.o nameannounce.o nameelect.o
580 NMBDOBJ2 = namedbresp.o namedbwork.o namedbserver.o namedbsubnet.o namedbname.o
581 NMBDOBJ3 = nameservresp.o nameservreply.o namelogon.o namebrowse.o namework.o nameserv.o clientutil.o
582 NMBDOBJ = $(UTILOBJ) $(NMBDOBJ1) $(NMBDOBJ2) $(NMBDOBJ3)
588 @$(CC) $(CFLAGS) -c $(srcdir)$*.c
590 smbd: server.o $(SMBDOBJ)
592 @$(CC) $(CFLAGS) -o smbd server.o $(SMBDOBJ) $(LIBS) $(AFS_LIBS)
596 @$(CC) $(CFLAGS) -o smbrun smbrun.o $(LIBS)
598 nmblookup: nmblookup.o namequery.o nmblib.o $(UTILOBJ)
599 @echo Linking nmblookup
600 @$(CC) $(CFLAGS) -o nmblookup nmblookup.o namequery.o nmblib.o $(UTILOBJ) $(LIBS)
602 nmbd: nmbd.o $(NMBDOBJ)
604 @$(CC) $(CFLAGS) -o nmbd nmbd.o $(NMBDOBJ) $(LIBS)
606 smbclient: client.o clitar.o getsmbpass.o namequery.o nmblib.o $(UTILOBJ)
607 @echo Linking smbclient
608 @$(CC) $(CFLAGS) -o smbclient client.o clitar.o getsmbpass.o namequery.o nmblib.o $(UTILOBJ) $(LIBS)
610 smbstatus: status.o $(PARAMOBJ)
611 @echo Linking smbstatus
612 @$(CC) $(CFLAGS) -o smbstatus status.o $(PARAMOBJ) $(LIBS)
614 testparm: testparm.o $(PARAMOBJ)
615 @echo Linking testparm
616 @$(CC) $(CFLAGS) -o testparm testparm.o $(PARAMOBJ) $(LIBS)
618 testprns: testprns.o $(PARAMOBJ)
619 @echo Linking testprns
620 @$(CC) $(CFLAGS) -o testprns testprns.o $(PARAMOBJ) $(LIBS)
622 smbpasswd: smbpasswd.o getsmbpass.o $(PARAMOBJ)
623 @echo Linking smbpasswd
624 @$(CC) $(CFLAGS) -o smbpasswd smbpasswd.o getsmbpass.o $(PARAMOBJ) $(LIBS)
626 install: installbin installman installscripts
629 @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
630 @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
633 @$(SHELL) $(srcdir)installscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
635 # revert to the previously installed version
637 @$(SHELL) $(srcdir)revert.sh $(SBINDIR) $(SPROGS) $(SCRIPTS)
638 @$(SHELL) $(srcdir)revert.sh $(BINDIR) $(PROGS) $(SCRIPTS)
641 @$(SHELL) $(srcdir)installman.sh $(MANDIR) $(srcdir)
643 uninstall: uninstallman uninstallbin uninstallscripts
646 @$(SHELL) $(srcdir)uninstallman.sh $(MANDIR) $(srcdir)
649 @$(SHELL) $(srcdir)uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
650 @$(SHELL) $(srcdir)uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
653 @$(SHELL) $(srcdir)uninstallscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
656 rm -f core *.o *~ $(PROGS) $(SPROGS)
659 @$(SHELL) $(srcdir)checkos.sh $(FLAGSM)
660 $(AWK) -f mkproto.awk *.c > proto.h