#	@(#)Makefile	5.5 (Berkeley) 6/29/90

PROG=		xinetd

VERSION=	2.1.4
VERSION_DEF=	-DVERSION=\"$(PROG)\ Version\ $(VERSION)\"

#LDADD=	-ltimer -lpq -lstr -lxlog -lpset -lmisc -lsio  
LDADD=	${.CURDIR}/../libs/src/timer/obj/libtimer.a \
	${.CURDIR}/../libs/src/pq/obj/libpq.a \
	${.CURDIR}/../libs/src/str/obj/libstr.a \
	${.CURDIR}/../libs/src/xlog/obj/libxlog.a \
	${.CURDIR}/../libs/src/pset/obj/libpset.a \
	${.CURDIR}/../libs/src/misc/obj/libmisc.a \
	${.CURDIR}/../libs/src/sio/obj/libsio.a
LDADD+=	-lrpc
DPADD+=	${LIBRPC}
CFLAGS+= -I${.CURDIR}/../libs/src/misc -I${.CURDIR}/../libs/src/pq \
	-I${.CURDIR}/../libs/src/pset -I${.CURDIR}/../libs/src/sio \
	-I${.CURDIR}/../libs/src/str -I${.CURDIR}/../libs/src/timer \
	-I${.CURDIR}/../libs/src/xlog ${VERSION_DEF}
SRCS=	access.c addr.c builtins.c child.c conf.c confparse.c connection.c \
	env.c flags.c ident.c init.c int.c intcommon.c internals.c \
	log.c logctl.c main.c msg.c nvlists.c options.c parse.c parsers.c \
	parsesup.c reconfig.c retry.c sconf.c server.c service.c shutdown.c \
	signals.c special.c tcpint.c time.c udpint.c util.c
HDRS=	access.h addr.h attr.h builtin.h conf.h config.h connection.h defs.h \
	flags.h int.h log.h mask.h options.h parse.h sconf.h sconst.h \
	server.h service.h state.h
MAN1=	xinetd.0
MAN5=	xinetd.conf.0 xinetd.log.0
MLINKS=	xinetd.1 xinetd.5

DEFS=
#
# Possible flags that can be defined in DEFS:
#
#     -DCUSTOMCONF	if you want to change any of the constants that
#			affect xinetd's behavior (check config.h)
#     -DNO_POSIX_TYPES  if your OS does not know about POSIX types like pid_t
#     -DNO_TERMIOS      if you don't have /usr/include/sys/termios.h
#     -DOLD_WAIT        if your OS supports union wait
#     -DNO_RPC          if your OS does not support RPC
#     -DNO_SIGLIST      if your C library does not contain sys_siglist
#     -DNO_TIMERS	if you don't want to use the timer library
#
# About signal handling:
#  Case 1: POSIX signal handling is supported
#     You don't need to define anything
#  Case 2: BSD signal handling is supported (i.e. sigvec(2))
#     Use -DNO_POSIX_SIGS
#  Case 3: None of the above
#     Use -DNO_POSIX_SIGS and -DNO_SIGVEC
#
# Available debug flags:
#     DEBUG                      code is being debugged
#     DEBUG_SERVER               forked server will do a sleep
#     DEBUG_INTERCEPTOR          forked interceptor will do a sleep
#     DEBUG_SIGNALS              code that handles SIGSEGV and SIGBUS
#     DEBUG_LOGGING              forked logging server will do a sleep
#     DEBUG_SHUTDOWN             forked shutdown server will do a sleep
#     DEBUG_TPCINT               enable debugging code in the tcp interceptor
#     DEBUG_UDPINT               enable debugging code in the udp interceptor
#     DEBUG_DAEMON		 debug xinetd when not invoked with -d option
#     DEBUG_RETRY		 debug the server retry code
#
CFLAGS+= ${DEFS}

.include <bsd.prog.mk>
