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