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

prefix=/afs/sipb/project/amanda/dev/nocturne/install
exec_prefix=${prefix}
datadir=${prefix}/share
confdir=/etc/amanda
sbindir=${exec_prefix}/sbin

mandir=${prefix}/man/man8
bindir=${prefix}/bin

srcdir=../../../sysadmin/amanda/common-src
top_srcdir=../../../sysadmin/amanda
BUILDTOP=..
VPATH=../../../sysadmin/amanda/common-src
CC=gcc
ENSUREDIR=${srcdir}/ensure-dir.sh
INSTALL=/mit/gnu/arch/sgi_53/bin/ginstall -c
RANLIB=ranlib

DEBUG=-O
CFLAGS=${DEBUG} -DCONFDIR=\"${confdir}\" -I${BUILDTOP} -I${top_srcdir}/config 
#  -I${top_srcdir}/common-src 

INFOFILE=infofile.o
TAPEIO=tapeio.o
REGEX=${BUILDTOP}/regex/regex.o 
REGEXSRC=${top_srcdir}/regex/regex.c
REGEXDIR=${BUILDTOP}/regex

#   if the flock autoconf stuff works, these two lines and the $(FLOCK) in
#   OBJS= can be removed. Ditto for MKTIME ...

# FLOCK=@flock@
FLOCK=
KRB=
# MKTIME=@mktime@
MKTIME=


# LIBOBJS contains all the names of functions which were not found in
# the C library and which are to be replaced by definitions in the
# named functions. Set by AC_REPLACE_FUNCS().
LIBOBJS=

OBJS=  error.o alloc.o stralloc.o clock.o dgram.o stream.o protocol.o \
	statfs.o debug.o conffile.o diskfile.o tapefile.o logfile.o \
	changer.o version.o match.o amandates.o unctime.o getfsent.o \
	$(INFOFILE) $(REGEX) $(FLOCK) $(TAPEIO) $(KRB) \
	$(MKTIME) $(LIBOBJS)

all common client server: libamanda.a

version.c: ${top_srcdir}/common-src/genversion.c ${top_srcdir}/common-src/version.h
	$(CC) $(CFLAGS) -o genversion ${top_srcdir}/common-src/genversion.c
	./genversion > version.c

libamanda.a: $(OBJS)
	ar cru $@ ${OBJS}
	${RANLIB} $@

clean:
	-rm -f ${OBJS} libamanda.a genversion version.c

mostlyclean: clean

realclean distclean: clean
	-rm -f Makefile

install:

$(REGEX): $(REGEXSRC)
	(cd ${BUILDTOP} && ${MAKE} regex)

conffile.o: conffile.h amanda.h
diskfile.o: diskfile.h conffile.h amanda.h
tapefile.o: tapefile.h amanda.h
infofile.o: infofile.h amanda.h
logfile.o:  logfile.h conffile.h amanda.h
clock.o:    clock.h amanda.h
stream.o:   stream.h amanda.h
dgram.o:    dgram.h amanda.h
tapeio.o:   tapeio.h amanda.h
statfs.o:   statfs.h amanda.h
changer.o:  changer.h amanda.h
version.o:  version.c

.PHONY: all common client server check install clean

tests: test-getfsent test-statfs
	./test-getfsent
	./test-statfs

test-getfsent: ${srcdir}/getfsent.c
	$(CC) $(CFLAGS) -o test-getfsent ${srcdir}/getfsent.c -DSTANDALONE_TEST

test-statfs: ${srcdir}/statfs.c
