# This file was generated automatically by configure.  Do not edit.
VPATH = .
links = 
host_alias = i386-unknown-netbsd1.1
host_cpu = i386
host_vendor = unknown
host_os = netbsd1.1
host_canonical = i386-unknown-netbsd1.1
target_alias = i386-unknown-netbsd1.1
target_cpu = i386
target_vendor = unknown
target_os = netbsd1.1
target_canonical = i386-unknown-netbsd1.1
common_makefile_frag = ../config/common
target_makefile_frag = ../config/mt-netbsd_le
host_makefile_frag = ../config/host
site_makefile_frag = .././config/ms-athena
postfix_makefile_frag = ../config/postfix
ALL=all.internal
#### include configury here
## common makefile fragment from Imake.tmpl
SRCTOP=$(srcdir)/$(BUILDTOP)
INCLUDE= $(LOCALINCLUDE) -I$(BUILDTOP)/include -I$(SRCTOP)/include -I$(srcdir)
GLOBAL_CDEFS=$(TARGET_CDEFS) $(DBMFLAG) $(SHMFLAG) $(SITE_CDEFS)
CFLAGS=$(DBG) $(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)
DEPEND=true

srcdir = .
VPATH=$(srcdir)

BASEDIR = /usr
USRDIR  = $(BASEDIR)/kerberos
SVRDIR  = $(USRDIR)/etc
DAEMDIR = $(USRDIR)/etc
PROGDIR = $(USRDIR)/bin
LIBDIR  = $(USRDIR)/lib
INCLDIR = $(USRDIR)/include
MANDIR  = $(USRDIR)/man
KDBDIR  = $(USRDIR)/database
KLOGDIR = $(USRDIR)/database
CONFDIR = $(USRDIR)/etc
INSTDIR = $(USRDIR)/install
SRVTAB_FILE = /etc/krb-srvtab

SITE_KRB_REALM=error-default-realm

### /*
###  * Set ORGANIZATION to be the desired organization string printed
###  * by the 'kinit' program.  It may have spaces.
###  */
### Used in kuser/Makefile.in, kuser/kinit.c
###
ORGANIZATION=Cygnus Support

### /*
###  * Define NOENCRYPTION if you do not have the DES library.
###  */
### /* #define NOENCRYPTION */

### /*
###  * Define NEED_SETENV if you don't have setenv() in your libc.
###  * (likely for older 4.3 systems and pre-4.3 systems)
###  */
### Used in lib/krb/Makefile.in
###
### /* #define NEED_SETENV */
### SETENVSRCS = setenv.c
### SETENVOBJS = setenv.o

### /*
###  * Define TKT_SHMEM if you want to use shared memory for the session
###  * keys in your ticket caches.
###  */
### /* #define TKT_SHMEM */
### SHMFLAG=-DTKT_SHMEM

### if you don't have flock() (ie, posix) then clear this
### Used in email/movemail/Makefile.in, movemail.c
FLOCK=-DMAIL_USE_FLOCK

KRB_LIB=$(BUILDTOP)/lib/krb/libkrb.a
KRB_LIBDEP=$(KRB_LIB)
KADM_LIB=$(BUILDTOP)/lib/kadm/libkadm.a
KADM_LIBDEP=$(KADM_LIB)
ACL_LIB=$(BUILDTOP)/lib/acl/libacl.a
ACL_LIBDEP=$(ACL_LIB)
KSTREAM_LIB=$(BUILDTOP)/lib/kstream/libkstream.a
KSTREAM_LIBDEP=$(KSTREAM_LIB)

DES_LIBDEP=$(BUILDTOP)/lib/des/libdes.a 
DES_LIB=$(DES_LIBDEP) $(BSDLIB)

DBMFLAG=-DNDBM
KDB_LIBDEP=$(BUILDTOP)/lib/kdb/libkdb.a
KDB_LIB=$(BUILDTOP)/lib/kdb/libkdb.a $(LIBNDBM)

.SUFFIXES:  .h .c .et .ct

.et.h:
	$(AWK) -f $(SRCTOP)/util/et/et_h.awk outfile=$*.h $<

