# Generated automatically from Makefile.in by configure.
SHELL = /bin/sh

prefix=/usr/athena
exec_prefix=${prefix}
datadir=${prefix}/share
confdir=/etc/athena/zephyr
sbindir=${exec_prefix}/sbin
lsbindir=/etc/athena

includedir=$(prefix)/include
mandir=$(prefix)/man
libdir=$(exec_prefix)/lib

srcdir=.
top_srcdir=..
BUILDTOP=..
CC=gcc
INSTALL=/mit/gnu/sun4bin/ginstall -c
COMPILE_ET=compile_et

DEBUG=-O
CFLAGS=	$(DEBUG) -DCONFDIR=\"$(confdir)\" -I$(top_srcdir)/h -I$(BUILDTOP)/h \
	-I.  -I/usr/athena/include
LDFLAGS=$(DEBUG) -L$(BUILDTOP)/lib/zephyr   -L/usr/athena/lib
LIBS=-lzephyr -lkrb -ldes -lkrb -lhesiod -lhesiod -lresolv -lnsl -lsocket -ldl -lw  -lcom_err

OBJS=	zsrv_err.o access.o acl_files.o bdump.o class.o client.o common.o \
	dispatch.o kopt.o kstuff.o main.o server.o subscr.o timer.o uloc.o \
	zstring.o version.o

all: zephyrd

zephyrd: $(OBJS) $(BUILDTOP)/lib/zephyr/libzephyr.a 
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

zsrv_err.c zsrv_err.h: zsrv_err.et
	$(COMPILE_ET) $(srcdir)/zsrv_err.et

version.o: version.h

version.h: always
	sh $(srcdir)/new_vers.sh

check:

# No dependency on zephyrd, to avoid rebuilding version.o.
install:
	$(INSTALL) -m 755 -s zephyrd $(sbindir)
	$(INSTALL) -m 644 $(srcdir)/zephyrd.8 $(mandir)/man8
	$(INSTALL) -m 644 $(srcdir)/default.subscriptions $(confdir)
	rm -f $(confdir)/acl/?*.acl
	cp $(srcdir)/acl/?*.acl $(confdir)/acl
	chmod 644 $(confdir)/acl/*

clean:
	rm -f $(OBJS) zephyrd zsrv_err.[ch]

always:

$(OBJS): zserver.h zsrv_err.h timer.h zsrv_conf.h zstring.h access.h acl.h
$(OBJS): $(top_srcdir)/h/internal.h $(top_srcdir)/h/sysdep.h
$(OBJS): $(BUILDTOP)/h/config.h $(BUILDTOP)/h/zephyr/zephyr.h
$(OBJS): $(BUILDTOP)/h/zephyr/zephyr_err.h

.PHONY: all check install clean always

