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= IPV6="$(IPV6)" 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" IPV6="$(IPV6)" 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############################################################### 478# System dependencies: whether or not your system has IPV6 479# 480# If your system has IPv6 and supports getipnode* and inet_pton/inet_ntop 481# uncomment the following (Solaris 8) 482 483# IPV6 = -DHAVE_IPV6 484 485# If your system does not have getipnodebyname() but uses the obsolete 486# gethostbyname2() instead, use this (AIX) 487# IPV6 = -DHAVE_IPV6 -DUSE_GETHOSTBYNAME2 488 489# End of the system dependencies. 490################################# 491 492############################## 493# Start of the optional stuff. 494 495########################################### 496# Optional: Turning on language extensions 497# 498# Instead of the default access control language that is documented in 499# the hosts_access.5 document, the wrappers can be configured to 500# implement an extensible language documented in the hosts_options.5 501# document. This language is implemented by the "options.c" source 502# module, which also gives hints on how to add your own extensions. 503# Uncomment the next definition to turn on the language extensions 504# (examples: allow, deny, banners, twist and spawn). 505# 506#STYLE = -DPROCESS_OPTIONS # Enable language extensions. 507 508################################################################ 509# Optional: Changing the default disposition of logfile records 510# 511# By default, logfile entries are written to the same file as used for 512# sendmail transaction logs. See your /etc/syslog.conf file for actual 513# path names of logfiles. The tutorial section in the README file 514# gives a brief introduction to the syslog daemon. 515# 516# Change the FACILITY definition below if you disagree with the default 517# disposition. Some syslog versions (including Ultrix 4.x) do not provide 518# this flexibility. 519# 520# If nothing shows up on your system, it may be that the syslog records 521# are sent to a dedicated loghost. It may also be that no syslog daemon 522# is running at all. The README file gives pointers to surrogate syslog 523# implementations for systems that have no syslog library routines or 524# no syslog daemons. When changing the syslog.conf file, remember that 525# there must be TABs between fields. 526# 527# The LOG_XXX names below are taken from the /usr/include/syslog.h file. 528 529FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use 530 531# The syslog priority at which successful connections are logged. 532 533SEVERITY= LOG_INFO # LOG_INFO is normally not logged to the console 534 535########################### 536# Optional: Reduce DNS load 537# 538# When looking up the address for a host.domain name, the typical DNS 539# code will first append substrings of your own domain, so it tries 540# host.domain.your.own.domain, then host.domain.own.domain, and then 541# host.domain. The APPEND_DOT feature stops this waste of cycles. It is 542# off by default because it causes problems on sites that don't use DNS 543# and with Solaris < 2.4. APPEND_DOT will not work with hostnames taken 544# from /etc/hosts or from NIS maps. It does work with DNS through NIS. 545# 546# DOT= -DAPPEND_DOT 547 548################################################## 549# Optional: Always attempt remote username lookups 550# 551# By default, the wrappers look up the remote username only when the 552# access control rules require them to do so. 553# 554# Username lookups require that the remote host runs a daemon that 555# supports an RFC 931 like protocol. Remote user name lookups are not 556# possible for UDP-based connections, and can cause noticeable delays 557# with connections from non-UNIX PCs. On some systems, remote username 558# lookups can trigger a kernel bug, causing loss of service. The README 559# file describes how to find out if your UNIX kernel has that problem. 560# 561# Uncomment the following definition if the wrappers should always 562# attempt to get the remote user name. If this is not enabled you can 563# still do selective username lookups as documented in the hosts_access.5 564# and hosts_options.5 manual pages (`nroff -man' format). 565# 566#AUTH = -DALWAYS_RFC931 567# 568# The default username lookup timeout is 10 seconds. This may not be long 569# enough for slow hosts or networks, but is enough to irritate PC users. 570 571RFC931_TIMEOUT = 10 572 573###################################################### 574# Optional: Changing the default file protection mask 575# 576# On many systems, network daemons and other system processes are started 577# with a zero umask value, so that world-writable files may be produced. 578# It is a good idea to edit your /etc/rc* files so that they begin with 579# an explicit umask setting. On our site we use `umask 022' because it 580# does not break anything yet gives adequate protection against tampering. 581# 582# The following macro specifies the default umask for processes run under 583# control of the daemon wrappers. Comment it out only if you are certain 584# that inetd and its children are started with a safe umask value. 585 586UMASK = -DDAEMON_UMASK=022 587 588####################################### 589# Optional: Turning off access control 590# 591# By default, host access control is enabled. To disable host access 592# control, comment out the following definition. Host access control 593# can also be turned off at runtime by providing no or empty access 594# control tables. 595 596ACCESS = -DHOSTS_ACCESS 597 598######################################################## 599# Optional: Changing the access control table pathnames 600# 601# The HOSTS_ALLOW and HOSTS_DENY macros define where the programs will 602# look for access control information. Watch out for the quotes and 603# backslashes when you make changes. 604 605TABLES = -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\" 606 607#################################################### 608# Optional: dealing with host name/address conflicts 609# 610# By default, the software tries to protect against hosts that claim to 611# have someone elses host name. This is relevant for network services 612# whose authentication depends on host names, such as rsh and rlogin. 613# 614# With paranoid mode on, connections will be rejected when the host name 615# does not match the host address. Connections will also be rejected when 616# the host name is available but cannot be verified. 617# 618# Comment out the following definition if you want more control over such 619# requests. When paranoid mode is off and a host name double check fails, 620# the client can be matched with the PARANOID access control pattern. 621# 622# Paranoid mode implies hostname lookup. In order to disable hostname 623# lookups altogether, see the next section. 624 625PARANOID= -DPARANOID 626 627######################################## 628# Optional: turning off hostname lookups 629# 630# By default, the software always attempts to look up the client 631# hostname. With selective hostname lookups, the client hostname 632# lookup is postponed until the name is required by an access control 633# rule or by a %letter expansion. 634# 635# In order to perform selective hostname lookups, disable paranoid 636# mode (see previous section) and comment out the following definition. 637 638HOSTNAME= -DALWAYS_HOSTNAME 639 640############################################# 641# Optional: Turning on host ADDRESS checking 642# 643# Optionally, the software tries to protect against hosts that pretend to 644# have someone elses host address. This is relevant for network services 645# whose authentication depends on host names, such as rsh and rlogin, 646# because the network address is used to look up the remote host name. 647# 648# The protection is to refuse TCP connections with IP source routing 649# options. 650# 651# This feature cannot be used with SunOS 4.x because of a kernel bug in 652# the implementation of the getsockopt() system call. Kernel panics have 653# been observed for SunOS 4.1.[1-3]. Symptoms are "BAD TRAP" and "Data 654# fault" while executing the tcp_ctloutput() kernel function. 655# 656# Reportedly, Sun patch 100804-03 or 101790 fixes this for SunOS 4.1.x. 657# 658# Uncomment the following macro definition if your getsockopt() is OK. 659# 660# -DKILL_IP_OPTIONS is not needed on modern UNIX systems that can stop 661# source-routed traffic in the kernel. Examples: 4.4BSD derivatives, 662# Solaris 2.x, and Linux. See your system documentation for details. 663# 664# KILL_OPT= -DKILL_IP_OPTIONS 665 666## End configuration options 667############################ 668 669# Protection against weird shells or weird make programs. 670 671SHELL = /bin/sh 672.c.o:; $(CC) $(CFLAGS) -c $*.c 673 674CFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ 675 $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \ 676 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \ 677 -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \ 678 $(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \ 679 $(VSYSLOG) $(HOSTNAME) $(IPV6) 680 681LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \ 682 hosts_ctl.o refuse.o percent_x.o clean_exit.o $(AUX_OBJ) \ 683 $(FROM_OBJ) fix_options.o socket.o tli.o workarounds.o \ 684 update.o misc.o diag.o percent_m.o myvsyslog.o 685 686FROM_OBJ= fromhost.o 687 688KIT = README miscd.c tcpd.c fromhost.c hosts_access.c shell_cmd.c \ 689 tcpd.h tcpdmatch.c Makefile hosts_access.5 strcasecmp.c BLURB rfc931.c \ 690 tcpd.8 eval.c hosts_access.3 hosts_ctl.c percent_x.c options.c \ 691 clean_exit.c environ.c patchlevel.h fix_options.c workarounds.c \ 692 socket.c tli.c DISCLAIMER fakelog.c safe_finger.c hosts_options.5 \ 693 CHANGES try-from.c update.c ptx.c vfprintf.c tli-sequent.c \ 694 tli-sequent.h misc.c diag.c ncr.c tcpdchk.c percent_m.c \ 695 myvsyslog.c mystdarg.h printf.ck README.IRIX Banners.Makefile \ 696 refuse.c tcpdchk.8 setenv.c inetcf.c inetcf.h scaffold.c \ 697 scaffold.h tcpdmatch.8 README.NIS 698 699LIB = libwrap.a 700 701all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk 702 703# Invalidate all object files when the compiler options (CFLAGS) have changed. 704 705config-check: 706 @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; } 707 @set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \ 708 if cmp cflags /tmp/cflags.$$$$ ; \ 709 then rm /tmp/cflags.$$$$ ; \ 710 else mv /tmp/cflags.$$$$ cflags ; \ 711 fi >/dev/null 2>/dev/null 712 713cflags: config-check 714 715$(LIB): $(LIB_OBJ) 716 rm -f $(LIB) 717 $(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ) 718 -$(RANLIB) $(LIB) 719 720tcpd: tcpd.o $(LIB) 721 $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS) 722 723miscd: miscd.o $(LIB) 724 $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS) 725 726safe_finger: safe_finger.o $(LIB) 727 $(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS) 728 729TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o 730 731tcpdmatch: $(TCPDMATCH_OBJ) $(LIB) 732 $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS) 733 734try-from: try-from.o fakelog.o $(LIB) 735 $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS) 736 737TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o 738 739tcpdchk: $(TCPDCHK_OBJ) $(LIB) 740 $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS) 741 742shar: $(KIT) 743 @shar $(KIT) 744 745kit: $(KIT) 746 @makekit $(KIT) 747 748files: 749 @echo $(KIT) 750 751archive: 752 $(ARCHIVE) $(KIT) 753 754clean: 755 rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \ 756 cflags 757 758tidy: clean 759 chmod -R a+r . 760 chmod 755 . 761 762# Enable all bells and whistles for linting. 763 764lint: tcpd_lint miscd_lint match_lint chk_lint 765 766tcpd_lint: 767 lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \ 768 -DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \ 769 $(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \ 770 -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \ 771 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \ 772 -Dvsyslog=myvsyslog \ 773 tcpd.c fromhost.c socket.c tli.c hosts_access.c \ 774 shell_cmd.c refuse.c rfc931.c eval.c percent_x.c clean_exit.c \ 775 options.c setenv.c fix_options.c workarounds.c update.c misc.c \ 776 diag.c myvsyslog.c percent_m.c 777 778miscd_lint: 779 lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \ 780 -DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \ 781 $(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \ 782 -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \ 783 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \ 784 -Dvsyslog=myvsyslog \ 785 miscd.c fromhost.c socket.c tli.c hosts_access.c \ 786 shell_cmd.c refuse.c rfc931.c eval.c percent_x.c clean_exit.c \ 787 options.c setenv.c fix_options.c workarounds.c update.c misc.c \ 788 diag.c myvsyslog.c percent_m.c 789 790match_lint: 791 lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \ 792 -DPARANOID $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \ 793 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \ 794 -Dvsyslog=myvsyslog \ 795 tcpdmatch.c hosts_access.c eval.c percent_x.c options.c workarounds.c \ 796 update.c socket.c misc.c diag.c myvsyslog.c percent_m.c setenv.c \ 797 inetcf.c scaffold.c 798 799chk_lint: 800 lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \ 801 -DPARANOID $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \ 802 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \ 803 -Dvsyslog=myvsyslog \ 804 tcpdchk.c eval.c percent_x.c options.c update.c workarounds.c \ 805 setenv.c misc.c diag.c myvsyslog.c percent_m.c inetcf.c scaffold.c 806 807printfck: 808 printfck -f printf.ck \ 809 tcpd.c fromhost.c socket.c tli.c hosts_access.c \ 810 shell_cmd.c refuse.c rfc931.c eval.c percent_x.c clean_exit.c \ 811 options.c setenv.c fix_options.c workarounds.c update.c misc.c \ 812 diag.c myvsyslog.c percent_m.c >aap.c 813 lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \ 814 -DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \ 815 $(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \ 816 -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \ 817 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" -Dvsyslog=myvsyslog aap.c 818 printfck -f printf.ck \ 819 tcpdchk.c eval.c percent_x.c options.c update.c workarounds.c \ 820 setenv.c misc.c diag.c myvsyslog.c percent_m.c inetcf.c scaffold.c \ 821 >aap.c 822 lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \ 823 -DPARANOID $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \ 824 -Dvsyslog=myvsyslog -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" 825 826# Internal compilation dependencies. 827 828clean_exit.o: cflags 829clean_exit.o: tcpd.h 830diag.o: cflags 831diag.o: mystdarg.h 832diag.o: tcpd.h 833environ.o: cflags 834eval.o: cflags 835eval.o: tcpd.h 836fakelog.o: cflags 837fakelog.o: mystdarg.h 838fix_options.o: cflags 839fix_options.o: tcpd.h 840fromhost.o: cflags 841fromhost.o: tcpd.h 842hosts_access.o: cflags 843hosts_access.o: tcpd.h 844hosts_ctl.o: cflags 845hosts_ctl.o: tcpd.h 846inetcf.o: cflags 847inetcf.o: inetcf.h 848inetcf.o: tcpd.h 849misc.o: cflags 850misc.o: tcpd.h 851miscd.o: cflags 852miscd.o: patchlevel.h 853miscd.o: tcpd.h 854myvsyslog.o: cflags 855myvsyslog.o: mystdarg.h 856myvsyslog.o: tcpd.h 857ncr.o: cflags 858ncr.o: tcpd.h 859options.o: cflags 860options.o: tcpd.h 861percent_m.o: cflags 862percent_m.o: mystdarg.h 863percent_x.o: cflags 864percent_x.o: tcpd.h 865ptx.o: cflags 866ptx.o: tcpd.h 867refuse.o: cflags 868refuse.o: tcpd.h 869rfc931.o: cflags 870rfc931.o: tcpd.h 871safe_finger.o: cflags 872scaffold.o: cflags 873scaffold.o: scaffold.h 874scaffold.o: tcpd.h 875setenv.o: cflags 876shell_cmd.o: cflags 877shell_cmd.o: tcpd.h 878socket.o: cflags 879socket.o: tcpd.h 880strcasecmp.o: cflags 881tcpd.o: cflags 882tcpd.o: patchlevel.h 883tcpd.o: tcpd.h 884tcpdchk.o: cflags 885tcpdchk.o: inetcf.h 886tcpdchk.o: scaffold.h 887tcpdchk.o: tcpd.h 888tcpdmatch.o: cflags 889tcpdmatch.o: scaffold.h 890tcpdmatch.o: tcpd.h 891tli-sequent.o: cflags 892tli-sequent.o: tcpd.h 893tli-sequent.o: tli-sequent.h 894tli.o: cflags 895tli.o: tcpd.h 896try-from.o: cflags 897try-from.o: tcpd.h 898update.o: cflags 899update.o: mystdarg.h 900update.o: tcpd.h 901vfprintf.o: cflags 902workarounds.o: cflags 903workarounds.o: tcpd.h 904