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 shadow passwords and quota
187 # contributed by xeno@mix.hive.no
188 # Tested on the 1.3.57 kernel and ext2fs filesystem.
190 # /usr/include/sys/quota.h must be a symlink to /usr/include/linux/quota.h
191 # The directory quota here must be a symlink to your quota package.
192 # I just do 'ln -sf /usr/src/quota-1.50 quota' in this directory to get it to work.
193 # FLAGSM = -O3 -m486 -DLINUX -DSHADOW_PWD -DQUOTAS
197 # This is for SUNOS5.4 and later (also known as Solaris 2.4 and later)
198 # contributed by Andrew.Tridgell@anu.edu.au
199 # FLAGSM = -DSUNOS5 -DSHADOW_PWD -DNETGROUP
200 # LIBSM = -lsocket -lnsl
203 # This is for SUNOS 5.2 and 5.3 (also known as Solaris 2.2 and 2.3)
204 # contributed by hdsi@newtech.net
205 # FLAGSM = -DSUNOS5 -DSHADOW_PWD -DNETGROUP -DNO_STRFTIME
206 # LIBSM = -lsocket -lnsl
210 # contributed by dsfrost@oai6.yk.fujitsu.co.jp
211 # FLAGSM = -DSVR4 -DSHADOW_PWD
212 # LIBSM = -lsocket -lnsl
215 # Contributed by mark@scot1.ucsalf.ac.uk
216 # FLAGSM = -DSVR4 -DSHADOW_PWD -DALLOW_CHANGE_PASSWORD
217 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
220 # This is for the Motorola 88xxx/9xx range of machines
221 # Contributed by RPE@monnet.com
222 # FLAGSM = -DSVR4 -DSHADOW_PWD -DGETTIMEOFDAY1
223 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
226 # This is for UNIXWARE
227 # FLAGSM = -Xa -DSVR4 -DSHADOW_PWD
228 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
231 # This is for ULTRIX. Add -DULTRIX_AUTH for Ultrix enhanced security.
232 # contributed by iversen@dsfys1.fi.uib.no
237 # This is for OSF1 (Alpha)
238 # contributed by errath@balu.kfunigraz.ac.at
239 # NOTE: You may need -warning_unresolved if you get unresolved symbols
243 # This is for OSF1 with DCE/DFS
244 # contributed by Jim Doyle <doyle@oec.com>
245 # FLAGSM = -DOSF1 -DDFS_AUTH -DSIGCLD_IGNORE -DNO_SIGNAL_TEST
246 # LIBSM = -ldce -lpthreads -lmach -lc_r
248 # This is for OSF1 (Alpha) with NIS and Fast Crypt
249 # contributed by David Gardiner <dgardine@cssip.edu.au>
250 # FLAGSM = -DOSF1 -DNETGROUP -DUFC_CRYPT
254 # This is for OSF1 (Alpha) V2.0 Enhanced Security
255 # contributed by Udo Linauer <ul@eacpc4.tuwien.ac.at>
256 # FLAGSM = -DOSF1 -DOSF1_ENH_SEC
261 # contributed by tomc@osi.curtin.edu.au
265 # This is for AIX 3.2.5 with DCE/DFS
266 # contributed by Jim Doyle <doyle@oec.com>
267 # FLAGSM = -DAIX -DDFS_AUTH -DSIGCLD_IGNORE -DNO_SIGNAL_TEST
268 # LIBSM = -lc_r -ldce -lpthreads
272 # contributed by tomh@metrics.com
273 # versions of BSDI prior to 2.0 may need to add -DUSE_F_FSIZE for
274 # disk usage stats to be correct
279 # This is for NetBSD. Add -DNETBSD_1_0 if you are using 1.0
280 # contributed by noses@oink.rhein.de
281 # FLAGSM = -DNETBSD -DSHADOW_PWD
285 # This is for SEQUENT.
286 # Contributed by fwk@ix.netcom.com (Frank Keeney) and
287 # rpwillia@Pentagon-EMH6.army.mil (Ray Williams)
288 # tested on DYNIX/ptx(R) V2.1.0
289 # FLAGSM = -DSEQUENT -DSHADOW_PWD -DHAVE_TIMEZONE
290 # LIBSM = -lrpc -lsocket -lPW -linet -lnsl -lseq -lsec
293 # This is for SEQUENT PTX 4.1.x
294 # Contributed by bressler@iftccu.ca.boeing.com (Rick Bressler)
295 # based on Keeny and Williams contribution.
296 # tested on DYNIX/ptx(R) V4.1.3
297 # FLAGSM = -DSEQUENT -DSHADOW_PWD -DHAVE_TIMEZONE -DPTX4
298 # LIBSM = -lrpc -lsocket -lPW -lnsl -lseq -lsec
301 # This is for HP-UX. Note that some systems don't like the -Aa switch.
302 # contributed by Pasi.Kaara@atk.tpo.fi
303 # You will need -DREPLACE_GETPASS if you use smb encryption
304 # FLAGSM = -DHPUX -Aa -D_HPUX_SOURCE -D_POSIX_SOURCE
307 # This is for HP-UX with DCE/DFS
308 # contributed by Jim Doyle <doyle@oec.com>
309 # FLAGSM = -DHPUX -Aa -D_HPUX_SOURCE -D_POSIX_SOURCE -DDFS_AUTH -D_REENTRANT -I/usr/include/reentrant
310 # LIBSM = -ldce -lM -lc_r
312 # HP-UX 10.x Trusted System
313 # Contributed by David-Michael Lincke (dlincke@sgcl1.unisg.ch)
314 # FLAGSM = +O3 -Ae -DHPUX -DHPUX_10_TRUSTED
319 # contributed by lpc@solomon.technet.sg (Michael Chua)
320 # FOR SGI IRIX 4.x.x, use the following line
321 # FLAGSM = -DSGI -DHAVE_TIMEZONE
324 # FOR SGI IRIX 5.x.x, use this line instead
325 # FLAGSM = -DSGI5 -DSHADOW_PWD -DHAVE_TIMEZONE
329 # This is for FreeBSD
330 # contributed by kuku@acds.physik.rwth-aachen.de
331 # NOTE: You may need to add -DBSD44 if you have password problems
336 # This is for NEXTSTEP Release 2.X
338 # contributed by brad@cac.washington.edu (Brad Greer)
342 # This is for NEXTSTEP Release 3.0 and greater (including OPENSTEP for Mach).
343 # contributed by brad@cac.washington.edu (Brad Greer)
344 # additional configuration by pmarcos@next.com (Paul Marcos)
345 # For compiling n-way fat executables, you should append the appropriat -arch
346 # flags to the FLAGSM variable. Valid flags are:
351 # To compile 4-way fat, you would append
352 # -arch m68k -arch i386 -arch hppa -arch sparc
357 # NOTE: ISC is also known as "INTERACTIVE"
358 # This is for Sunsoft ISC SVR3V4 running in POSIX mode
359 # contributed by pim@cti-software.nl (Pim Zandbergen)
360 # FLAGSM = -posix -D_SYSV3 -DISC -DSHADOW_PWD
361 # LIBSM = -lsec -lcrypt -linet
363 # This is for Sunsoft ISC SVR3V4 running in iBCS2 mode
364 # contributed by pim@cti-software.nl (Pim Zandbergen)
365 # FLAGSM = -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_SYSV3\
366 # -DISC -DSHADOW_PWD -DREPLACE_GETWD -DREPLACE_RENAME
367 # LIBSM = -lsec -lcrypt -linet -lcposix
370 # This is for A/UX 3.0
371 # Contributed by root@dolphin.csudh.edu (Jon S. Stevens)
375 # This is for Altos Series 386/1000
376 # Contributed by cal@zls.com
377 # FLAGSM = -DALTOS -DHAS_RDCHK
378 # LIBSM = -lsocket -lxenix
381 #Note: The SCO entries require the libcrypt library. You can get it via
382 #anonymous ftp from ftp.sco.com:/SLS/lng225b.* or ftp.uu.net:/vendors/sco
384 # Use this for SCO with shadow passwords. Tested on "Open enterprise 3.0"
385 # SCO changes from Heinz Mauelshagen (mauelsha@ez.da.telekom.de)
386 # FLAGSM = -DSCO -DSHADOW_PWD -DNETGROUP
387 # LIBSM = -lyp -lrpc -lyp -lsec -lsocket -lcrypt_i -lintl
389 # Use this for SCO with shadow passwords, without YP.
390 # Tested on "Open Enterprise Server 3.0" (John Owens john@micros.com)
391 # Also, use "CC = cc" above.
392 # FLAGSM = -DSCO -DSHADOW_PWD
393 # LIBSM = -lsec -lsocket -lcrypt_i
395 # Use this for SCO with TCB passwords (default).
396 # Tested on "Open enterprise 3.0". Contributed by lance@fox.com.
398 # FLAGSM = -DSCO -DSecureWare
399 # LIBSM = -lprot_s -lcrypt -lsocket -lm -lc_s
401 # Use this for SCO Unix 3.2v2 (ODT 1.1) with TCB passwords (default).
402 # Contributed by Stephen.Rothwell@pd.necisa.oz.au
403 # N.B. this needs gcc
404 # FLAGSM = -DSCO -DSecureWare -DSCO3_2_2
405 # LIBSM = -lprot -lcrypt_i -lsocket -lm -lintl
407 # This is for the european distribution of SCO.
408 # Contributed by Urmet.Janes@gwhite.goodwin.ee
409 # FLAGSM = -DSCO -DSHADOW_PWD
410 # LIBSM = -lsec -lsocket /usr/lib/libcrypt_i.a -lintl
412 # Use this for SCO OpenServer 5 with TCB passwords (default).
413 # contributed by Scott Michel <scottm@intime.intime.com>
414 # you may also like to add the -dy switch (recommended by Marnus van
415 # Niekerk, mvn@pixie.co.za)
417 # FLAGSM = -DSCO -DSecureWare -DEVEREST -DUSE_MMAP
418 # LIBSM = -lprot -lcurses -lcrypt -lsocket -lPW -lm -lx -lc_s -lc
421 # This is for intergraph.
422 # contributed by cjkiick@flinx.b11.ingr.com
423 # modified by ttj@sknsws61.sjo.statkart.no
424 # FLAGSM = -DCLIX -D_INGR_EXTENSIONS=1
425 # LIBSM = -lbsd -lc_s
428 # Contributed by ross@augie.insci.com (Ross Andrus)
432 # This is for Apollo Domain/OS sr10.3 (systype = BSD4.3)
433 # Added 1994-07-08 Stephen C. Steel <steve@qv3donald.LeidenUniv.nl>
434 # additional patches by jmi@csd.cri.dk (John Mills)
435 # you may need the "-A ansi" switch to cc
436 # FLAGSM = -DAPOLLO -D_INCLUDE_BSD_SOURCE -D_INCLUDE_XOPEN_SOURCE
441 # contributed by Jim Barry <jim@ilp.com> and
442 # Charles Gay-Jones <charlie@ilp.com>
443 # FLAGSM = -DRiscIX -DNOSTRDUP
447 # This is for System V with some berkely extensions (Motorola 88k R32V3.2).
448 # contributed by tonyb@plaza.ds.adp.com (Tony D. Birnseth)
450 # LIBSM = -lgen -lbsd -lnsl
454 # contributed by Peter Olsson <pol@leissner.se>
455 # NOTE: You may need an updated libc.a from your vendor as older
456 # versions have broken mktime calls and no initgroups() call
457 # NOTE2: You may need -lpasswd if you use shadow passwords
458 # NOTE3: Please read the file DNIX.txt in the docs directory. It
459 # contains important information about uid handling under DNIX, you may
460 # need to patch your C library.
461 # FLAGSM = -DDNIX -I/usr/include/bsd
465 # This is for Cray, Unicos 8.0
466 # contributed by velo@sesun3.epfl.ch (Martin Ouwehand)
467 # FLAGSM = -DCRAY -U__STDC__ -DQUOTAS
471 # contributed by Victor Balashov <balashov@cv.jinr.dubna.su>
472 # and Ulrich Hahn <ulrich.hahn@zdv.uni-tuebingen.de>
473 # FLAGSM= -DCONVEX -DSHADOW_PWD
476 # This is for SMP_DC.OSx v1.1-94c079 on Pyramid S series
477 # contributed by jeffrey@itm.org
478 # FLAGSM = -DSOLARIS -DSHADOW_PWD -DBSD_COMP
479 # LIBSM = -lsocket -lnsl
481 # This is for QNX 4.22
482 # Contributed by eldo@invisa.satlink.net (Eldo Loguzzo)
483 # FLAGSM = -DQNX -DGUEST_SESSSETUP=1
487 # This is for SONY NEWS, NEWS-OS 4.2.x
488 # contributed by sky@sm.sony.co.jp (Katushi Sato)
489 # FLAGSM = -DNEWS42 -DKANJI=\"sjis\"
493 # This is for SONY NEWS, NEWS-OS 6.1.x
494 # contributed by kobo@sm.sony.co.jp (Yoichi Kobori)
495 # FLAGSM = -Xa -DSVR4 -DNEWS61 -DSHADOW_PWD -DNETGROUP -DGETTIMEOFDAY1 -DKANJI=\"euc\"\ -D_SONYILS_H
496 # LIBSM = -lsocket -lnsl
499 # This is for OS/2 using EMX 0.9b
500 # Contributed by jasonr@pec.co.nz (Jason Rumney)
502 # LIBSM = -Zexe -lsocket
505 # This is for LYNX 2.3.0 (gcc v2.6)
506 # Contributed by woelfel@hpe.fzk.de (Manfred Woelfel)
507 # FLAGSM = -DLYNX -DUFC_CRYPT -mposix
511 # This is for MachTen (a unix like system for Macintoshes)
512 # contributed by Trevor Strohman (trev@figment.tenon.com)
518 # contributed by John Agnew <johna@bfs.Unibol.COM>
519 # FLAGSM = -systype svr4 -std -DSVR4
520 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
523 # This is for B.O.S. (Bull Operating System)
524 # Contributed by koine@fileita.it
525 # FLAGSM = -DBOS -DNO_RESOURCEH -DUSE_WAITPID
529 # This for Amiga using GCC and ixemul.library 43.0 or later.
530 # contributed by Rask Ingemann Lambertsen <rask@k4315.kampsax.dtu.dk>
531 # The binaries will support both AmiTCP and AS225R2 compatible
532 # protocol stacks because of the use of ixnet.library.
533 # Other protocol stacks will be supported automatically if
534 # support for them is added to ixnet.library.
535 # The binaries will have automatic stack extension :-)
536 # smbd must be run from inetd :-(
537 # FLAGSM = -DAMIGA -Dfork=vfork -mstackextend
542 ######################################################################
543 # DON'T EDIT BELOW THIS LINE
544 ######################################################################
546 CFLAGS1 = $(FLAGS1) -DSMBLOGFILE=\"$(SMBLOGFILE)\" -DNMBLOGFILE=\"$(NMBLOGFILE)\"
547 CFLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
548 CFLAGS3 = -DLOCKDIR=\"$(LOCKDIR)\" -DSMBRUN=\"$(SMBRUN)\"
549 CFLAGS4 = -DWORKGROUP=\"$(WORKGROUP)\" -DGUEST_ACCOUNT=\"$(GUESTACCOUNT)\"
550 CFLAGS5 = $(CFLAGS1) $(CFLAGS2) $(CFLAGS3) $(CFLAGS4) $(FLAGSM) $(AFS_FLAGS)
551 CFLAGS = $(CFLAGS5) $(PAM_FLAGS) $(DCE_FLAGS) $(DES_FLAGS) $(PASSWD_FLAGS) $(VTP_FLAGS)
552 LIBS = $(LIBS1) $(LIBSM) $(PAM_LIBS) $(DCE_LIBS) $(DES_LIB)
555 PROGS1 = smbclient testparm testprns smbrun smbstatus smbpasswd
556 PROGS = $(PROGS1) nmblookup
557 SCRIPTS = smbtar addtosmbpass
559 all : CHECK $(SPROGS) $(PROGS)
562 @$(SHELL) $(srcdir)checkos.sh $(FLAGSM)
563 @echo "Using CFLAGS = $(CFLAGS)"
564 @echo "Using LIBS = $(LIBS)"
566 INCLUDES1 = version.h local.h includes.h smb.h
568 INCLUDES = $(INCLUDES1) $(INCLUDES2)
570 UTILOBJ1 = util.o system.o charset.o kanji.o fault.o smbencrypt.o charcnv.o
571 UTILOBJ2 = $(UTILOBJ1) md4.o loadparm.o params.o pcap.o username.o time.o
572 UTILOBJ = $(UTILOBJ2) interface.o replace.o
573 PARAMOBJ = $(UTILOBJ) ufc.o smbpass.o access.o shmem.o
574 SMBDOBJ1 = $(PARAMOBJ) trans2.o pipes.o message.o dir.o printing.o locking.o
575 SMBDOBJ2 = ipc.o reply.o mangle.o chgpasswd.o password.o quotas.o uid.o
576 SMBDOBJ = predict.o $(SMBDOBJ1) $(SMBDOBJ2) $(VTP_OBJ)
577 NMBDOBJ1 = nmblib.o namepacket.o nameresp.o nmbsync.o nameannounce.o nameelect.o
578 NMBDOBJ2 = namedbresp.o namedbwork.o namedbserver.o namedbsubnet.o namedbname.o
579 NMBDOBJ3 = nameservresp.o nameservreply.o namelogon.o namebrowse.o namework.o nameserv.o clientutil.o
580 NMBDOBJ = $(UTILOBJ) $(NMBDOBJ1) $(NMBDOBJ2) $(NMBDOBJ3)
586 @$(CC) $(CFLAGS) -c $(srcdir)$*.c
588 smbd: server.o $(SMBDOBJ)
590 @$(CC) $(CFLAGS) -o smbd server.o $(SMBDOBJ) $(LIBS) $(AFS_LIBS)
594 @$(CC) $(CFLAGS) -o smbrun smbrun.o $(LIBS)
596 nmblookup: nmblookup.o namequery.o nmblib.o $(UTILOBJ)
597 @echo Linking nmblookup
598 @$(CC) $(CFLAGS) -o nmblookup nmblookup.o namequery.o nmblib.o $(UTILOBJ) $(LIBS)
600 nmbd: nmbd.o $(NMBDOBJ)
602 @$(CC) $(CFLAGS) -o nmbd nmbd.o $(NMBDOBJ) $(LIBS)
604 smbclient: client.o clitar.o getsmbpass.o namequery.o nmblib.o $(UTILOBJ)
605 @echo Linking smbclient
606 @$(CC) $(CFLAGS) -o smbclient client.o clitar.o getsmbpass.o namequery.o nmblib.o $(UTILOBJ) $(LIBS)
608 smbstatus: status.o $(PARAMOBJ)
609 @echo Linking smbstatus
610 @$(CC) $(CFLAGS) -o smbstatus status.o $(PARAMOBJ) $(LIBS)
612 testparm: testparm.o $(PARAMOBJ)
613 @echo Linking testparm
614 @$(CC) $(CFLAGS) -o testparm testparm.o $(PARAMOBJ) $(LIBS)
616 testprns: testprns.o $(PARAMOBJ)
617 @echo Linking testprns
618 @$(CC) $(CFLAGS) -o testprns testprns.o $(PARAMOBJ) $(LIBS)
620 smbpasswd: smbpasswd.o getsmbpass.o $(PARAMOBJ)
621 @echo Linking smbpasswd
622 @$(CC) $(CFLAGS) -o smbpasswd smbpasswd.o getsmbpass.o $(PARAMOBJ) $(LIBS)
624 install: installbin installman installscripts
627 @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
628 @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
631 @$(SHELL) $(srcdir)installscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
633 # revert to the previously installed version
635 @$(SHELL) $(srcdir)revert.sh $(SBINDIR) $(SPROGS) $(SCRIPTS)
636 @$(SHELL) $(srcdir)revert.sh $(BINDIR) $(PROGS) $(SCRIPTS)
639 @$(SHELL) $(srcdir)installman.sh $(MANDIR) $(srcdir)
641 uninstall: uninstallman uninstallbin uninstallscripts
644 @$(SHELL) $(srcdir)uninstallman.sh $(MANDIR) $(srcdir)
647 @$(SHELL) $(srcdir)uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
648 @$(SHELL) $(srcdir)uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
651 @$(SHELL) $(srcdir)uninstallscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
654 rm -f core *.o *~ $(PROGS) $(SPROGS)
657 @$(SHELL) $(srcdir)checkos.sh $(FLAGSM)
658 $(AWK) -f mkproto.awk *.c > proto.h