File: Makefile

package info (click to toggle)
nat 1:1.0-6
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 524 kB
  • ctags: 1,528
  • sloc: ansic: 9,771; makefile: 79
file content (393 lines) | stat: -rw-r--r-- 12,623 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
###########################################################################
# Makefile for Samba SMB client/server for unix
# Copyright Andrew Tridgell 1992,1993,1994
###########################################################################
CC = gcc

# set this to the default group you want your machine to appear in
# for browsing. This can also be set in nmbd (see nmbd(8))
# NOTE: If you set it to * then nmbd will try to find a workgroup on
# the local net
WORKGROUP = WORKGROUP

# set this to the name of the default account, which is the one
# to use when no username or password is specified.  This can be overridden
# in the runtime configuration file (see smb.conf(5))
# NOTE: The account "nobody" may not be a good one as
# on many unixes it may not be able to print. Thus you
# might have to create a separate guest account that can print.
GUESTACCOUNT = nobody

#####################################
# WHICH OPERATING SYSTEM?
# UNCOMMENT ONE OF THE SECTIONS BELOW
# MAKE SURE ONLY *ONE* IS UNCOMMENTED
#
# The following are additional flags that may apply
#   -DNETGROUP if your machine supports yp netgroups
#   -DSHADOW_PWD if you are using shadow passwords
#   -DGETPWANAM if you wish to use getpwanam() call
#   -DPWDAUTH if you have and want to use the pwdauth() call
#   -DUFC_CRYPT if you want the fast crypt routine
#   -DALLOW_CHANGE_PASSWORD if you want users to be able to set their password
#                           remotely (only works on some systems)
#   -DQUOTAS for quota support in disk_free(). This probably only works 
#            on some systems.
#
#    NOTE: GETPWANAM & PWDAUTH are mutually exclusive, if you
#          Define one, you should NOT define the other.
#####################################

#####################################
# for the JAPANESE EXTENSION
# select filename's code set for KANJI/KANA in UNIX,
# apply the following flag
#   -DKANJI=\"<code>\"
#        <code> is select character code set for JAPAN.
#             sjis:   if your machine support SJIS
#             euc:      if your machine support EUC
#             jis7:     if your machine support JIS7
#             jis8:     if your machine support JIS8
#             junet:    if your machine support jis7 + junet rule
#             hex:      if your machine only support 7 bits ascii filename only
#                       convert to hexdecimal code preseeding ':'.
# see also README.jis
######################################


# This is for SUNOS 4. Use the SUNOS5 entry for Solaris 2.
# Note that you cannot use Suns "cc" compiler
# as it's not an Ansi-C compiler. Get gcc or acc. 
# Note that if you have adjunct passwords you may need the GETPWANAM 
# or PWDAUTH option. There have been reports that using PWDAUTH may crash
# your pwdauthd server so GETPWANAM is preferable (and probably faster)
# contributed by Andrew.Tridgell@anu.edu.au
# FLAGSM = -DSUNOS4
# LIBSM =   


# Use this for Linux with shadow passwords
# contributed by Andrew.Tridgell@anu.edu.au
# add -DLINUX_BIGCRYPT is you have shadow passwords but don't have the
# right libraries and includes
#FLAGSM = -DLINUX -DSHADOW_PWD -DNO_ASMSIGNALH
#LIBSM = -lshadow

# Use this for Linux without shadow passwords
# contributed by Andrew.Tridgell@anu.edu.au
FLAGSM = -DLINUX -DNO_ASMSIGNALH
LIBSM = 


# This is for SUNOS5 (also known as Solaris 2)
# contributed by Andrew.Tridgell@anu.edu.au
# FLAGSM = -DSUNOS5 -DSHADOW_PWD -DNETGROUP 
# LIBSM = -lsocket -lnsl


# This is for SVR4
# Contributed by mark@scot1.ucsalf.ac.uk
# FLAGSM = -DSVR4 -DSHADOW_PWD -DALLOW_CHANGE_PASSWORD
# LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb


# This is for the Motorola 88xxx/9xx range of machines
# Contributed by RPE@monnet.com
# FLAGSM = -DSVR4 -DSHADOW_PWD -DGETTIMEOFDAY1
# LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb


# This is for UNIXWARE
# FLAGSM = -Xa -DSVR4 -DSHADOW_PWD
# LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb


