locking.c proto.h shmem.c smb.h status.c :
[Samba.git] / source / Makefile.RPM
blob32170a78621f5bec4444ef992a0533d495797f7d
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.
8 MANDIR = /usr/man
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.
13 BASEDIR = /
14 BINDIR = $(BASEDIR)usr/bin
15 SBINDIR = $(BASEDIR)usr/sbin
16 LIBDIR = /etc
17 VARDIR = /var
19 # The permissions to give the executables
20 INSTALLPERMS = 0755
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
25 # for RedHat Linux.
26 FLAGS1 = $(RPM_OPT_FLAGS)
27 FLAGS1 = -O
28 LIBS1 = 
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. 
32 CC = gcc
34 # This may help with some versions of make
35 SHELL = /bin/sh
37 # The following can be useful for compiling on multiple architectures
38 # just uncommment them putting the right directory in.
39 # srcdir=./
40 # VPATH=$(srcdir)
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))
55 WORKGROUP = WORKGROUP
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.
63 GUESTACCOUNT = nobody
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:
74 PAM_FLAGS = -DUSE_PAM -DNO_CRYPT
75 PAM_LIBS = -ldl -lpam
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
93 # DCE_LIBS =
95 # This is for SMB encrypted (lanman) passwords.
96 # you may wish to add -DREPLACE_GETPASS if your getpass() is limited
97 # to 8 chars
98 # DES_BASE=/usr/local/libdes
99 # DES_FLAGS= -I$(DES_BASE)
100 # DES_LIB= -L$(DES_BASE) -ldes
101 # PASSWD_FLAGS=-DSMB_PASSWD=\"$(BINDIR)/smbpasswd\" -DSMB_PASSWD_FILE=\"$(BASEDIR)/private/smbpasswd\"
103 ######################################
104 # VTP-Support
106 # uncomment the following two lines to enable VTP-Support
107 #VTP_FLAGS = -DWITH_VTP
108 #VTP_OBJ = vt_mode.o
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
118 AWK = awk
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 
135 #            on some systems.
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
148 #   -DKANJI=\"<code>\"
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
168 # FLAGSM = -DSUNOS4
169 # LIBSM =   
170 # AWK = nawk 
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
177 # LIBSM = -lshadow
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
183 FLAGSM = -DLINUX
184 LIBSM = 
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.
189 # Notes:
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
194 # LIBSM = -lshadow
197 # This is for SUNOS5 (also known as Solaris 2)
198 # contributed by Andrew.Tridgell@anu.edu.au
199 # FLAGSM = -DSUNOS5 -DSHADOW_PWD -DNETGROUP 
200 # LIBSM = -lsocket -lnsl
201 # AWK = nawk 
203 # This is for UXP/DS
204 # contributed by dsfrost@oai6.yk.fujitsu.co.jp
205 # FLAGSM = -DSVR4 -DSHADOW_PWD
206 # LIBSM = -lsocket -lnsl
208 # This is for SVR4
209 # Contributed by mark@scot1.ucsalf.ac.uk
210 # FLAGSM = -DSVR4 -DSHADOW_PWD -DALLOW_CHANGE_PASSWORD
211 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
214 # This is for the Motorola 88xxx/9xx range of machines
215 # Contributed by RPE@monnet.com
216 # FLAGSM = -DSVR4 -DSHADOW_PWD -DGETTIMEOFDAY1
217 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
220 # This is for UNIXWARE
221 # FLAGSM = -Xa -DSVR4 -DSHADOW_PWD
222 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
225 # This is for ULTRIX. Add -DULTRIX_AUTH for Ultrix enhanced security.
226 # contributed by iversen@dsfys1.fi.uib.no
227 # FLAGSM = -DULTRIX
228 # LIBSM =   
231 # This is for OSF1 (Alpha)
232 # contributed by errath@balu.kfunigraz.ac.at
233 # NOTE: You may need -warning_unresolved if you get unresolved symbols
234 # FLAGSM = -DOSF1
235 # LIBSM =
237 # This is for OSF1 with DCE/DFS
238 # contributed by Jim Doyle <doyle@oec.com>
239 # FLAGSM = -DOSF1 -DDFS_AUTH -DSIGCLD_IGNORE -DNO_SIGNAL_TEST
240 # LIBSM = -ldce -lpthreads -lmach -lc_r
242 # This is for OSF1 (Alpha) with NIS and Fast Crypt
243 # contributed by David Gardiner <dgardine@cssip.edu.au>
244 # FLAGSM = -DOSF1 -DNETGROUP -DUFC_CRYPT
245 # LIBSM =
248 # This is for OSF1 (Alpha) V2.0 Enhanced Security 
249 # contributed by Udo Linauer <ul@eacpc4.tuwien.ac.at>
250 # FLAGSM = -DOSF1 -DOSF1_ENH_SEC
251 # LIBSM = -lsecurity
254 # This is for AIX
255 # contributed by tomc@osi.curtin.edu.au
256 # FLAGSM = -DAIX
257 # LIBSM =   
259 # This is for AIX 3.2.5 with DCE/DFS
260 # contributed by Jim Doyle <doyle@oec.com>
261 # FLAGSM = -DAIX -DDFS_AUTH -DSIGCLD_IGNORE -DNO_SIGNAL_TEST
262 # LIBSM = -lc_r -ldce -lpthreads
263 # CC = cc_r
265 # This is for BSDI 
266 # contributed by tomh@metrics.com
267 # versions of BSDI prior to 2.0 may need to add -DUSE_F_FSIZE for 
268 # disk usage stats to be correct
269 # FLAGSM = -DBSDI
270 # LIBSM =   
273 # This is for NetBSD. Add -DNETBSD_1_0 if you are using 1.0
274 # contributed by noses@oink.rhein.de
275 # FLAGSM = -DNETBSD -DSHADOW_PWD
276 # LIBSM = -lcrypt 
279 # This is for SEQUENT. 
280 # Contributed by fwk@ix.netcom.com (Frank Keeney) and 
281 # rpwillia@Pentagon-EMH6.army.mil (Ray Williams)
282 # tested on DYNIX/ptx(R) V2.1.0
283 # FLAGSM = -DSEQUENT -DSHADOW_PWD -DHAVE_TIMEZONE
284 # LIBSM = -lrpc -lsocket -lPW -linet -lnsl -lseq -lsec
287 # This is for SEQUENT PTX 4.1.x
288 # Contributed by bressler@iftccu.ca.boeing.com (Rick Bressler)
289 # based on Keeny and Williams contribution.
290 # tested on DYNIX/ptx(R) V4.1.3
291 # FLAGSM = -DSEQUENT -DSHADOW_PWD -DHAVE_TIMEZONE -DPTX4
292 # LIBSM = -lrpc -lsocket -lPW -lnsl -lseq -lsec
295 # This is for HP-UX. Note that some systems don't like the -Aa switch.
296 # contributed by Pasi.Kaara@atk.tpo.fi
297 # You will need -DREPLACE_GETPASS if you use smb encryption
298 # FLAGSM = -DHPUX -Aa -D_HPUX_SOURCE -D_POSIX_SOURCE
299 # LIBSM = 
301 # This is for HP-UX with DCE/DFS
302 # contributed by Jim Doyle <doyle@oec.com>
303 # FLAGSM = -DHPUX -Aa -D_HPUX_SOURCE -D_POSIX_SOURCE -DDFS_AUTH -D_REENTRANT -I/usr/include/reentrant
304 # LIBSM = -ldce -lM -lc_r
306 # HP-UX 10.x Trusted System
307 # Contributed by David-Michael Lincke (dlincke@sgcl1.unisg.ch)
308 # FLAGSM = +O3 -Ae -DHPUX -DHPUX_10_TRUSTED
309 # LIBSM = -lsec
312 # This is for SGI.
313 # contributed by lpc@solomon.technet.sg (Michael Chua)
314 # FOR SGI IRIX 4.x.x, use the following line
315 # FLAGSM = -DSGI -DHAVE_TIMEZONE
316 # LIBSM = -lsun
318 # FOR SGI IRIX 5.x.x, use this line instead
319 # FLAGSM = -DSGI5 -DSHADOW_PWD -DHAVE_TIMEZONE
320 # LIBSM =
323 # This is for FreeBSD
324 # contributed by kuku@acds.physik.rwth-aachen.de
325 # NOTE: You may need to add -DBSD44 if you have password problems
326 # FLAGSM = -DFreeBSD
327 # LIBSM = -lcrypt 
330 # This is for NEXTSTEP Release 2.X
331 # No Posix.
332 # contributed by brad@cac.washington.edu (Brad Greer)
333 # FLAGSM = -DNEXT2 
334 # LIBSM = 
336 # This is for NEXTSTEP Release 3.0 and greater (including OPENSTEP for Mach).
337 # contributed by brad@cac.washington.edu (Brad Greer)
338 # additional configuration by pmarcos@next.com (Paul Marcos)
339 # For compiling n-way fat executables, you should append the appropriat -arch 
340 # flags to the FLAGSM variable.  Valid flags are:
341 #    -arch m68k
342 #    -arch i386
343 #    -arch hppa
344 #    -arch sparc
345 # To compile 4-way fat, you would append
346 #    -arch m68k -arch i386 -arch hppa -arch sparc
347 # FLAGSM = -DNEXT3_0
348 # LIBSM = 
351 # NOTE: ISC is also known as "INTERACTIVE"
352 # This is for Sunsoft ISC SVR3V4 running in POSIX mode
353 # contributed by pim@cti-software.nl (Pim Zandbergen)
354 # FLAGSM = -posix -D_SYSV3 -DISC -DSHADOW_PWD
355 # LIBSM = -lsec -lcrypt -linet
357 # This is for Sunsoft ISC SVR3V4 running in iBCS2 mode
358 # contributed by pim@cti-software.nl (Pim Zandbergen)
359 # FLAGSM = -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_SYSV3\
360 #          -DISC -DSHADOW_PWD -DREPLACE_GETWD -DREPLACE_RENAME
361 # LIBSM = -lsec -lcrypt -linet -lcposix
364 # This is for A/UX 3.0
365 # Contributed by root@dolphin.csudh.edu (Jon S. Stevens)
366 # FLAGSM = -DAUX
367 # LIBSM =
369 # This is for Altos Series 386/1000
370 # Contributed by cal@zls.com
371 # FLAGSM = -DALTOS -DHAS_RDCHK
372 # LIBSM = -lsocket -lxenix
375 #Note: The SCO entries require the libcrypt library. You can get it via
376 #anonymous ftp from ftp.sco.com:/SLS/lng225b.* or ftp.uu.net:/vendors/sco
378 # Use this for SCO with shadow passwords. Tested on "Open enterprise 3.0"
379 # SCO changes from Heinz Mauelshagen (mauelsha@ez.da.telekom.de)
380 # FLAGSM = -DSCO -DSHADOW_PWD -DNETGROUP
381 # LIBSM = -lyp -lrpc -lyp -lsec -lsocket -lcrypt_i -lintl
383 # Use this for SCO with shadow passwords, without YP.
384 # Tested on "Open Enterprise Server 3.0" (John Owens john@micros.com)
385 # Also, use "CC = cc" above.
386 # FLAGSM = -DSCO -DSHADOW_PWD
387 # LIBSM = -lsec -lsocket -lcrypt_i
389 # Use this for SCO with TCB passwords (default).
390 # Tested on "Open enterprise 3.0". Contributed by lance@fox.com.
391 # CC     = cc
392 # FLAGSM = -DSCO -DSecureWare
393 # LIBSM  = -lprot_s -lcrypt -lsocket -lm -lc_s
395 # Use this for SCO Unix 3.2v2 (ODT 1.1) with TCB passwords (default).
396 # Contributed by Stephen.Rothwell@pd.necisa.oz.au
397 # N.B. this needs gcc
398 # FLAGSM = -DSCO -DSecureWare -DSCO3_2_2
399 # LIBSM  = -lprot -lcrypt_i -lsocket -lm -lintl
401 # This is for the european distribution of SCO. 
402 # Contributed by Urmet.Janes@gwhite.goodwin.ee
403 # FLAGSM = -DSCO -DSHADOW_PWD 
404 # LIBSM = -lsec -lsocket /usr/lib/libcrypt_i.a -lintl
406 # Use this for SCO OpenServer 5 with TCB passwords (default).
407 # contributed by Scott Michel <scottm@intime.intime.com>
408 # you may also like to add the -dy switch (recommended by Marnus van 
409 # Niekerk, mvn@pixie.co.za)
410 # CC     = cc -Xc
411 # FLAGSM = -DSCO -DSecureWare -DEVEREST -DUSE_MMAP
412 # LIBSM  = -lprot -lcurses -lcrypt -lsocket -lPW -lm -lx -lc_s -lc
415 # This is for intergraph. 
416 # contributed by cjkiick@flinx.b11.ingr.com
417 # modified by ttj@sknsws61.sjo.statkart.no
418 # FLAGSM = -DCLIX -D_INGR_EXTENSIONS=1
419 # LIBSM = -lbsd -lc_s
421 # This is for DGUX. 
422 # Contributed by ross@augie.insci.com (Ross Andrus)
423 # FLAGSM = -DDGUX 
424 # LIBSM  = 
426 # This is for Apollo Domain/OS sr10.3 (systype = BSD4.3)
427 # Added 1994-07-08 Stephen C. Steel <steve@qv3donald.LeidenUniv.nl>
428 # additional patches by jmi@csd.cri.dk (John Mills)
429 # you may need the "-A ansi" switch to cc
430 # FLAGSM = -DAPOLLO -D_INCLUDE_BSD_SOURCE -D_INCLUDE_XOPEN_SOURCE
431 # LIBSM =
434 # RiscIX. 
435 # contributed by Jim Barry <jim@ilp.com> and 
436 # Charles Gay-Jones <charlie@ilp.com>
437 # FLAGSM = -DRiscIX -DNOSTRDUP
438 # LIBSM =
441 # This is for System V with some berkely extensions (Motorola 88k R32V3.2).
442 # contributed by tonyb@plaza.ds.adp.com (Tony D. Birnseth)
443 # FLAGSM = -DM88K_R3
444 # LIBSM = -lgen -lbsd -lnsl
447 # This is for DNIX.
448 # contributed by Peter Olsson <pol@leissner.se>
449 # NOTE: You may need an updated libc.a from your vendor as older
450 # versions have broken mktime calls and no initgroups() call
451 # NOTE2: You may need -lpasswd if you use shadow passwords
452 # NOTE3: Please read the file DNIX.txt in the docs directory. It
453 # contains important information about uid handling under DNIX, you may
454 # need to patch your C library.
455 # FLAGSM = -DDNIX -I/usr/include/bsd
456 # LIBSM = -ln
459 # This is for Cray, Unicos 8.0
460 # contributed by velo@sesun3.epfl.ch (Martin Ouwehand)
461 # FLAGSM = -DCRAY -U__STDC__ -DQUOTAS
462 # LIBSM =
464 # This is for Convex
465 # contributed by Victor Balashov <balashov@cv.jinr.dubna.su>
466 # and Ulrich Hahn <ulrich.hahn@zdv.uni-tuebingen.de>
467 # FLAGSM= -DCONVEX -DSHADOW_PWD
468 # LIBSM= 
470 # This is for SMP_DC.OSx v1.1-94c079 on Pyramid S series
471 # contributed by jeffrey@itm.org
472 # FLAGSM = -DSOLARIS -DSHADOW_PWD -DBSD_COMP
473 # LIBSM = -lsocket -lnsl
475 # This is for QNX 4.22
476 # Contributed by eldo@invisa.satlink.net (Eldo Loguzzo)
477 # FLAGSM = -DQNX -DGUEST_SESSSETUP=1
478 # LIBSM =
481 # This is for SONY NEWS, NEWS-OS 4.2.x
482 # contributed by sky@sm.sony.co.jp (Katushi Sato)
483 # FLAGSM = -DNEWS42 -DKANJI=\"sjis\"
484 # LIBSM =
487 # This is for SONY NEWS, NEWS-OS 6.1.x
488 # contributed by kobo@sm.sony.co.jp (Yoichi Kobori)
489 # FLAGSM = -Xa -DSVR4 -DNEWS61 -DSHADOW_PWD -DNETGROUP -DGETTIMEOFDAY1 -DKANJI=\"euc\"\ -D_SONYILS_H
490 # LIBSM = -lsocket -lnsl
493 # This is for OS/2 using EMX 0.9b
494 # Contributed by jasonr@pec.co.nz (Jason Rumney)
495 # FLAGSM = -DOS2
496 # LIBSM = -Zexe -lsocket
499 # This is for LYNX 2.3.0 (gcc v2.6)
500 # Contributed by woelfel@hpe.fzk.de (Manfred Woelfel)
501 # FLAGSM = -DLYNX -DUFC_CRYPT -mposix
502 # LIBSM = -lbsd
505 # This is for MachTen (a unix like system for Macintoshes)
506 # contributed by Trevor Strohman (trev@figment.tenon.com)
507 # FLAGSM = -DMACHTEN
508 # LIBSM =
511 # RISCOs 5.0B
512 # contributed by John Agnew <johna@bfs.Unibol.COM>
513 # FLAGSM = -systype svr4 -std -DSVR4
514 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
517 # This is for B.O.S. (Bull Operating System)
518 # Contributed by koine@fileita.it
519 # FLAGSM = -DBOS -DNO_RESOURCEH -DUSE_WAITPID
520 # LIBSM = -linet
523 # This for Amiga using GCC and ixemul.library 43.0 or later.
524 # contributed by Rask Ingemann Lambertsen <rask@kampsax.dtu.dk>
525 # The binaries will support both AmiTCP and AS225R2 compatible
526 # protocol stacks because of the use of ixnet.library.
527 # Other protocol stacks will be supported automatically if
528 # support for them is added to ixnet.library.
529 # The binaries will have automatic stack extension :-)
530 # Doesn't work in stand-alone mode, must be run from inetd :-(
531 # FLAGSM = -DFreeBSD -mstackextend
532 # LIBSM =
536 ######################################################################
537 # DON'T EDIT BELOW THIS LINE
538 ######################################################################
540 CFLAGS1 = $(FLAGS1) -DSMBLOGFILE=\"$(SMBLOGFILE)\" -DNMBLOGFILE=\"$(NMBLOGFILE)\"
541 CFLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" 
542 CFLAGS3 = -DLOCKDIR=\"$(LOCKDIR)\" -DSMBRUN=\"$(SMBRUN)\"
543 CFLAGS4 = -DWORKGROUP=\"$(WORKGROUP)\" -DGUEST_ACCOUNT=\"$(GUESTACCOUNT)\" 
544 CFLAGS5 = $(CFLAGS1) $(CFLAGS2) $(CFLAGS3) $(CFLAGS4) $(FLAGSM) $(AFS_FLAGS) 
545 CFLAGS  = $(CFLAGS5) $(PAM_FLAGS) $(DCE_FLAGS) $(DES_FLAGS) $(PASSWD_FLAGS) $(VTP_FLAGS)
546 LIBS = $(LIBS1) $(LIBSM) $(PAM_LIBS) $(DCE_LIBS) $(DES_LIB)
548 SPROGS = smbd nmbd
549 PROGS1 = smbclient testparm testprns smbrun smbstatus smbpasswd 
550 PROGS = $(PROGS1) nmblookup
551 SCRIPTS = smbtar addtosmbpass
553 all : CHECK $(SPROGS) $(PROGS) 
555 CHECK :
556         @$(SHELL) $(srcdir)checkos.sh $(FLAGSM)
557         @echo "Using CFLAGS = $(CFLAGS)"
558         @echo "Using LIBS = $(LIBS)"
560 INCLUDES1 = version.h local.h includes.h smb.h 
561 INCLUDES2 = trans2.h 
562 INCLUDES = $(INCLUDES1) $(INCLUDES2)
564 UTILOBJ1 = util.o system.o charset.o kanji.o fault.o smbencrypt.o charcnv.o
565 UTILOBJ2 = $(UTILOBJ1) md4.o loadparm.o params.o pcap.o username.o time.o
566 UTILOBJ = $(UTILOBJ2) interface.o replace.o
567 PARAMOBJ = $(UTILOBJ) ufc.o smbpass.o access.o shmem.o
568 SMBDOBJ1 = $(PARAMOBJ) trans2.o pipes.o message.o dir.o printing.o locking.o
569 SMBDOBJ2 = ipc.o reply.o mangle.o chgpasswd.o password.o quotas.o uid.o
570 SMBDOBJ = predict.o $(SMBDOBJ1) $(SMBDOBJ2) $(VTP_OBJ)
571 NMBDOBJ1 = nmblib.o namepacket.o nameresp.o nmbsync.o nameannounce.o nameelect.o
572 NMBDOBJ2 = namedbresp.o namedbwork.o namedbserver.o namedbsubnet.o namedbname.o 
573 NMBDOBJ3 = nameservresp.o nameservreply.o namelogon.o namebrowse.o namework.o nameserv.o clientutil.o
574 NMBDOBJ = $(UTILOBJ) $(NMBDOBJ1) $(NMBDOBJ2) $(NMBDOBJ3)
575 .SUFFIXES:
576 .SUFFIXES: .c .o .h
578 .c.o: $(INCLUDES)
579         @echo Compiling $*.c
580         @$(CC) $(CFLAGS) -c $(srcdir)$*.c
582 smbd: server.o $(SMBDOBJ)
583         @echo Linking smbd
584         @$(CC) $(CFLAGS) -o smbd server.o $(SMBDOBJ) $(LIBS) $(AFS_LIBS)
586 smbrun: smbrun.o
587         @echo Linking smbrun
588         @$(CC) $(CFLAGS) -o smbrun smbrun.o $(LIBS)
590 nmblookup: nmblookup.o namequery.o nmblib.o $(UTILOBJ)  
591         @echo Linking nmblookup
592         @$(CC) $(CFLAGS) -o nmblookup nmblookup.o namequery.o nmblib.o $(UTILOBJ) $(LIBS)
594 nmbd: nmbd.o $(NMBDOBJ)
595         @echo Linking nmbd
596         @$(CC) $(CFLAGS) -o nmbd nmbd.o $(NMBDOBJ) $(LIBS)
598 smbclient: client.o clitar.o getsmbpass.o namequery.o nmblib.o $(UTILOBJ) 
599         @echo Linking smbclient
600         @$(CC) $(CFLAGS) -o smbclient client.o clitar.o getsmbpass.o namequery.o nmblib.o $(UTILOBJ) $(LIBS)
602 smbstatus: status.o $(PARAMOBJ) 
603         @echo Linking smbstatus
604         @$(CC) $(CFLAGS) -o smbstatus status.o $(PARAMOBJ) $(LIBS)
606 testparm: testparm.o $(PARAMOBJ)
607         @echo Linking testparm
608         @$(CC) $(CFLAGS) -o testparm testparm.o $(PARAMOBJ) $(LIBS)
610 testprns: testprns.o $(PARAMOBJ)
611         @echo Linking testprns
612         @$(CC) $(CFLAGS) -o testprns testprns.o $(PARAMOBJ) $(LIBS)
614 smbpasswd: smbpasswd.o getsmbpass.o $(PARAMOBJ)
615         @echo Linking smbpasswd
616         @$(CC) $(CFLAGS) -o smbpasswd smbpasswd.o getsmbpass.o $(PARAMOBJ) $(LIBS)
618 install: installbin installman installscripts
620 installbin: all
621         @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
622         @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
624 installscripts:
625         @$(SHELL) $(srcdir)installscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
627 # revert to the previously installed version
628 revert:
629         @$(SHELL) $(srcdir)revert.sh $(SBINDIR) $(SPROGS) $(SCRIPTS)
630         @$(SHELL) $(srcdir)revert.sh $(BINDIR) $(PROGS) $(SCRIPTS)
632 installman:
633         @$(SHELL) $(srcdir)installman.sh $(MANDIR) $(srcdir)
635 uninstall: uninstallman uninstallbin uninstallscripts
637 uninstallman:
638         @$(SHELL) $(srcdir)uninstallman.sh $(MANDIR) $(srcdir)
640 uninstallbin:
641         @$(SHELL) $(srcdir)uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
642         @$(SHELL) $(srcdir)uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
644 uninstallscripts:
645         @$(SHELL) $(srcdir)uninstallscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
647 clean:
648         rm -f core *.o *~ $(PROGS) $(SPROGS)
650 proto:
651         @$(SHELL) $(srcdir)checkos.sh $(FLAGSM)
652         $(AWK) -f mkproto.awk *.c > proto.h
654 realclean: clean