untabify
[dragonfly.git] / contrib / tcp_wrappers / Makefile
bloba8c776bf101d6b7293a61a2043dd3e2faa8a4a9b
1 # @(#) Makefile 1.23 97/03/21 19:27:20
2 # $FreeBSD: src/contrib/tcp_wrappers/Makefile,v 1.2 2000/02/03 10:26:57 shin Exp $
3 # $DragonFly: src/contrib/tcp_wrappers/Makefile,v 1.2 2003/06/17 04:24:06 dillon Exp $
5 what:
6 @echo
7 @echo "Usage: edit the REAL_DAEMON_DIR definition in the Makefile then:"
8 @echo
9 @echo " make sys-type"
10 @echo
11 @echo "If you are in a hurry you can try instead:"
12 @echo
13 @echo " make REAL_DAEMON_DIR=/foo/bar sys-type"
14 @echo
15 @echo "And for a version with language extensions enabled:"
16 @echo
17 @echo " make REAL_DAEMON_DIR=/foo/bar STYLE=-DPROCESS_OPTIONS sys-type"
18 @echo
19 @echo "This Makefile knows about the following sys-types:"
20 @echo
21 @echo " generic (most bsd-ish systems with sys5 compatibility)"
22 @echo " 386bsd aix alpha apollo bsdos convex-ultranet dell-gcc dgux dgux543"
23 @echo " dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix"
24 @echo " linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211"
25 @echo " ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4"
26 @echo " sunos40 sunos5 solaris8 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2"
27 @echo " uts215 uxp"
28 @echo
29 @echo "If none of these match your environment, edit the system"
30 @echo "dependencies sections in the Makefile and do a 'make other'."
31 @echo
33 #######################################################
34 # Choice between easy and advanced installation recipe.
36 # Advanced installation: vendor-provided daemons are left alone, and the
37 # inetd configuration file is edited. In this case, the REAL_DAEMON_DIR
38 # macro should reflect the actual directory with (most of) your
39 # vendor-provided network daemons. These names can be found in the
40 # inetd.conf file. Usually, the telnet, ftp and finger daemons all live
41 # in the same directory.
43 # Uncomment the appropriate line if you are going to edit inetd.conf.
45 # Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx
46 #REAL_DAEMON_DIR=/usr/etc
48 # SysV.4 Solaris 2.x OSF AIX
49 #REAL_DAEMON_DIR=/usr/sbin
51 # BSD 4.4
52 #REAL_DAEMON_DIR=/usr/libexec
54 # HP-UX SCO Unicos
55 #REAL_DAEMON_DIR=/etc
57 # Easy installation: vendor-provided network daemons are moved to "some
58 # other" directory, and the tcpd wrapper fills in the "holes". For this
59 # mode of operation, the REAL_DAEMON_DIR macro should be set to the "some
60 # other" directory. The "..." is here for historical reasons only; you
61 # should probably use some other name.
63 # Uncomment the appropriate line if you are going to move your daemons.
65 # Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx
66 #REAL_DAEMON_DIR=/usr/etc/...
68 # SysV.4 Solaris 2.x OSF AIX
69 #REAL_DAEMON_DIR=/usr/sbin/...
71 # BSD 4.4
72 #REAL_DAEMON_DIR=/usr/libexec/...
74 # HP-UX SCO Unicos
75 #REAL_DAEMON_DIR=/etc/...
77 # End of mandatory section
78 ##########################
80 ##########################################
81 # Ready-to-use system-dependent templates.
83 # Ready-to-use templates are available for many systems (see the "echo"
84 # commands at the start of this Makefile). The templates take care of
85 # all system dependencies: after editing the REAL_DAEMON_DIR definition
86 # above, do a "make sunos4" (or whatever system type is appropriate).
88 # If your system is not listed (or something that comes close enough), you
89 # have to edit the system dependencies section below and do a "make other".
91 # Send templates for other UNIX versions to wietse@wzv.win.tue.nl.
93 # This is good for many BSD+SYSV hybrids with NIS (formerly YP).
94 generic aix osf alpha dynix:
95 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
96 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
97 NETGROUP=-DNETGROUP TLI= all
99 # Ditto, with vsyslog
100 sunos4:
101 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
102 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
103 NETGROUP=-DNETGROUP VSYSLOG= TLI= all
105 # Generic with resolver library.
106 generic-resolver:
107 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
108 LIBS=-lresolv RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
109 NETGROUP=-DNETGROUP TLI= all
111 # The NeXT loader needs "-m" or it barfs on redefined library functions.
112 next:
113 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
114 LIBS=-m RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
115 NETGROUP=-DNETGROUP TLI= all
117 # SunOS for the 386 was frozen at release 4.0.x.
118 sunos40:
119 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
120 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ="setenv.o strcasecmp.o" \
121 NETGROUP=-DNETGROUP VSYSLOG= TLI= all
123 # Ultrix is like aix, next, etc., but has miscd and setenv().
124 ultrix:
125 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
126 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
127 NETGROUP=-DNETGROUP TLI= all miscd
129 # This works on EP/IX 1.4.3 and will likely work on Mips (reggers@julian.uwo.ca)
130 epix:
131 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
132 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
133 NETGROUP=-DNETGROUP TLI= SYSTYPE="-systype bsd43" all
135 # Freebsd and linux by default have no NIS.
136 386bsd bsdos:
137 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
138 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
139 EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
141 freebsd:
142 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
143 RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP=-DNETGROUP TLI= \
144 EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -DUSE_GETIPNODEBY" \
145 VSYSLOG= all
147 netbsd:
148 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
149 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
150 EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 \
151 -Dss_family=__ss_family -Dss_len=__ss_len" VSYSLOG= all
153 linux:
154 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
155 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o NETGROUP= TLI= \
156 EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DBROKEN_SO_LINGER -DINET6=1 \
157 -Dss_family=__ss_family -Dss_len=__ss_len" all
159 linux-old:
160 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
161 LIBS="/usr/inet6/lib/libinet6.a -lresolv" \
162 RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o NETGROUP= TLI= \
163 EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DBROKEN_SO_LINGER -DINET6=1 -Dss_family=sin6_family -Dsockaddr_storage=sockaddr_in6 -I/usr/inet6/include" all
165 # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
166 hpux hpux8 hpux9 hpux10:
167 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
168 LIBS= RANLIB=echo ARFLAGS=rv AUX_OBJ=setenv.o \
169 NETGROUP=-DNETGROUP TLI= all
171 # ConvexOS-10.x with UltraNet support (ukkonen@csc.fi).
172 convex-ultranet:
173 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
174 LIBS=-lulsock RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
175 NETGROUP=-DNETGROUP TLI= all
177 # Generic support for the Dynix/PTX version of TLI.
178 ptx-generic:
179 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
180 LIBS="-lsocket -linet -lnsl" RANLIB=echo ARFLAGS=rv \
181 AUX_OBJ="setenv.o strcasecmp.o ptx.o" NETGROUP= TLI=-DPTX all
183 # With UDP support optimized for PTX 2.x (timw@sequent.com).
184 ptx-2.x:
185 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
186 LIBS="-lsocket -linet -lnsl" RANLIB=echo ARFLAGS=rv \
187 AUX_OBJ="setenv.o strcasecmp.o tli-sequent.o" NETGROUP= \
188 TLI=-DTLI_SEQUENT all
190 # IRIX 4.0.x has a special ar(1) flag.
191 irix4:
192 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
193 LIBS="-lc -lsun" RANLIB=echo ARFLAGS=rvs AUX_OBJ=setenv.o \
194 NETGROUP=-DNETGROUP TLI= all
196 # IRIX 5.2 is SYSV4 with several broken things (such as -lsocket -lnsl).
197 irix5:
198 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
199 LIBS=-lsun RANLIB=echo ARFLAGS=rv VSYSLOG= \
200 NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI= all
202 # IRIX 6.2 (tucker@math.unc.edu). Must find a better value than 200000.
203 irix6:
204 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
205 LIBS= RANLIB=echo ARFLAGS=rv VSYSLOG= \
206 NETGROUP=-DNETGROUP EXTRA_CFLAGS="-DBSD=200000" TLI= all
208 # SunOS 5.x is another SYSV4 variant.
209 sunos5:
210 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
211 LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv VSYSLOG= \
212 NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
213 BUGS="$(BUGS) -DSOLARIS_24_GETHOSTBYNAME_BUG" all
215 # SunOS 5.8 is another SYSV4 variant, but has IPv6 support
216 solaris8:
217 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
218 LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv VSYSLOG= \
219 NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
220 EXTRA_CFLAGS="-DINET6 -DUSE_GETIPNODEBY -DNO_CLONE_DEVICE \
221 -DINT32_T" all
223 # Generic SYSV40
224 esix sysv4:
225 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
226 LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv \
227 NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI all
229 # DG/UX 5.4.1 and 5.4.2 have an unusual inet_addr() interface.
230 dgux:
231 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
232 LIBS=-lnsl RANLIB=echo ARFLAGS=rv \
233 NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
234 BUGS="$(BUGS) -DINET_ADDR_BUG" all
236 dgux543:
237 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
238 LIBS=-lnsl RANLIB=echo ARFLAGS=rv \
239 NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI all
241 # NCR UNIX 02.02.01 and 02.03.00 (Alex Chircop, msu@unimt.mt)
242 ncrsvr4:
243 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
244 LIBS="-lresolv -lnsl -lsocket" RANLIB=echo ARFLAGS=rv \
245 AUX_OBJ="setenv.o strcasecmp.o" NETGROUP= TLI=-DTLI \
246 EXTRA_CFLAGS="" FROM_OBJ=ncr.o all
248 # Tandem SYSV4 (eqawas@hedgehog.ac.cowan.edu.au)
249 tandem:
250 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
251 LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv \
252 NETGROUP= AUX_OBJ="setenv.o strcasecmp.o" TLI=-DTLI all
254 # Amdahl UTS 2.1.5 (Richard.Richmond@bridge.bst.bls.com)
255 uts215:
256 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
257 LIBS="-lsocket" RANLIB=echo \
258 ARFLAGS=rv AUX_OBJ=setenv.o NETGROUP=-DNO_NETGROUP TLI= all
260 # UXP/DS System V.4 clone (vic@uida0.uida.es).
261 uxp:
262 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
263 LIBS="-L/usr/ucblib -lsocket -lnsl -lucb" \
264 RANLIB=echo ARFLAGS=rv NETGROUP=-DNETGROUP \
265 AUX_OBJ=setenv.o TLI="-DTLI -DDRS_XTI" all
267 # DELL System V.4 Issue 2.2 using gcc (kim@tac.nyc.ny.us, jurban@norden1.com)
268 dell-gcc:
269 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
270 LIBS="-lsocket -lnsl" RANLIB=ranlib ARFLAGS=rv CC=gcc \
271 AUX_OBJ="setenv.o strcasecmp.o" TLI=-DTLI all
273 # SCO 3.2v4.1 no frills (jedwards@sol1.solinet.net).
274 sco:
275 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
276 LIBS="-lsocket -lnsl_s" RANLIB=echo ARFLAGS=rv \
277 NETGROUP= AUX_OBJ=setenv.o TLI= all
279 # SCO OpenDesktop 2.0, release 3.2 (peter@midnight.com). Please simplify.
280 sco-od2:
281 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
282 LIBS="-lrpcsvc -lrpc -lyp -lrpc -lrpcsvc -lsocket" \
283 RANLIB=echo ARFLAGS=rv AUX_OBJ=setenv.o \
284 NETGROUP=-DNETGROUP TLI= all
286 # SCO 3.2v4.2 with TCP/IP 1.2.1 (Eduard.Vopicka@vse.cz). Please simplify.
287 sco-nis:
288 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
289 LIBS="-lyp -lrpc -lsocket -lyp -lc_s -lc" \
290 RANLIB=echo ARFLAGS=rv AUX_OBJ=setenv.o \
291 NETGROUP=-DNETGROUP TLI= EXTRA_CFLAGS="-nointl -DNO_NETGRENT" all
293 # SCO 3.2v5.0.0 OpenServer 5 (bob@odt.handy.com, bill@razorlogic.com)
294 sco-os5:
295 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
296 LIBS="-lrpcsvc -lsocket" RANLIB=echo ARFLAGS=rv VSYSLOG= \
297 AUX_OBJ=setenv.o NETGROUP=-DNETGROUP TLI= all
299 # sinix 5.42 setjmp workaround (szrzs023@ub3.ub.uni-kiel.de)
300 sinix:
301 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
302 LIBS="-lsocket -lnsl -L/usr/ccs/lib -lc -L/usr/ucblib -lucb" \
303 RANLIB=echo ARFLAGS=rv AUX_OBJ=setenv.o TLI=-DTLI all
305 # Domain SR10.4. Build under bsd, run under either sysv3 or bsd43.
306 apollo:
307 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
308 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
309 NETGROUP=-DNETGROUP TLI= SYSTYPE="-A run,any -A sys,any" all
311 # Pyramid OSx 5.1, using the BSD universe.
312 pyramid:
313 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
314 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ="environ.o vfprintf.o" \
315 STRINGS="-Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy" \
316 NETGROUP="-DNETGROUP -DUSE_GETDOMAIN" TLI= all
318 # Untested.
319 mips:
320 @echo "Warning: some definitions may be wrong."
321 make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
322 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
323 NETGROUP=-DNETGROUP TLI= SYSTYPE="-sysname bsd43" all
325 # Cray (tested with UNICOS 7.0.4).
326 unicos7:
327 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
328 LIBS=-lnet RANLIB=echo ARFLAGS=rv \
329 EXTRA_CFLAGS=-DINADDR_NONE="\"((unsigned long) -1)\"" \
330 AUX_OBJ="setenv.o strcasecmp.o" NETGROUP= TLI= all
332 # Unicos 8.x, Cray-YMP (Bruce Kelly).
333 unicos8:
334 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
335 LIBS= RANLIB=echo AR=bld ARFLAGS=rv \
336 AUX_OBJ= NETGROUP= TLI= all
338 # Power_UNIX 2.1.1 (amantel@lerc.nasa.gov)
339 power_unix_211:
340 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
341 LIBS="-lnsl -lsocket -lgen -lresolv" RANLIB=echo ARFLAGS=rv \
342 NETGROUP= AUX_OBJ=setenv.o TLI=-DTLI BUGS="$(BUGS)" all
344 # ISC (fc@all.net)
345 isc:
346 make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
347 LIBS="-linet -lnsl_s -ldbm" RANLIB=echo ARFLAGS=rv \
348 AUX_OBJ="setenv.o strcasecmp.o" EXTRA_CFLAGS="-DENOTCONN=ENAVAIL" \
349 NETGROUP= TLI= all
351 # Interactive UNIX R3.2 version 4.0 (Bobby D. Wright).
352 iunix:
353 make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
354 LIBS="-linet -lnsl_s -ldbm" RANLIB=echo ARFLAGS=rv \
355 AUX_OBJ=environ.o strcasecmp.o NETGROUP= TLI= all
357 # RTU 6.0 on a Masscomp 5400 (ben@piglet.cr.usgs.gov). When using the
358 # advanced installation, increment argv before actually looking at it.
359 rtu:
360 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
361 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
362 NETGROUP= TLI= all
364 # Unixware sans NIS (mc@telebase.com). Compiler dislikes strcasecmp.c.
365 unixware1:
366 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
367 LIBS="-lsocket -lnsl -lc -L/usr/ucblib -lucb" RANLIB=echo ARFLAGS=rv \
368 NETGROUP=$(NETGROUP) AUX_OBJ=environ.o TLI=-DTLI all
370 unixware2:
371 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
372 LIBS="-lsocket -lnsl -lgen -lc -L/usr/ucblib -lucb" RANLIB=echo \
373 ARFLAGS=rv NETGROUP=$(NETGROUP) AUX_OBJ=environ.o TLI=-DTLI all
375 u6000:
376 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
377 LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv \
378 NETGROUP=-DNETGROUP AUX_OBJ="setenv.o strcasecmp.o" TLI=-DTLI all
380 # MachTen
381 machten:
382 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
383 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
384 NETGROUP= TLI= all
386 ###############################################################
387 # System dependencies: TLI (transport-level interface) support.
389 # Uncomment the following macro if your system has System V.4-style TLI
390 # support (/usr/include/sys/timod.h, /etc/netconfig, and the netdir(3)
391 # routines).
393 #TLI = -DTLI
395 ###############################################################################
396 # System dependencies: differences between ranlib(1) and ar(1) implementations.
398 # Some C compilers (Ultrix 4.x) insist that ranlib(1) be run on an object
399 # library; some don't care as long as the modules are in the right order;
400 # some systems don't even have a ranlib(1) command. Make your choice.
402 RANLIB = ranlib # have ranlib (BSD-ish UNIX)
403 #RANLIB = echo # no ranlib (SYSV-ish UNIX)
405 ARFLAGS = rv # most systems
406 #ARFLAGS= rvs # IRIX 4.0.x
408 AR = ar
409 #AR = bld # Unicos 8.x
411 #############################################################################
412 # System dependencies: routines that are not present in the system libraries.
414 # If your system library does not have set/putenv() or strcasecmp(), use
415 # the ones provided with this source distribution. The environ.c module
416 # implements setenv(), getenv(), and putenv().
418 #AUX_OBJ= setenv.o
419 #AUX_OBJ= environ.o
420 #AUX_OBJ= environ.o strcasecmp.o
422 # Uncomment the following if your C library does not provide the
423 # strchr/strrchr/memcmp routines, but comes with index/rindex/bcmp.
425 #STRINGS= -Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy
427 #################################################################
428 # System dependencies: selection of non-default object libraries.
430 # Most System V implementations require that you explicitly specify the
431 # networking libraries. There is no general consensus, though.
433 #LIBS = -lsocket -lnsl # SysV.4 Solaris 2.x
434 #LIBS = -lsun # IRIX
435 #LIBS = -lsocket -linet -lnsl -lnfs # PTX
436 #LIBS = -linet -lnsl_s -ldbm # ISC
437 #LIBS = -lnet # Unicos 7
438 #LIBS = -linet -lsyslog -ldbm
439 #LIBS = -lsyslog -lsocket -lnsl
441 ######################################################
442 # System dependencies: system-specific compiler flags.
444 # Apollo Domain/OS offers both bsd and sys5 environments, sometimes
445 # on the same machine. If your Apollo is primarily sys5.3 and also
446 # has bsd4.3, uncomment the following to build under bsd and run under
447 # either environment.
449 #SYSTYPE= -A run,any -A sys,any
451 # For MIPS RISC/os 4_52.p3, uncomment the following definition.
453 #SYSTYPE= -sysname bsd43
455 ##################################################
456 # System dependencies: working around system bugs.
458 # -DGETPEERNAME_BUG works around a getpeername(2) bug in some versions of
459 # Apollo or SYSV.4 UNIX: the wrapper would report that all UDP requests
460 # come from address 0.0.0.0. The workaround does no harm on other systems.
462 # -DBROKEN_FGETS works around an fgets(3) bug in some System V versions
463 # (IRIX): fgets() gives up too fast when reading from a network socket.
464 # The workaround does no harm on other systems.
466 # Some UNIX systems (IRIX) make the error of calling the strtok() library
467 # routine from other library routines such as, e.g., gethostbyname/addr().
468 # The result is that hosts can slip through the wrapper allow/deny filters.
469 # Compile with -DLIBC_CALLS_STRTOK to avoid the vendor's strtok() routine.
470 # The workaround does no harm on other systems.
472 # DG/UX 5.4.1 comes with an inet_ntoa() function that returns a structure
473 # instead of a long integer. Compile with -DINET_ADDR_BUG to work around
474 # this mutant behavour. Fixed in 5.4R3.
476 # Solaris 2.4 gethostbyname(), in DNS through NIS mode, puts only one
477 # address in the host address list; all other addresses are treated as
478 # host name aliases. Compile with -DSOLARIS_24_GETHOSTBYNAME_BUG to work
479 # around this. The workaround does no harm on other Solaris versions.
481 #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK
482 #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DINET_ADDR_BUG
483 #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DSOLARIS_24_GETHOSTBYNAME_BUG
485 ##########################################################################
486 # System dependencies: whether or not your system has NIS (or YP) support.
488 # If your system supports NIS or YP-style netgroups, enable the following
489 # macro definition. Netgroups are used only for host access control.
491 #NETGROUP= -DNETGROUP
493 ###############################################################
494 # System dependencies: whether or not your system has vsyslog()
496 # If your system supports vsyslog(), comment out the following definition.
497 # If in doubt leave it in, it won't harm.
499 #VSYSLOG = -Dvsyslog=myvsyslog
501 # End of the system dependencies.
502 #################################
504 ##############################
505 # Start of the optional stuff.
507 ###########################################
508 # Optional: Turning on language extensions
510 # Instead of the default access control language that is documented in
511 # the hosts_access.5 document, the wrappers can be configured to
512 # implement an extensible language documented in the hosts_options.5
513 # document. This language is implemented by the "options.c" source
514 # module, which also gives hints on how to add your own extensions.
515 # Uncomment the next definition to turn on the language extensions
516 # (examples: allow, deny, banners, twist and spawn).
518 #STYLE = -DPROCESS_OPTIONS # Enable language extensions.
520 ################################################################
521 # Optional: Changing the default disposition of logfile records
523 # By default, logfile entries are written to the same file as used for
524 # sendmail transaction logs. See your /etc/syslog.conf file for actual
525 # path names of logfiles. The tutorial section in the README file
526 # gives a brief introduction to the syslog daemon.
528 # Change the FACILITY definition below if you disagree with the default
529 # disposition. Some syslog versions (including Ultrix 4.x) do not provide
530 # this flexibility.
532 # If nothing shows up on your system, it may be that the syslog records
533 # are sent to a dedicated loghost. It may also be that no syslog daemon
534 # is running at all. The README file gives pointers to surrogate syslog
535 # implementations for systems that have no syslog library routines or
536 # no syslog daemons. When changing the syslog.conf file, remember that
537 # there must be TABs between fields.
539 # The LOG_XXX names below are taken from the /usr/include/syslog.h file.
541 FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use
543 # The syslog priority at which successful connections are logged.
545 SEVERITY= LOG_INFO # LOG_INFO is normally not logged to the console
547 ###########################
548 # Optional: Reduce DNS load
550 # When looking up the address for a host.domain name, the typical DNS
551 # code will first append substrings of your own domain, so it tries
552 # host.domain.your.own.domain, then host.domain.own.domain, and then
553 # host.domain. The APPEND_DOT feature stops this waste of cycles. It is
554 # off by default because it causes problems on sites that don't use DNS
555 # and with Solaris < 2.4. APPEND_DOT will not work with hostnames taken
556 # from /etc/hosts or from NIS maps. It does work with DNS through NIS.
558 # DOT= -DAPPEND_DOT
560 ##################################################
561 # Optional: Always attempt remote username lookups
563 # By default, the wrappers look up the remote username only when the
564 # access control rules require them to do so.
566 # Username lookups require that the remote host runs a daemon that
567 # supports an RFC 931 like protocol. Remote user name lookups are not
568 # possible for UDP-based connections, and can cause noticeable delays
569 # with connections from non-UNIX PCs. On some systems, remote username
570 # lookups can trigger a kernel bug, causing loss of service. The README
571 # file describes how to find out if your UNIX kernel has that problem.
573 # Uncomment the following definition if the wrappers should always
574 # attempt to get the remote user name. If this is not enabled you can
575 # still do selective username lookups as documented in the hosts_access.5
576 # and hosts_options.5 manual pages (`nroff -man' format).
578 #AUTH = -DALWAYS_RFC931
580 # The default username lookup timeout is 10 seconds. This may not be long
581 # enough for slow hosts or networks, but is enough to irritate PC users.
583 RFC931_TIMEOUT = 10
585 ######################################################
586 # Optional: Changing the default file protection mask
588 # On many systems, network daemons and other system processes are started
589 # with a zero umask value, so that world-writable files may be produced.
590 # It is a good idea to edit your /etc/rc* files so that they begin with
591 # an explicit umask setting. On our site we use `umask 022' because it
592 # does not break anything yet gives adequate protection against tampering.
594 # The following macro specifies the default umask for processes run under
595 # control of the daemon wrappers. Comment it out only if you are certain
596 # that inetd and its children are started with a safe umask value.
598 UMASK = -DDAEMON_UMASK=022
600 #######################################
601 # Optional: Turning off access control
603 # By default, host access control is enabled. To disable host access
604 # control, comment out the following definition. Host access control
605 # can also be turned off at runtime by providing no or empty access
606 # control tables.
608 ACCESS = -DHOSTS_ACCESS
610 ########################################################
611 # Optional: Changing the access control table pathnames
613 # The HOSTS_ALLOW and HOSTS_DENY macros define where the programs will
614 # look for access control information. Watch out for the quotes and
615 # backslashes when you make changes.
617 TABLES = -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\"
619 ####################################################
620 # Optional: dealing with host name/address conflicts
622 # By default, the software tries to protect against hosts that claim to
623 # have someone elses host name. This is relevant for network services
624 # whose authentication depends on host names, such as rsh and rlogin.
626 # With paranoid mode on, connections will be rejected when the host name
627 # does not match the host address. Connections will also be rejected when
628 # the host name is available but cannot be verified.
630 # Comment out the following definition if you want more control over such
631 # requests. When paranoid mode is off and a host name double check fails,
632 # the client can be matched with the PARANOID access control pattern.
634 # Paranoid mode implies hostname lookup. In order to disable hostname
635 # lookups altogether, see the next section.
637 PARANOID= -DPARANOID
639 ########################################
640 # Optional: turning off hostname lookups
642 # By default, the software always attempts to look up the client
643 # hostname. With selective hostname lookups, the client hostname
644 # lookup is postponed until the name is required by an access control
645 # rule or by a %letter expansion.
647 # In order to perform selective hostname lookups, disable paranoid
648 # mode (see previous section) and comment out the following definition.
650 HOSTNAME= -DALWAYS_HOSTNAME
652 #############################################
653 # Optional: Turning on host ADDRESS checking
655 # Optionally, the software tries to protect against hosts that pretend to
656 # have someone elses host address. This is relevant for network services
657 # whose authentication depends on host names, such as rsh and rlogin,
658 # because the network address is used to look up the remote host name.
660 # The protection is to refuse TCP connections with IP source routing
661 # options.
663 # This feature cannot be used with SunOS 4.x because of a kernel bug in
664 # the implementation of the getsockopt() system call. Kernel panics have
665 # been observed for SunOS 4.1.[1-3]. Symptoms are "BAD TRAP" and "Data
666 # fault" while executing the tcp_ctloutput() kernel function.
668 # Reportedly, Sun patch 100804-03 or 101790 fixes this for SunOS 4.1.x.
670 # Uncomment the following macro definition if your getsockopt() is OK.
672 # -DKILL_IP_OPTIONS is not needed on modern UNIX systems that can stop
673 # source-routed traffic in the kernel. Examples: 4.4BSD derivatives,
674 # Solaris 2.x, and Linux. See your system documentation for details.
676 # KILL_OPT= -DKILL_IP_OPTIONS
678 ## End configuration options
679 ############################
681 # Protection against weird shells or weird make programs.
683 SHELL = /bin/sh
684 .c.o:; $(CC) $(CFLAGS) -c $*.c
686 CFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
687 $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
688 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
689 -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
690 $(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \
691 $(VSYSLOG) $(HOSTNAME)
693 LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \
694 hosts_ctl.o refuse.o percent_x.o clean_exit.o $(AUX_OBJ) \
695 $(FROM_OBJ) fix_options.o socket.o tli.o workarounds.o \
696 update.o misc.o diag.o percent_m.o myvsyslog.o
698 FROM_OBJ= fromhost.o
700 KIT = README miscd.c tcpd.c fromhost.c hosts_access.c shell_cmd.c \
701 tcpd.h tcpdmatch.c Makefile hosts_access.5 strcasecmp.c BLURB rfc931.c \
702 tcpd.8 eval.c hosts_access.3 hosts_ctl.c percent_x.c options.c \
703 clean_exit.c environ.c patchlevel.h fix_options.c workarounds.c \
704 socket.c tli.c DISCLAIMER fakelog.c safe_finger.c hosts_options.5 \
705 CHANGES try-from.c update.c ptx.c vfprintf.c tli-sequent.c \
706 tli-sequent.h misc.c diag.c ncr.c tcpdchk.c percent_m.c \
707 myvsyslog.c mystdarg.h printf.ck README.IRIX Banners.Makefile \
708 refuse.c tcpdchk.8 setenv.c inetcf.c inetcf.h scaffold.c \
709 scaffold.h tcpdmatch.8 README.NIS
711 LIB = libwrap.a
713 all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk
715 # Invalidate all object files when the compiler options (CFLAGS) have changed.
717 config-check:
718 @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
719 @set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \
720 if cmp cflags /tmp/cflags.$$$$ ; \
721 then rm /tmp/cflags.$$$$ ; \
722 else mv /tmp/cflags.$$$$ cflags ; \
723 fi >/dev/null 2>/dev/null
725 $(LIB): $(LIB_OBJ)
726 rm -f $(LIB)
727 $(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ)
728 -$(RANLIB) $(LIB)
730 tcpd: tcpd.o $(LIB)
731 $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS)
733 miscd: miscd.o $(LIB)
734 $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
736 safe_finger: safe_finger.o $(LIB)
737 $(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS)
739 TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o
741 tcpdmatch: $(TCPDMATCH_OBJ) $(LIB)
742 $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS)
744 try-from: try-from.o fakelog.o $(LIB)
745 $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS)
747 TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o
749 tcpdchk: $(TCPDCHK_OBJ) $(LIB)
750 $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS)
752 shar: $(KIT)
753 @shar $(KIT)
755 kit: $(KIT)
756 @makekit $(KIT)
758 files:
759 @echo $(KIT)
761 archive:
762 $(ARCHIVE) $(KIT)
764 clean:
765 rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \
766 cflags
768 tidy: clean
769 chmod -R a+r .
770 chmod 755 .
772 # Enable all bells and whistles for linting.
774 lint: tcpd_lint miscd_lint match_lint chk_lint
776 tcpd_lint:
777 lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \
778 -DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \
779 $(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \
780 -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \
781 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \
782 -Dvsyslog=myvsyslog \
783 tcpd.c fromhost.c socket.c tli.c hosts_access.c \
784 shell_cmd.c refuse.c rfc931.c eval.c percent_x.c clean_exit.c \
785 options.c setenv.c fix_options.c workarounds.c update.c misc.c \
786 diag.c myvsyslog.c percent_m.c
788 miscd_lint:
789 lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \
790 -DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \
791 $(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \
792 -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \
793 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \
794 -Dvsyslog=myvsyslog \
795 miscd.c fromhost.c socket.c tli.c hosts_access.c \
796 shell_cmd.c refuse.c rfc931.c eval.c percent_x.c clean_exit.c \
797 options.c setenv.c fix_options.c workarounds.c update.c misc.c \
798 diag.c myvsyslog.c percent_m.c
800 match_lint:
801 lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \
802 -DPARANOID $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \
803 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \
804 -Dvsyslog=myvsyslog \
805 tcpdmatch.c hosts_access.c eval.c percent_x.c options.c workarounds.c \
806 update.c socket.c misc.c diag.c myvsyslog.c percent_m.c setenv.c \
807 inetcf.c scaffold.c
809 chk_lint:
810 lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \
811 -DPARANOID $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \
812 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \
813 -Dvsyslog=myvsyslog \
814 tcpdchk.c eval.c percent_x.c options.c update.c workarounds.c \
815 setenv.c misc.c diag.c myvsyslog.c percent_m.c inetcf.c scaffold.c
817 printfck:
818 printfck -f printf.ck \
819 tcpd.c fromhost.c socket.c tli.c hosts_access.c \
820 shell_cmd.c refuse.c rfc931.c eval.c percent_x.c clean_exit.c \
821 options.c setenv.c fix_options.c workarounds.c update.c misc.c \
822 diag.c myvsyslog.c percent_m.c >aap.c
823 lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \
824 -DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \
825 $(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \
826 -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \
827 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" -Dvsyslog=myvsyslog aap.c
828 printfck -f printf.ck \
829 tcpdchk.c eval.c percent_x.c options.c update.c workarounds.c \
830 setenv.c misc.c diag.c myvsyslog.c percent_m.c inetcf.c scaffold.c \
831 >aap.c
832 lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \
833 -DPARANOID $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \
834 -Dvsyslog=myvsyslog -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\"
836 # Internal compilation dependencies.
838 clean_exit.o: cflags
839 clean_exit.o: tcpd.h
840 diag.o: cflags
841 diag.o: mystdarg.h
842 diag.o: tcpd.h
843 environ.o: cflags
844 eval.o: cflags
845 eval.o: tcpd.h
846 fakelog.o: cflags
847 fakelog.o: mystdarg.h
848 fix_options.o: cflags
849 fix_options.o: tcpd.h
850 fromhost.o: cflags
851 fromhost.o: tcpd.h
852 hosts_access.o: cflags
853 hosts_access.o: tcpd.h
854 hosts_ctl.o: cflags
855 hosts_ctl.o: tcpd.h
856 inetcf.o: cflags
857 inetcf.o: inetcf.h
858 inetcf.o: tcpd.h
859 misc.o: cflags
860 misc.o: tcpd.h
861 miscd.o: cflags
862 miscd.o: patchlevel.h
863 miscd.o: tcpd.h
864 myvsyslog.o: cflags
865 myvsyslog.o: mystdarg.h
866 myvsyslog.o: tcpd.h
867 ncr.o: cflags
868 ncr.o: tcpd.h
869 options.o: cflags
870 options.o: tcpd.h
871 percent_m.o: cflags
872 percent_m.o: mystdarg.h
873 percent_x.o: cflags
874 percent_x.o: tcpd.h
875 ptx.o: cflags
876 ptx.o: tcpd.h
877 refuse.o: cflags
878 refuse.o: tcpd.h
879 rfc931.o: cflags
880 rfc931.o: tcpd.h
881 safe_finger.o: cflags
882 scaffold.o: cflags
883 scaffold.o: scaffold.h
884 scaffold.o: tcpd.h
885 setenv.o: cflags
886 shell_cmd.o: cflags
887 shell_cmd.o: tcpd.h
888 socket.o: cflags
889 socket.o: tcpd.h
890 strcasecmp.o: cflags
891 tcpd.o: cflags
892 tcpd.o: patchlevel.h
893 tcpd.o: tcpd.h
894 tcpdchk.o: cflags
895 tcpdchk.o: inetcf.h
896 tcpdchk.o: scaffold.h
897 tcpdchk.o: tcpd.h
898 tcpdmatch.o: cflags
899 tcpdmatch.o: scaffold.h
900 tcpdmatch.o: tcpd.h
901 tli-sequent.o: cflags
902 tli-sequent.o: tcpd.h
903 tli-sequent.o: tli-sequent.h
904 tli.o: cflags
905 tli.o: tcpd.h
906 try-from.o: cflags
907 try-from.o: tcpd.h
908 update.o: cflags
909 update.o: mystdarg.h
910 update.o: tcpd.h
911 vfprintf.o: cflags
912 workarounds.o: cflags
913 workarounds.o: tcpd.h