# This is for ULTRIX. Add -DULTRIX_AUTH for Ultrix enhanced security.
# contributed by iversen@dsfys1.fi.uib.no
# FLAGSM = -DULTRIX
# LIBSM =   


# This is for OSF1 (Alpha)
# contributed by errath@balu.kfunigraz.ac.at
# NOTE: You may need -warning_unresolved if you get unresolved symbols
# FLAGSM = -DOSF1
# LIBSM =

# This is for OSF1 (Alpha) with NIS and Fast Crypt
# contributed by David Gardiner <dgardine@cssip.edu.au>
# FLAGSM = -DOSF1 -DNETGROUP -DUFC_CRYPT
# LIBSM =


# This is for OSF1 (Alpha) V2.0 Enhanced Security 
# contributed by Udo Linauer <ul@eacpc4.tuwien.ac.at>
# FLAGSM = -DOSF1 -DOSF1_ENH_SEC
# LIBSM = -lsecurity


# This is for AIX
# contributed by tomc@osi.curtin.edu.au
# FLAGSM = -DAIX
# LIBSM =   

# This is for AIX 3.2.5 with DCE/DFS
# contributed by Jim Doyle <doyle@oec.com>
# FLAGSM = -DAIX -DDFS_AUTH -DSIGCLD_IGNORE -DNO_SIGNAL_TEST
# LIBSM = -lc_r -ldce -lpthreads
# CC = cc_r

# This is for BSDI 
# contributed by tomh@metrics.com
# versions of BSDI prior to 2.0 may need to add -DUSE_F_FSIZE for 
# disk usage stats to be correct
# FLAGSM = -DBSDI
# LIBSM =   

#
# This is for OpenBSD.
#
# FLAGSM = -DOPENBSD -DSHADOW_PWD
# LIBSM = -lcrypt 

# This is for NetBSD. Add -DNETBSD_1_0 if you are using 1.0
# contributed by noses@oink.rhein.de
# FLAGSM = -DNETBSD -DSHADOW_PWD
# LIBSM = -lcrypt 


# This is for SEQUENT. 
# Contributed by fwk@ix.netcom.com (Frank Keeney) and 
# rpwillia@Pentagon-EMH6.army.mil (Ray Williams)
# tested on DYNIX/ptx(R) V2.1.0
# FLAGSM = -DSEQUENT -DSHADOW_PWD -DHAVE_TIMEZONE
# LIBSM = -lrpc -lsocket -lPW -linet -lnsl -lseq -lsec


# This is for HP-UX. Note that some systems don't like the -Aa switch.
# contributed by Pasi.Kaara@atk.tpo.fi
# FLAGSM = -DHPUX -Aa -D_HPUX_SOURCE -D_POSIX_SOURCE
# LIBSM = 

# This is for HP-UX with DCE/DFS
# contributed by Jim Doyle <doyle@oec.com>
# FLAGSM = -DHPUX -Aa -D_HPUX_SOURCE -D_POSIX_SOURCE -DDFS_AUTH -D_REENTRANT -I/usr/include/reentrant
# LIBSM = -ldce -lM -lc_r


# This is for SGI.
# contributed by lpc@solomon.technet.sg (Michael Chua)
# FOR SGI IRIX 4.x.x, use the following line
# FLAGSM = -DSGI -DHAVE_TIMEZONE
# LIBSM = -lsun

# FOR SGI IRIX 5.x.x, use this line instead
#FLAGSM = -DSGI5 -DSHADOW_PWD -DHAVE_TIMEZONE
#LIBSM =


# This is for FreeBSD
# contributed by kuku@acds.physik.rwth-aachen.de
# NOTE: You may need to add -DBSD44 if you have password problems
# FLAGSM = -DFreeBSD
# LIBSM = -lcrypt 


# This is for NEXTSTEP Release 2.X
# No Posix.
# contributed by brad@cac.washington.edu (Brad Greer)
# FLAGSM = -DNEXT2 
# LIBSM = 

