8caa9ba212f6b22ef78e4a6b19a7ed3e15e4bc33
[samba.git] / packaging / SGI / Makefile
1 ###########################################################################
2 # Makefile for Samba SMB client/server for unix
3 # Copyright Andrew Tridgell 1992-1996
4 # Copyright John H Terpstra 1995-1997
5 ###########################################################################
6
7 # The base directory for all samba files
8 BASEDIR = /usr/samba
9
10 # The base manpages directory to put the man pages in
11 # Note: $(MANDIR)/man1, $(MANDIR)/man5 and $(MANDIR)/man8 must exist.
12 MANDIR = /usr/share/man
13
14 # The directories to put things in. If you use multiple
15 # architectures or share the samba binaries across NFS then
16 # you will probably want to change this layout.
17 # Note: The SBINDIR is for files you do not want users to access
18 #       normally only applies to nmbd and smbd
19 #       SBINDIR implies a secure binary directory
20 BINDIR = $(BASEDIR)/bin
21 SBINDIR = $(BASEDIR)/bin
22 LIBDIR = $(BASEDIR)/lib
23 VARDIR = $(BASEDIR)/var
24
25 # The permissions to give the executables
26 INSTALLPERMS = 0755
27
28 # Add any optimisation or debugging flags here
29 # add -DSYSLOG for syslog support
30 # RPM_OPT_FLAGS is needed when building an RPM distribution package
31 # for RedHat Linux.
32 # FLAGS1 = $(RPM_OPT_FLAGS)
33 FLAGS1 = -O
34 LIBS1 = 
35
36 # You will need to use a ANSI C compiler. This means under SunOS 4 you can't 
37 # use cc, instead you will have to use gcc. 
38 # CC = gcc
39
40 # This may help with some versions of make
41 SHELL = /bin/sh
42
43 # The following can be useful for compiling on multiple architectures
44 # just uncommment them putting the right directory in.
45 # srcdir=./
46 # VPATH=$(srcdir)
47
48 # set these to where to find various files
49 # These can be overridden by command line switches (see smbd(8))
50 # or in smb.conf (see smb.conf(5))
51 SMBLOGFILE = $(VARDIR)/log.smb
52 NMBLOGFILE = $(VARDIR)/log.nmb
53 CONFIGFILE = $(LIBDIR)/smb.conf
54 LMHOSTSFILE = $(LIBDIR)/lmhosts
55
56 # the directory where lock files go
57 LOCKDIR = $(VARDIR)/locks
58
59 # set this to the default group you want your machine to appear in
60 # for browsing. This can also be set in nmbd (see nmbd(8))
61 WORKGROUP = WORKGROUP
62
63 # set this to the name of the default account, which is the one
64 # to use when no username or password is specified.  This can be overridden
65 # in the runtime configuration file (see smb.conf(5))
66 # NOTE: The account "nobody" may not be a good one as
67 # on many unixes it may not be able to print. Thus you
68 # might have to create a separate guest account that can print.
69 GUESTACCOUNT = nobody
70
71 # where you are going to have the smbrun binary. This defaults to the 
72 # install directory. This binary is needed for correct printing
73 # and magic script execution. This should be an absolute path!
74 # Also not that this should include the name "smbrun" on the end (the
75 # name of the executable)
76 SMBRUN = $(BINDIR)/smbrun
77
78 #
79 # The following (PAM, AFS, DCE/DFS, Kerberos5, SMB) are the
80 # alternate choices for Samba authentication. If you are using
81 # the UNIX password database to authenticate users you do not
82 # need to uncomment any of them. If you wish to use one of these
83 # alternate methods then only uncomment one of them.
84
85 # This is for PAM authentication. RedHat Linux uses PAM.
86 # If you use PAM, then uncomment the following lines:
87 # PAM_FLAGS = -DUSE_PAM
88 # PAM_LIBS = -ldl -lpam
89
90 # This is for AFS authentication.  If you use AFS then set AFS_BASE 
91 # according to your system layout, and uncomment the other lines as well.
92 # AFS_BASE = /usr/afsws
93 # AFS_FLAGS = -DAFS_AUTH -I$(AFS_BASE)/include
94 # AFS_LIBDIR = $(AFS_BASE)/lib
95 # NOTE: You may need to add -laudit in the line below
96 # AFS_LIBS = -L$(AFS_LIBDIR) -L$(AFS_LIBDIR)/afs -lkauth -lprot -lubik \
97 #                -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err \
98 #                $(AFS_LIBDIR)/afs/util.a
99
100 # This is for DCE/DFS enablement. Uncomment this so that smbd can
101 # operate as an authenticated user identity to operate on files that
102 # live in the DCE Distributed Filesystem.
103 # DCE_BASE = /opt/dcelocal
104 # DCE_FLAGS = -I$(DCE_BASE)/include
105 # DCE_LIBDIR = -L$(DCE_BASE)/lib
106 # DCE_LIBS =
107
108 # This is for Kerberos 5 authentication. Contributed by Nathan Neulinger
109 # Univ. of Missouri - Rolla <nneul@umr.edu>
110 # KRB5_BASE = /usr/local/krb5
111 # KRB5_FLAGS = -DKRB5_AUTH -I$(KRB5_BASE)/include
112 # KRB5_LIBS = -L$(KRB5_BASE)/lib -ldes425 -lkrb5 -lcrypto -lcom_err
113
114 # This is for SMB encrypted (lanman) passwords.
115 # you may wish to add -DREPLACE_GETPASS if your getpass() is limited
116 # to 8 chars
117 # DES_BASE=/usr/local/libdes
118 # DES_FLAGS= -I$(DES_BASE)
119 # DES_LIB= -L$(DES_BASE) -ldes
120 # PASSWD_FLAGS=-DUSE_LIBDES -DSMB_PASSWD=\"$(BINDIR)/smbpasswd\" -DSMB_PASSWD_FILE=\"$(BASEDIR)/private/smbpasswd\"
121
122 ######################################
123 # VTP-Support
124 #
125 # uncomment the following two lines to enable VTP-Support
126 #VTP_FLAGS = -DWITH_VTP
127 #VTP_OBJ = vt_mode.o
128 ######################################
129
130 ######################################
131 # WHICH AWK? awk is used for automatic prototype generation. GNU awk works
132 # where inferior awks don't. Sun is one manufacturer who supplies both
133 # a broken awk called 'awk' and a fixed one called 'nawk'. mkproto.awk will
134 # only work with the latter, and even that isn't as good as free GNU awk.
135 #
136 # Leave this uncommented; the OS-specific stuff will override it if required
137 AWK = awk
138 ######################################
139
140 #####################################
141 # WHICH OPERATING SYSTEM?
142 # UNCOMMENT ONE OF THE SECTIONS BELOW
143 # MAKE SURE ONLY *ONE* IS UNCOMMENTED
144 #
145 # The following are additional flags that may apply
146 #   -DNETGROUP if your machine supports yp netgroups
147 #   -DAUTOMOUNT to ask for yp auto.home for users' home directories
148 #   -DSHADOW_PWD if you are using shadow passwords
149 #   -DGETPWANAM if you wish to use getpwanam() call
150 #   -DPWDAUTH if you have and want to use the pwdauth() call
151 #   -DUFC_CRYPT if you want the fast crypt routine
152 #   -DALLOW_CHANGE_PASSWORD if you want users to be able to set their password
153 #                           remotely (only works on some systems)
154 #   -DQUOTAS for quota support in disk_free(). This probably only works 
155 #            on some systems.
156 #   -DFAST_SHARE_MODES if you want the fast shared memory instead of the
157 #                      slow description files for share mode locking. This
158 #                      requires the mmap() and fcntl() system calls.
159 #
160 #    NOTE: GETPWANAM & PWDAUTH are mutually exclusive, if you
161 #          Define one, you should NOT define the other.
162 #####################################
163
164 #####################################
165 # for the JAPANESE EXTENSION
166 # select filename's code set for KANJI/KANA in UNIX,
167 # apply the following flag
168 #   -DKANJI=\"<code>\"
169 #        <code> is select character code set for JAPAN.
170 #             sjis:   if your machine support SJIS
171 #             euc:      if your machine support EUC
172 #             jis7:     if your machine support JIS7
173 #             jis8:     if your machine support JIS8
174 #             junet:    if your machine support jis7 + junet rule
175 #             hex:      if your machine only support 7 bits ascii filename only
176 #                       convert to hexdecimal code preseeding ':'.
177 # see also README.jis
178 ######################################
179
180
181 # This is for SUNOS 4. Use the SUNOS5 entry for Solaris 2.
182 # Note that you cannot use Suns "cc" compiler
183 # as it's not an Ansi-C compiler. Get gcc or acc. 
184 # Note that if you have adjunct passwords you may need the GETPWANAM 
185 # or PWDAUTH option. There have been reports that using PWDAUTH may crash
186 # your pwdauthd server so GETPWANAM is preferable (and probably faster)
187 # contributed by Andrew.Tridgell@anu.edu.au
188 # FLAGSM = -DSUNOS4
189 # LIBSM =   
190 # AWK = nawk 
191
192 # Use this for Linux with shadow passwords
193 # contributed by Andrew.Tridgell@anu.edu.au
194 # add -DLINUX_BIGCRYPT is you have shadow passwords but don't have the
195 # right libraries and includes
196 # FLAGSM = -DLINUX -DSHADOW_PWD -DFAST_SHARE_MODES
197 # LIBSM = -lshadow
198
199 # Use this for Linux without shadow passwords
200 # contributed by Andrew.Tridgell@anu.edu.au
201 # AXPROC defines DEC Alpha Processor
202 # FLAGSM = -DLINUX -DAXPROC -DFAST_SHARE_MODES
203 # FLAGSM = -DLINUX -DFAST_SHARE_MODES
204 # LIBSM = 
205
206 # Use this for Linux with shadow passwords and quota
207 # contributed by xeno@mix.hive.no
208 # Tested on the 1.3.57 kernel and ext2fs filesystem.
209 # Notes:
210 # /usr/include/sys/quota.h must be a symlink to /usr/include/linux/quota.h
211 # The directory quota here must be a symlink to your quota package.
212 # I just do 'ln -sf /usr/src/quota-1.50 quota' in this directory to get it to work.
213 # FLAGSM = -O3 -m486 -DLINUX -DSHADOW_PWD -DQUOTAS -DFAST_SHARE_MODES
214 # LIBSM = -lshadow
215
216 # Use this for Linux with quota and glibc2
217 # contributed by Thorvald Natvig <slicer@bimbo.hive.no>
218 # Tested on the 2.0.30 kernel and ext2fs filesystem.
219 # FLAGSM = -DLINUX -DQUOTAS -DNO_ASMSIGNALH -DGLIBC2 -DFAST_SHARE_MODES
220 # LIBSM = -L/lib/libc5-compat -lcrypt
221
222 # This is for SUNOS5.4 and later (also known as Solaris 2.4 and later)
223 # contributed by Andrew.Tridgell@anu.edu.au
224 # FLAGSM = -DSUNOS5 -DSHADOW_PWD -DNETGROUP -DFAST_SHARE_MODES
225 # LIBSM = -lsocket -lnsl
226 # AWK = nawk 
227
228 # This is for SUNOS 5.2 and 5.3 (also known as Solaris 2.2 and 2.3)
229 # contributed by hdsi@newtech.net
230 # FLAGSM = -DSUNOS5 -DSHADOW_PWD -DNETGROUP -DNO_STRFTIME -DFAST_SHARE_MODES
231 # LIBSM = -lsocket -lnsl
232 # AWK = nawk 
233
234 # This is for UXP/DS
235 # contributed by dsfrost@oai6.yk.fujitsu.co.jp
236 # FLAGSM = -DSVR4 -DSHADOW_PWD
237 # LIBSM = -lsocket -lnsl
238
239 # This is for SVR4
240 # Contributed by mark@scot1.ucsalf.ac.uk
241 # FLAGSM = -DSVR4 -DSHADOW_PWD -DALLOW_CHANGE_PASSWORD
242 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
243
244
245 # This is for the Motorola 88xxx/9xx range of machines
246 # Contributed by RPE@monnet.com
247 # FLAGSM = -DSVR4 -DSHADOW_PWD -DGETTIMEOFDAY1
248 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
249
250
251 # This is for UnixWare 1.x.
252 # Contributed by Warren Young <tkennedy@cyberport.com>
253 #FLAGSM = -Xa -DSVR4 -DSHADOW_PWD
254 #LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
255
256 # This is for UnixWare 2.x WITH libdes support.
257 # Contributed by tangent@cyberport.com
258 #FLAGSM = -Xa -DSVR4
259 #LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
260
261 # This is for UnixWare 2.x WITHOUT libdes support.
262 # Contributed by tangent@cyberport.com
263 #FLAGSM = -Xa -DSVR4 -DIA_UINFO
264 #LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb -lcrypt -liaf
265
266 # This is for UNIXWARE 2.x with shadow passwords.
267 # Contributed by fja@extratech.com
268 #FLAGSM = -Xa -DSVR4 -DSHADOW_PWD
269 #LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb -lcrypt -lgen
270
271 # This is for ULTRIX. Add -DULTRIX_AUTH for Ultrix enhanced security.
272 # contributed by iversen@dsfys1.fi.uib.no
273 # FLAGSM = -DULTRIX
274 # LIBSM =   
275
276
277 # This is for OSF1 (Alpha)
278 # contributed by errath@balu.kfunigraz.ac.at
279 # NOTE: You may need -warning_unresolved if you get unresolved symbols
280 # FLAGSM = -DOSF1
281 # LIBSM =
282
283 # This is for OSF1 with DCE/DFS
284 # contributed by Jim Doyle <doyle@oec.com>
285 # FLAGSM = -DOSF1 -DDFS_AUTH -DSIGCLD_IGNORE -DNO_SIGNAL_TEST
286 # LIBSM = -ldce -lpthreads -lmach -lc_r
287
288 # This is for OSF1 (Alpha) with NIS and Fast Crypt
289 # contributed by David Gardiner <dgardine@cssip.edu.au>
290 # FLAGSM = -DOSF1 -DNETGROUP -DUFC_CRYPT
291 # LIBSM =
292
293
294 # This is for OSF1 (Alpha) V2.0 Enhanced Security 
295 # contributed by Udo Linauer <ul@eacpc4.tuwien.ac.at>
296 # FLAGSM = -DOSF1 -DOSF1_ENH_SEC
297 # LIBSM = -lsecurity
298
299
300 # This is for AIX 4.x
301 # contributed by tomc@osi.curtin.edu.au
302 # FLAGSM = -DAIX -DFAST_SHARE_MODES
303 # LIBSM =   
304
305 # This is for AIX 4.x with quota support
306 # contributed by tomc@osi.curtin.edu.au
307 # FLAGSM = -DAIX -DFAST_SHARE_MODES -DQUOTAS
308 # LIBSM =   
309
310 # This is for AIX 3.2.5 with DCE/DFS
311 # contributed by Jim Doyle <doyle@oec.com>
312 # FLAGSM = -DAIX -DDFS_AUTH -DSIGCLD_IGNORE -DNO_SIGNAL_TEST
313 # LIBSM = -lc_r -ldce -lpthreads
314 # CC = cc_r
315
316 # This is for BSDI 
317 # contributed by tomh@metrics.com
318 # versions of BSDI prior to 2.0 may need to add -DUSE_F_FSIZE for 
319 # disk usage stats to be correct
320 # FLAGSM = -DBSDI -DFAST_SHARE_MODES
321 # LIBSM =   
322
323
324 # This is for NetBSD. Add -DNETBSD_1_0 if you are using 1.0
325 # contributed by noses@oink.rhein.de
326 # FLAGSM = -DNETBSD -DSHADOW_PWD
327 # LIBSM = -lcrypt 
328
329
330 # This is for SEQUENT. 
331 # Contributed by fwk@ix.netcom.com (Frank Keeney) and 
332 # rpwillia@Pentagon-EMH6.army.mil (Ray Williams)
333 # tested on DYNIX/ptx(R) V2.1.0
334 # FLAGSM = -DSEQUENT -DSHADOW_PWD -DHAVE_TIMEZONE
335 # LIBSM = -lrpc -lsocket -lPW -linet -lnsl -lseq -lsec
336
337
338 # This is for SEQUENT PTX 4.1.x
339 # Contributed by bressler@iftccu.ca.boeing.com (Rick Bressler)
340 # based on Keeny and Williams contribution.
341 # tested on DYNIX/ptx(R) V4.1.3
342 # FLAGSM = -DSEQUENT -DSHADOW_PWD -DHAVE_TIMEZONE -DPTX4
343 # LIBSM = -lrpc -lsocket -lPW -lnsl -lseq -lsec
344
345
346 # This is for HP-UX. Note that some systems don't like the -Aa switch.
347 # contributed by Pasi.Kaara@atk.tpo.fi
348 # You will need -DREPLACE_GETPASS if you use smb encryption
349 # Add -DHPUX10 if compiling on HPUX 10.x
350 # FLAGSM = -DHPUX -Aa -D_HPUX_SOURCE -D_POSIX_SOURCE
351 # LIBSM = 
352
353 # This is for HP-UX with DCE/DFS
354 # contributed by Jim Doyle <doyle@oec.com>
355 # Add -DHPUX10 if compiling on HPUX 10.x
356 # FLAGSM = -DHPUX -Aa -D_HPUX_SOURCE -D_POSIX_SOURCE -DDFS_AUTH -D_REENTRANT -I/usr/include/reentrant
357 # LIBSM = -ldce -lM -lc_r
358
359 # HP-UX 10.x Trusted System
360 # Contributed by David-Michael Lincke (dlincke@sgcl1.unisg.ch)
361 # FLAGSM = +O3 -Ae -DHPUX -DHPUX10 -DHPUX_10_TRUSTED
362 # LIBSM = -lsec
363
364
365 # This is for SGI.
366 # contributed by lpc@solomon.technet.sg (Michael Chua)
367 # FOR SGI IRIX 4.x.x, use the following line
368 # FLAGSM = -DSGI -DHAVE_TIMEZONE 
369 # LIBSM = -lsun
370
371 # FOR SGI IRIX 5.x.x, use this line instead
372 # FLAGSM = -DSGI5 -DSHADOW_PWD -DHAVE_TIMEZONE -DFAST_SHARE_MODES
373 # LIBSM =
374
375 # FOR SGI IRIX 6.2 using the system compiler (*NOT* gcc), use this line instead
376 # Contributed by David.Billinghurst@restech.cra.com.au
377 FLAGSM = -DSGI5 -DSHADOW_PWD -DHAVE_TIMEZONE -DFAST_SHARE_MODES
378 LIBSM = 
379 FLAGS1 = -O -n32 -g3
380
381 # This is for FreeBSD
382 # contributed by kuku@acds.physik.rwth-aachen.de
383 # NOTE: You may need to add -DBSD44 if you have password problems
384 # FLAGSM = -DFreeBSD -DFAST_SHARE_MODES
385 # LIBSM = -lcrypt 
386
387
388 # This is for NEXTSTEP Release 2.X
389 # No Posix.
390 # contributed by brad@cac.washington.edu (Brad Greer)
391 # FLAGSM = -DNEXT2 
392 # LIBSM = 
393
394 # This is for NEXTSTEP Release 3.0 and greater (including OPENSTEP for Mach).
395 # contributed by brad@cac.washington.edu (Brad Greer)
396 # additional configuration by pmarcos@next.com (Paul Marcos)
397 # For compiling n-way fat executables, you should append the appropriat -arch 
398 # flags to the FLAGSM variable.  Valid flags are:
399 #    -arch m68k
400 #    -arch i386
401 #    -arch hppa
402 #    -arch sparc
403 # To compile 4-way fat, you would append
404 #    -arch m68k -arch i386 -arch hppa -arch sparc
405 # FLAGSM = -DNEXT3_0
406 # LIBSM = 
407
408
409 # NOTE: ISC is also known as "INTERACTIVE"
410 # This is for Sunsoft ISC SVR3V4 running in POSIX mode
411 # contributed by pim@cti-software.nl (Pim Zandbergen)
412 # FLAGSM = -posix -D_SYSV3 -DISC -DSHADOW_PWD
413 # LIBSM = -lsec -lcrypt -linet
414
415 # This is for Sunsoft ISC SVR3V4 running in iBCS2 mode
416 # contributed by pim@cti-software.nl (Pim Zandbergen)
417 # FLAGSM = -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_SYSV3\
418 #          -DISC -DSHADOW_PWD -DREPLACE_GETWD -DREPLACE_RENAME
419 # LIBSM = -lsec -lcrypt -linet -lcposix
420
421
422 # This is for A/UX 3.0
423 # Contributed by root@dolphin.csudh.edu (Jon S. Stevens)
424 # FLAGSM = -DAUX
425 # LIBSM =
426
427 # This is for Altos Series 386/1000
428 # Contributed by cal@zls.com
429 # FLAGSM = -DALTOS -DHAS_RDCHK
430 # LIBSM = -lsocket -lxenix
431
432
433 #Note: The SCO entries require the libcrypt library. You can get it via
434 #anonymous ftp from ftp.sco.com:/SLS/lng225b.* or ftp.uu.net:/vendors/sco
435 #
436 # Use this for SCO with shadow passwords. Tested on "Open enterprise 3.0"
437 # SCO changes from Heinz Mauelshagen (mauelsha@ez.da.telekom.de)
438 # FLAGSM = -DSCO -DSHADOW_PWD -DNETGROUP
439 # LIBSM = -lyp -lrpc -lyp -lsec -lsocket -lcrypt_i -lintl
440
441 # Use this for SCO with shadow passwords, without YP.
442 # Tested on "Open Enterprise Server 3.0" (John Owens john@micros.com)
443 # Also, use "CC = cc" above.
444 # FLAGSM = -DSCO -DSHADOW_PWD
445 # LIBSM = -lsec -lsocket -lcrypt_i
446
447 # Use this for SCO with TCB passwords (default).
448 # Tested on "Open enterprise 3.0". Contributed by lance@fox.com.
449 # CC     = cc
450 # FLAGSM = -DSCO -DSecureWare
451 # LIBSM  = -lprot_s -lcrypt -lsocket -lm -lc_s
452
453 # Use this for SCO Unix 3.2v2 (ODT 1.1) with TCB passwords (default).
454 # Contributed by Stephen.Rothwell@pd.necisa.oz.au
455 # N.B. this needs gcc
456 # FLAGSM = -DSCO -DSecureWare -DSCO3_2_2
457 # LIBSM  = -lprot -lcrypt_i -lsocket -lm -lintl
458
459 # This is for the european distribution of SCO. 
460 # Contributed by Urmet.Janes@gwhite.goodwin.ee
461 # FLAGSM = -DSCO -DSHADOW_PWD 
462 # LIBSM = -lsec -lsocket /usr/lib/libcrypt_i.a -lintl
463
464 # Use this for SCO OpenServer 5 with TCB passwords (default).
465 # contributed by Scott Michel <scottm@intime.intime.com>
466 # you may also like to add the -dy switch (recommended by Marnus van 
467 # Niekerk, mvn@pixie.co.za)
468 # CC     = cc -Xc
469 # FLAGSM = -DSCO -DSecureWare -DEVEREST -DUSE_MMAP
470 # LIBSM  = -lprot -lcurses -lcrypt -lsocket -lPW -lm -lx -lc_s -lc
471
472
473 # This is for intergraph. 
474 # contributed by cjkiick@flinx.b11.ingr.com
475 # modified by ttj@sknsws61.sjo.statkart.no
476 # FLAGSM = -DCLIX -D_INGR_EXTENSIONS=1
477 # LIBSM = -lbsd -lc_s
478
479 # This is for DGUX. 
480 # Contributed by ross@augie.insci.com (Ross Andrus)
481 # FLAGSM = -DDGUX 
482 # LIBSM  = 
483
484 # This is for DGUX on Intel boxes.
485 # Contributed by tim@denmantire.com
486 # FLAGSM = -DDGUX 
487 # LIBSM  = -lsocket -lnsl -lresolv
488
489 # This is for Apollo Domain/OS sr10.3 (systype = BSD4.3)
490 # Added 1994-07-08 Stephen C. Steel <steve@qv3donald.LeidenUniv.nl>
491 # additional patches by jmi@csd.cri.dk (John Mills)
492 # you may need the "-A ansi" switch to cc
493 # FLAGSM = -DAPOLLO -D_INCLUDE_BSD_SOURCE -D_INCLUDE_XOPEN_SOURCE
494 # LIBSM =
495
496
497 # RiscIX. 
498 # contributed by Jim Barry <jim@ilp.com> and 
499 # Charles Gay-Jones <charlie@ilp.com>
500 # FLAGSM = -DRiscIX -DNOSTRDUP
501 # LIBSM =
502
503
504 # This is for System V with some berkely extensions (Motorola 88k R32V3.2).
505 # contributed by tonyb@plaza.ds.adp.com (Tony D. Birnseth)
506 # FLAGSM = -DM88K_R3
507 # LIBSM = -lgen -lbsd -lnsl
508
509
510 # This is for DNIX.
511 # contributed by Peter Olsson <pol@leissner.se>
512 # NOTE: You may need an updated libc.a from your vendor as older
513 # versions have broken mktime calls and no initgroups() call
514 # NOTE2: You may need -lpasswd if you use shadow passwords
515 # NOTE3: Please read the file DNIX.txt in the docs directory. It
516 # contains important information about uid handling under DNIX, you may
517 # need to patch your C library.
518 # FLAGSM = -DDNIX -I/usr/include/bsd
519 # LIBSM = -ln
520
521
522 # This is for Cray, Unicos 8.0
523 # contributed by velo@sesun3.epfl.ch (Martin Ouwehand)
524 # FLAGSM = -DCRAY -U__STDC__ -DQUOTAS
525 # LIBSM =
526
527 # This is for Convex
528 # contributed by Victor Balashov <balashov@cv.jinr.dubna.su>
529 # and Ulrich Hahn <ulrich.hahn@zdv.uni-tuebingen.de>
530 # FLAGSM= -DCONVEX -DSHADOW_PWD
531 # LIBSM= 
532
533 # This is for SMP_DC.OSx v1.1-94c079 on Pyramid S series
534 # contributed by jeffrey@itm.org
535 # FLAGSM = -DSOLARIS -DSHADOW_PWD -DBSD_COMP
536 # LIBSM = -lsocket -lnsl
537
538 # This is for QNX 4.22
539 # Contributed by eldo@invisa.satlink.net (Eldo Loguzzo)
540 # FLAGSM = -DQNX -DGUEST_SESSSETUP=1
541 # LIBSM =
542
543
544 # This is for SONY NEWS, NEWS-OS 4.2.x
545 # contributed by sky@sm.sony.co.jp (Katushi Sato)
546 # FLAGSM = -DNEWS42 -DKANJI=\"sjis\"
547 # LIBSM =
548
549
550 # This is for SONY NEWS, NEWS-OS 6.1.x
551 # contributed by kobo@sm.sony.co.jp (Yoichi Kobori)
552 # FLAGSM = -Xa -DSVR4 -DNEWS61 -DSHADOW_PWD -DNETGROUP -DGETTIMEOFDAY1 -DKANJI=\"euc\"\ -D_SONYILS_H
553 # LIBSM = -lsocket -lnsl
554
555
556 # This is for OS/2 using EMX 
557 # Contributed by jasonr@pec.co.nz (Jason Rumney)
558 # Now maintained by Jacco de Leeuw <leeuw@wins.uva.nl>
559 # FLAGSM = -DOS2
560 # LIBSM = -Zexe -lsocket
561
562
563 # This is for LYNX 2.3.0 (gcc v2.6)
564 # Contributed by woelfel@hpe.fzk.de (Manfred Woelfel)
565 # FLAGSM = -DLYNX -DUFC_CRYPT -mposix
566 # LIBSM = -lbsd
567
568
569 # This is for MachTen (a unix like system for Macintoshes)
570 # contributed by Trevor Strohman (trev@figment.tenon.com)
571 # FLAGSM = -DMACHTEN
572 # LIBSM =
573
574
575 # RISCOs 5.0B
576 # contributed by John Agnew <johna@bfs.Unibol.COM>
577 # FLAGSM = -systype svr4 -std -DSVR4
578 # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
579
580
581 # This is for B.O.S. (Bull Operating System)
582 # Contributed by koine@fileita.it
583 # FLAGSM = -DBOS -DNO_RESOURCEH -DUSE_WAITPID
584 # LIBSM = -linet
585
586
587 # This for Amiga using GCC and ixemul.library 43.0 or later.
588 # contributed by Rask Ingemann Lambertsen <rask@k4315.kampsax.dtu.dk>
589 # The binaries will support both AmiTCP and AS225R2 compatible
590 # protocol stacks because of the use of ixnet.library.
591 # Other protocol stacks will be supported automatically if
592 # support for them is added to ixnet.library.
593 # The binaries will have automatic stack extension :-)
594 # smbd must be run from inetd :-(
595 # FLAGSM = -DAMIGA -Dfork=vfork -mstackextend
596 # LIBSM =
597
598
599
600 ######################################################################
601 # DON'T EDIT BELOW THIS LINE
602 ######################################################################
603
604 CFLAGS1 = $(FLAGS1) -DSMBLOGFILE=\"$(SMBLOGFILE)\" -DNMBLOGFILE=\"$(NMBLOGFILE)\"
605 CFLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" 
606 CFLAGS3 = -DLOCKDIR=\"$(LOCKDIR)\" -DSMBRUN=\"$(SMBRUN)\"
607 CFLAGS4 = -DWORKGROUP=\"$(WORKGROUP)\" -DGUEST_ACCOUNT=\"$(GUESTACCOUNT)\" 
608 CFLAGS5 = $(CFLAGS1) $(CFLAGS2) $(CFLAGS3) $(CFLAGS4) $(FLAGSM) $(AFS_FLAGS) $(KRB5_FLAGS)
609 CFLAGS  = $(CFLAGS5) $(PAM_FLAGS) $(DCE_FLAGS) $(DES_FLAGS) $(PASSWD_FLAGS) $(VTP_FLAGS)
610 LIBS = $(LIBS1) $(LIBSM) $(PAM_LIBS) $(DCE_LIBS) $(KRB5_LIBS) $(DES_LIB)
611
612 SPROGS = smbd nmbd
613 PROGS1 = smbclient testparm testprns smbrun smbstatus smbpasswd 
614 PROGS = $(PROGS1) nmblookup
615 SCRIPTS = smbtar addtosmbpass
616
617 all : CHECK $(SPROGS) $(PROGS) 
618
619 CHECK :
620         @$(SHELL) $(srcdir)checkos.sh $(FLAGSM)
621         @echo "Using CFLAGS = $(CFLAGS)"
622         @echo "Using LIBS = $(LIBS)"
623
624 INCLUDES1 = version.h local.h includes.h smb.h 
625 INCLUDES2 = trans2.h 
626 INCLUDES = $(INCLUDES1) $(INCLUDES2)
627
628 UTILOBJ1 = util.o system.o charset.o kanji.o fault.o smbencrypt.o charcnv.o
629 UTILOBJ2 = $(UTILOBJ1) md4.o loadparm.o params.o pcap.o username.o time.o
630 UTILOBJ = $(UTILOBJ2) interface.o replace.o
631 PARAMOBJ = $(UTILOBJ) ufc.o smbpass.o access.o shmem.o
632 SMBDOBJ1 = $(PARAMOBJ) trans2.o pipes.o message.o dir.o printing.o locking.o
633 SMBDOBJ2 = ipc.o reply.o mangle.o chgpasswd.o password.o quotas.o uid.o
634 SMBDOBJ = predict.o $(SMBDOBJ1) $(SMBDOBJ2) $(VTP_OBJ)
635 NMBDOBJ1 = nmblib.o namepacket.o nameresp.o nmbsync.o nameannounce.o nameelect.o
636 NMBDOBJ2 = namedbresp.o namedbwork.o namedbserver.o namedbsubnet.o namedbname.o 
637 NMBDOBJ3 = nameservresp.o nameservreply.o namelogon.o namebrowse.o namework.o nameserv.o clientutil.o
638 NMBDOBJ = $(UTILOBJ) $(NMBDOBJ1) $(NMBDOBJ2) $(NMBDOBJ3)
639 .SUFFIXES:
640 .SUFFIXES: .c .o .h
641
642 .c.o: $(INCLUDES)
643         @echo Compiling $*.c
644         @$(CC) $(CFLAGS) -c $(srcdir)$*.c
645
646 smbd: server.o $(SMBDOBJ)
647         @echo Linking smbd
648         @$(CC) $(CFLAGS) -o smbd server.o $(SMBDOBJ) $(LIBS) $(AFS_LIBS)
649
650 smbrun: smbrun.o
651         @echo Linking smbrun
652         @$(CC) $(CFLAGS) -o smbrun smbrun.o $(LIBS)
653
654 nmblookup: nmblookup.o namequery.o nmblib.o $(UTILOBJ)  
655         @echo Linking nmblookup
656         @$(CC) $(CFLAGS) -o nmblookup nmblookup.o namequery.o nmblib.o $(UTILOBJ) $(LIBS)
657
658 nmbd: nmbd.o $(NMBDOBJ)
659         @echo Linking nmbd
660         @$(CC) $(CFLAGS) -o nmbd nmbd.o $(NMBDOBJ) $(LIBS)
661
662 smbclient: client.o clitar.o getsmbpass.o namequery.o nmblib.o $(UTILOBJ) 
663         @echo Linking smbclient
664         @$(CC) $(CFLAGS) -o smbclient client.o clitar.o getsmbpass.o namequery.o nmblib.o $(UTILOBJ) $(LIBS)
665
666 smbstatus: status.o $(PARAMOBJ) 
667         @echo Linking smbstatus
668         @$(CC) $(CFLAGS) -o smbstatus status.o $(PARAMOBJ) $(LIBS)
669
670 testparm: testparm.o $(PARAMOBJ)
671         @echo Linking testparm
672         @$(CC) $(CFLAGS) -o testparm testparm.o $(PARAMOBJ) $(LIBS)
673
674 testprns: testprns.o $(PARAMOBJ)
675         @echo Linking testprns
676         @$(CC) $(CFLAGS) -o testprns testprns.o $(PARAMOBJ) $(LIBS)
677
678 smbpasswd: smbpasswd.o getsmbpass.o $(PARAMOBJ)
679         @echo Linking smbpasswd
680         @$(CC) $(CFLAGS) -o smbpasswd smbpasswd.o getsmbpass.o $(PARAMOBJ) $(LIBS)
681
682 install: installbin installman installscripts
683
684 installbin: all
685         @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
686         @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
687
688 installscripts:
689         @$(SHELL) $(srcdir)installscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
690
691 # revert to the previously installed version
692 revert:
693         @$(SHELL) $(srcdir)revert.sh $(SBINDIR) $(SPROGS) $(SCRIPTS)
694         @$(SHELL) $(srcdir)revert.sh $(BINDIR) $(PROGS) $(SCRIPTS)
695
696 installman:
697         @$(SHELL) $(srcdir)installman.sh $(MANDIR) $(srcdir)
698
699 uninstall: uninstallman uninstallbin uninstallscripts
700
701 uninstallman:
702         @$(SHELL) $(srcdir)uninstallman.sh $(MANDIR) $(srcdir)
703
704 uninstallbin:
705         @$(SHELL) $(srcdir)uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
706         @$(SHELL) $(srcdir)uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
707
708 uninstallscripts:
709         @$(SHELL) $(srcdir)uninstallscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
710
711 clean:
712         rm -f core *.o *~ $(PROGS) $(SPROGS)
713
714 cleandir:  clean
715         rm -f .depend tags
716
717 proto:
718         @$(SHELL) $(srcdir)checkos.sh $(FLAGSM)
719         $(AWK) -f mkproto.awk *.c > proto.h
720
721 realclean: clean
722