#       $NetBSD: Makefile.inc,v 1.20 2000/01/22 20:35:57 mycroft Exp $


.include <bsd.own.mk>

CPPFLAGS+= -I${.CURDIR}/../../include
# XXX the next two should be unnecessary and will GO AWAY
CPPFLAGS+= -I${DESTDIR}/usr/include/kerberosIV
CPPFLAGS+= -I${.CURDIR}/../../include/ss
MK_CMDS?= mk_cmds
COMPILE_ET?= compile_et

# Turn these off for now
# NOPIC=	nopic
# NOPROFILE= noprof

COMERROBJDIR!=cd ${.CURDIR}/../libcom_err; \
	printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-

CRYPTOBJDIR!=cd ${.CURDIR}/../../../lib/libcrypt; \
	printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-

KRBOBJDIR!=cd ${.CURDIR}/../libkrb; \
	printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-

.SUFFIXES: .c .ct
.ct.c:
	${MK_CMDS} ${.IMPSRC}

.SUFFIXES: .c .et
.SUFFIXES: .h .et
.et.c .et.h:
	${COMPILE_ET} ${.IMPSRC}

# delete generated .c and .h files
DPSRCS += $(SRCS:M*.ct:.ct=.c) $(SRCS:M*.et:.et=.c) $(SRCS:M*.et:.et=.h)

.ifdef KERBEROS5
CPPFLAGS+= -I${DESTDIR}/usr/include/krb5 \
	-DKRB5_KRB4_COMPAT
.endif