# This is for NEXTSTEP Release 3.0 and greater (including OPENSTEP for Mach).
# contributed by brad@cac.washington.edu (Brad Greer)
# additional configuration by pmarcos@next.com (Paul Marcos)
# For compiling n-way fat executables, you should append the appropriat -arch 
# flags to the FLAGSM variable.  Valid flags are:
#    -arch m68k
#    -arch i386
#    -arch hppa
#    -arch sparc
# To compile 4-way fat, you would append
#    -arch m68k -arch i386 -arch hppa -arch sparc
# FLAGSM = -DNEXT3_0
# LIBSM = 


# NOTE: ISC is also known as "INTERACTIVE"
# This is for Sunsoft ISC SVR3V4 running in POSIX mode
# contributed by pim@cti-software.nl (Pim Zandbergen)
# FLAGSM = -posix -D_SYSV3 -DISC -DSHADOW_PWD
# LIBSM = -lsec -lcrypt -linet

# This is for Sunsoft ISC SVR3V4 running in iBCS2 mode
# contributed by pim@cti-software.nl (Pim Zandbergen)
# FLAGSM = -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_SYSV3\
#          -DISC -DSHADOW_PWD -DREPLACE_GETWD -DREPLACE_RENAME
# LIBSM = -lsec -lcrypt -linet -lcposix


# This is for A/UX 3.0
# Contributed by root@dolphin.csudh.edu (Jon S. Stevens)
# FLAGSM = -DAUX
# LIBSM =

# This is for Altos Series 386/1000
# Contributed by cal@zls.com
# FLAGSM = -DALTOS -DHAS_RDCHK
# LIBSM = -lsocket -lxenix


#Note: The SCO entries require the libcrypt library. You can get it via
#anonymous ftp from ftp.sco.com:/SLS/lng225b.* or ftp.uu.net:/vendors/sco
#
# Use this for SCO with shadow passwords. Tested on "Open enterprise 3.0"
# SCO changes from Heinz Mauelshagen (mauelsha@ez.da.telekom.de)
# FLAGSM = -DSCO -DSHADOW_PWD -DNETGROUP
# LIBSM = -lyp -lrpc -lyp -lsec -lsocket -lcrypt_i -lintl

# Use this for SCO with shadow passwords, without YP.
# Tested on "Open Enterprise Server 3.0" (John Owens john@micros.com)
# Also, use "CC = cc" above.
# FLAGSM = -DSCO -DSHADOW_PWD
# LIBSM = -lsec -lsocket -lcrypt_i

# Use this for SCO with TCB passwords (default).
# Tested on "Open enterprise 3.0". Contributed by lance@fox.com.
# CC     = cc
# FLAGSM = -DSCO -DSecureWare
# LIBSM  = -lprot_s -lcrypt -lsocket -lm -lc_s

# Use this for SCO Unix 3.2v2 (ODT 1.1) with TCB passwords (default).
# Contributed by Stephen.Rothwell@pd.necisa.oz.au
# N.B. this needs gcc
# FLAGSM = -DSCO -DSecureWare -DSCO3_2_2
# LIBSM  = -lprot -lcrypt_i -lsocket -lm -lintl

# This is for the european distribution of SCO. 
# Contributed by Urmet.Janes@gwhite.goodwin.ee
# FLAGSM = -DSCO -DSHADOW_PWD 
# LIBSM = -lsec -lsocket /usr/lib/libcrypt_i.a -lintl

# Use this for SCO OpenServer 5 with TCB passwords (default).
# contributed by Scott Michel <scottm@intime.intime.com>
# CC     = cc -Xc
# FLAGSM = -DSCO -DSecureWare -DEVEREST -DUSE_MMAP
# LIBSM  = -lprot -lcurses -lcrypt -lsocket -lPW -lm -lx -lc_s -lc


# This is for intergraph. 
# contributed by cjkiick@flinx.b11.ingr.com
# modified by ttj@sknsws61.sjo.statkart.no
# FLAGSM = -DCLIX -D_INGR_EXTENSIONS=1
# LIBSM = -lbsd -lc_s

# This is for DGUX. 
# Contributed by ross@augie.insci.com (Ross Andrus)
# FLAGSM = -DDGUX 
# LIBSM  = 

# This is for Apollo Domain/OS sr10.3 (systype = BSD4.3)
# Added 1994-07-08 Stephen C. Steel <steve@qv3donald.LeidenUniv.nl>
# additional patches by jmi@csd.cri.dk (John Mills)
# you may need the "-A ansi" switch to cc
# FLAGSM = -DAPOLLO -D_INCLUDE_BSD_SOURCE -D_INCLUDE_XOPEN_SOURCE
# LIBSM =