.et.c:
	$(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=$*.c $<

### /*
###  * The name of a command which compiles command tables.
###  */
MAKE_COMMANDS= $(BUILDTOP)/util/ss/mk_cmds
.ct.c:
	$(MAKE_COMMANDS) $*.ct

### /*
###  * Loader argument to get the com_err library
###  */
COM_ERR = $(BUILDTOP)/util/et/libcom_err.a
### /*
###  * Dependency name for COM_ERR, if any
###  */
COM_ERR_DEP = $(COM_ERR)
### /*
###  * Loader argument to get the ss library
###  */
SS_LIB = $(BUILDTOP)/util/ss/libss.a
### /*
###  * Dependency name for SS_LIB, if any
###  */
SS_LIBDEP = $(SS_LIB)

### /*
###  * Define DEBUG_LIBS if you want to create versions of the libraries
###  * that have useful debugging information (the default rules will strip
###  * out extra symbols, including debugging symbols, from the symbol
###  * table.)  NOTE:  This only works if you do NOT turn on PROFILED_LIBS
###  * below.
###  * NOTE:  this doesn't turn on the debugging flag for your compiler; do
###  * that with the DBG make variable, below.
###  */
### /* define DEBUG_LIBS */

### /*
###  * Define PROFILED_LIBS if you want to create profiled versions of the
###  * libraries used in Kerberos
###  */
### /* #define PROFILED_LIBS */

### /*
###  * Define PROF_FLAG to be the flag to be passed to your C compiler to
###  * turn on profiling.  For 4.3BSD on a VAX, this should probably be -pg.
###  * For most other systems, it should probably be -p
###  */
### /* #define PROF_FLAG -p */

### /*
###  * The name of a command which builds an object library.
###  */
ARCHIVE= ar cru
### /*
###  * The name of another program needed to post-process the archive.
###  */
RANLIB= ranlib

### /* 
###  * Install commands:  installs a file into the destination tree.
###  * These commands are called with two arguments: the source and the
###  * destination of the install.
###  */
# use install to deal with existing read-only target files.
### /* install a file */
INSTALLFILE=install -c
### /* install a library */ 
INSTALLLIB=install -c
### /* install a program */
INSTALLPROG=install -c
### /* invoke raw install program */
INSTALLRAW=install -c
### /* install a program which should run as root */
INSTALLSUID= echo "FIX UID:"; cp

AWK=awk
LD=ld
AS=as
CC=gcc
CCRO=$(CC)
CPP=$(CC) -E
DBG=-O
TAGGER=etags
MAKE=make
RM=rm -f
MV=mv
CP=cp
LN=ln -s
LPR=lpr -p
CHMOD=chmod
YACC=yacc
LEX=lex
# /* NetBSD little-endian */
#define NEED_REGEX3
REGEX3SRC=regex.c
REGEX3OBJ=regex.o
RPROGS=-DRPROGS_IN_USR_BIN \
	'-DTAB3=(TAB1|TAB2)' -DTABDLY=TBDELAY -DONOCR=0
BYTEORDER=-DHOST_BYTE_ORDER=LSB_FIRST
TARGET_CDEFS= -DATHENA -DKERBEROS -DKRB5 -DPOSIX \
	-DHAVE_GETENV -DO_SYNC=O_FSYNC -DNO_LASTLOG -DSTDARG
BSDLIB=-lcrypt
# we have setenv/getenv in libc
SETENVSRCS = 
SETENVOBJS = 

# use KRB5
KRB5LIBS = -L/mit/krb5/arch/i386_nbsd1/lib -lkrb5 -lcrypto -lcom_err
# empty host config

LOGINPATH="/srvd/patch:/usr/athena/bin:/bin/athena:/usr/bin/X11:/usr/new:/usr/ucb:/usr/bin:/bin:/usr/ibm:/usr/andrew/bin:."

SITE_CDEFS=-DHESIOD -I/usr/athena/include -DDO_REVERSE_RESOLVE
SITE_LOGIN_CDEFS=-DATHENA_ROOT_LOGINS
SITE_KRB_REALM=ATHENA.MIT.EDU

HESIOD_LIB=-L/usr/athena/lib -lhesiod

DBG=-O6

BASEDIR = /usr
USRDIR  = $(BASEDIR)/athena
SVRDIR  = $(USRDIR)/etc
DAEMDIR = $(USRDIR)/etc
PROGDIR = $(USRDIR)/bin
LIBDIR  = $(USRDIR)/lib
INCLDIR = $(USRDIR)/include
MANDIR  = $(USRDIR)/man
CONFDIR = /etc/athena
SRVTAB_FILE = /etc/athena/srvtab

LOCALINCLUDE = -I/mit/krb5/arch/@sys/include
BUILDTOP=..

SSRCS = kadm_server.c kadm_funcs.c admin_server.c kadm_ser_wrap.c
SOBJS = kadm_server.o kadm_funcs.o admin_server.o kadm_ser_wrap.o

PSRCS = kpasswd.c
POBJS = kpasswd.o

ASRCS = kadmin.c
AOBJS = kadmin.o kadmin_cmds.o

USRCS = ksrvutil.c
UOBJS = ksrvutil.o

GSRCS = get_srvtab.c
GOBJS = get_srvtab.o

SRCS = $(SSRCS) $(PSRCS) $(ASRCS) $(USRCS) 

CODE=$(SRCS) kadmin_cmds.ct kadm_server.h.sed

# util is for ss/ss.h
# . is for kadm_server.h
LOCALINCLUDE= -I$(SRCTOP)/util -I$(BUILDTOP)/util -I.

kadm_server.h:	kadm_server.h.sed
	$(RM) kadm_server.h
	sed -e 's*KDBDIR*$(KDBDIR)*g' < $(srcdir)/kadm_server.h.sed > kadm_server.h

all::

# make_cmds(kadmin_cmds)
kadmin_cmds.c: kadmin_cmds.ct
clean::
	$(RM) kadmin_cmds.c kadmin_cmds.o 

clean::
	rm -f kadm_server.h

depend:: kadm_server.h

all:: kpasswd kadmin ksrvutil kadmind get_srvtab build_pwfile

clean::
	$(RM) kpasswd kadmin ksrvutil kadmind build_pwfile

# program(kpasswd,$(POBJS),${COM_ERR_DEP} ${KADM_LIBDEP} ${KRB_LIBDEP} ${DES_LIBDEP},${COM_ERR} ${KADM_LIB} ${KRB_LIB} ${DES_LIB},${PROGDIR})
kpasswd: $(POBJS) ${COM_ERR_DEP} ${KADM_LIBDEP} ${KRB_LIBDEP} ${DES_LIBDEP}
	$(CC) $(CCFLAGS) -o $@ $(POBJS) ${COM_ERR} ${KADM_LIB} ${KRB_LIB} ${DES_LIB}

# program(kadmin,$(AOBJS),${SS_LIBDEP} ${COM_ERR_DEP} ${KADM_LIBDEP} ${KRB_LIBDEP} ${DES_LIBDEP},${SS_LIB} ${COM_ERR} ${KADM_LIB} ${KRB_LIB} ${DES_LIB},${PROGDIR})
kadmin: $(AOBJS) ${SS_LIBDEP} ${COM_ERR_DEP} ${KADM_LIBDEP} ${KRB_LIBDEP} ${DES_LIBDEP}
	$(CC) $(CCFLAGS) -o $@ $(AOBJS) ${SS_LIB} ${COM_ERR} ${KADM_LIB} ${KRB_LIB} ${DES_LIB}

# program(ksrvutil,$(UOBJS),${COM_ERR_DEP} ${KADM_LIBDEP} ${KRB_LIBDEP} ${DES_LIBDEP},${COM_ERR} ${KADM_LIB} ${KRB_LIB} ${DES_LIB},${PROGDIR})
ksrvutil: $(UOBJS) ${COM_ERR_DEP} ${KADM_LIBDEP} ${KRB_LIBDEP} ${DES_LIBDEP}
	$(CC) $(CCFLAGS) -o $@ $(UOBJS) ${COM_ERR} ${KADM_LIB} ${KRB_LIB} ${DES_LIB}

# program(kadmind,$(SOBJS),${HESIOD_LIBDEP} ${COM_ERR_DEP} ${ACL_LIBDEP} ${KADM_LIBDEP} ${KDB_LIBDEP} ${KRB_LIBDEP} ${DES_LIBDEP},${HESIOD_LIB} ${COM_ERR} ${ACL_LIB} ${KADM_LIB} ${KDB_LIB} ${KRB_LIB} ${DES_LIB},${DAEMDIR})
kadmind: $(SOBJS) ${HESIOD_LIBDEP} ${COM_ERR_DEP} ${ACL_LIBDEP} ${KADM_LIBDEP} ${KDB_LIBDEP} ${KRB_LIBDEP} ${DES_LIBDEP}
	$(CC) $(CCFLAGS) -o $@ $(SOBJS) ${HESIOD_LIB} ${COM_ERR} ${ACL_LIB} ${KADM_LIB} ${KDB_LIB} ${KRB_LIB} ${DES_LIB}

get_srvtab: $(GOBJS) ${COM_ERR_DEP} ${KADM_LIBDEP} ${KRB_LIBDEP} ${DES_LIBDEP}
	$(CC) $(CCFLAGS) -o $@ $(GOBJS) ${KADM_LIB} ${KRB_LIB} ${DES_LIB} ${COM_ERR}

# program(build_pwfile,build_pwfile.o,${DES_LIBDEP},${KDB_LIB} ${DES_LIB},${PROGDIR})
build_pwfile: build_pwfile.o ${KDB_LIBDEP} ${DES_LIBDEP}
	$(CC) $(CCFLAGS) -o $@ build_pwfile.o ${KDB_LIB} ${DES_LIB}

install::
	$(INSTALLPROG) kpasswd ${DESTDIR}$(PROGDIR)/kpasswd
	rm -f $(DSETDIR)$(PROGDIR)/passwd
	ln -s kpasswd $(DESTDIR)$(PROGDIR)/passwd
	$(INSTALLPROG) kadmin ${DESTDIR}$(PROGDIR)/kadmin
	$(INSTALLPROG) ksrvutil ${DESTDIR}$(PROGDIR)/ksrvutil
	$(INSTALLPROG) kadmind ${DESTDIR}$(DAEMDIR)/kadmind
	$(INSTALLPROG) get_srvtab ${DESTDIR}$(PROGDIR)/get_srvtab
	$(INSTALLPROG) build_pwfile ${DESTDIR}$(PROGDIR)/build_pwfile

depend:: ${CODE} 

# appended rules that need to be after definitions

depend:: $(SRCS)
	@echo "### Now computing dependencies"
	$(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $?

clean::
	$(RM) *~ \#* *.bak $(TAGSFILE)

# DO NOT DELETE