# RiscIX. 
# contributed by Jim Barry <jim@ilp.com> and 
# Charles Gay-Jones <charlie@ilp.com>
# FLAGSM = -DRiscIX -DNOSTRDUP
# LIBSM =


# This is for System V with some berkely extensions (Motorola 88k R32V3.2).
# contributed by tonyb@plaza.ds.adp.com (Tony D. Birnseth)
# FLAGSM = -DM88K_R3
# LIBSM = -lgen -lbsd -lnsl


# This is for DNIX.
# contributed by Peter Olsson <pol@leissner.se>
# NOTE: You may need an updated libc.a from your vendor as older
# versions have broken mktime calls and no initgroups() call
# NOTE2: You may need -lpasswd if you use shadow passwords
# NOTE3: Please read the file DNIX.txt in the docs directory. It
# contains important information about uid handling under DNIX, you may
# need to patch your C library.
# FLAGSM = -DDNIX -I/usr/include/bsd
# LIBSM = -ln


# This is for Cray, Unicos 8.0
# contributed by velo@sesun3.epfl.ch (Martin Ouwehand)
# FLAGSM = -DCRAY -U__STDC__ -DQUOTAS
# LIBSM =

# This is for Convex
# contributed by Victor Balashov <balashov@cv.jinr.dubna.su>
# and Ulrich Hahn <ulrich.hahn@zdv.uni-tuebingen.de>
# FLAGSM= -DCONVEX -DSHADOW_PWD
# LIBSM= 

# This is for SMP_DC.OSx v1.1-94c079 on Pyramid S series
# contributed by jeffrey@itm.org
# FLAGSM = -DSOLARIS -DSHADOW_PWD -DBSD_COMP
# LIBSM = -lsocket -lnsl

# This is for QNX 4.22
# Contributed by eldo@invisa.satlink.net (Eldo Loguzzo)
# FLAGSM = -DQNX -DGUEST_SESSSETUP=1
# LIBSM =


# This is for SONY NEWS, NEWS-OS 4.2.x
# contributed by sky@sm.sony.co.jp (Katushi Sato)
# FLAGSM = -DNEWS42 -DKANJI=\"sjis\"
# LIBSM =

# This is for OS/2 using EMX 0.9b
# Contributed by jasonr@pec.co.nz (Jason Rumney)
# FLAGSM = -DOS2
# LIBSM = -Zexe -lsocket

# This is for Cygwin32 for Windows NT and Windows 95
# Contributed by jwilkins@secnet.com (Jonathan Wilkins)
# FLAGSM = -D_WIN32
# LIBSM =


######################################################################
# DON'T EDIT BELOW THIS LINE
######################################################################

SRCS = nat.c client.c util.c system.c nmb.c charset.c parse_ip.c sighandler.c
OBJS = nat.o client.o util.o system.o nmb.o charset.o parse_ip.o sighandler.o
CLIENT_OBJS = client.o util.o system.o nmb.o charset.o parse_ip.o sighandler.o
CFLAGS1 = -DSTEPPING -DSCANNER -DVERBOSE
CFLAGS2 = -DWORKGROUP=\"$(WORKGROUP)\" -DGUEST_ACCOUNT=\"$(GUESTACCOUNT)\" 
CFLAGS = $(CFLAGS1) $(CFLAGS2) $(FLAGSM) -ggdb -Wall
CLIENT_CFLAGS = -DVERBOSE $(CFLAGS2) $(FLAGSM) -ggdb -Wall
LIBS = $(LIBSM)

all : nat

INCLUDES = version.h local.h includes.h smb.h sighandler.h
PROGS = nat client

.SUFFIXES:
.SUFFIXES: .c .o .h

.c.o: $(INCLUDES)
	@echo Compiling $*.c
	$(CC) $(CFLAGS) -c $*.c

nat:	$(OBJS)
	$(CC) $(CFLAGS) -o nat $(STATIC) $(OBJS) $(LIBS)

client: $(CLIENT_OBJS)
	$(CC) $(CLIENT_CFLAGS) -o client $(STATIC) $(CLIENT_OBJS) $(LIBS)

clean:
	rm -f core *.o *~ $(PROGS)