# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
# 
# This software has been released under the terms of the IBM Public
# License.  For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html

srcdir=@srcdir@
include @TOP_OBJDIR@/src/config/Makefile.config
include @TOP_OBJDIR@/src/config/Makefile.pthread


BOZO = ../../bozo

ADMINOBJS = afs_bosAdmin.o

BOZOOBJS = bosint.xdr.o bosint.cs.o

LIBOBJS = ${ADMINOBJS} ${BOZOOBJS}

all: ${TOP_INCDIR}/afs/afs_bosAdmin.h ${TOP_LIBDIR}/libbosadmin.a

${TOP_INCDIR}/afs/afs_bosAdmin.h: afs_bosAdmin.h
	${INSTALL_DATA} $? $@

${TOP_LIBDIR}/libbosadmin.a: libbosadmin.a
	${INSTALL_DATA} $? $@

install: libbosadmin.a afs_bosAdmin.h
	${INSTALL} -d ${DESTDIR}${includedir}/afs
	${INSTALL} -d ${DESTDIR}${libdir}/afs
	${INSTALL_DATA} ${srcdir}/afs_bosAdmin.h ${DESTDIR}${includedir}/afs/afs_bosAdmin.h
	${INSTALL_DATA} libbosadmin.a ${DESTDIR}${libdir}/afs/libbosadmin.a

dest: libbosadmin.a afs_bosAdmin.h
	${INSTALL} -d ${DEST}/include/afs
	${INSTALL} -d ${DEST}/lib/afs
	${INSTALL_DATA} ${srcdir}/afs_bosAdmin.h ${DEST}/include/afs/afs_bosAdmin.h
	${INSTALL_DATA} libbosadmin.a ${DEST}/lib/afs/libbosadmin.a

libbosadmin.a: ${LIBOBJS}
	-$(RM) -f $@
	$(AR) crv $@ ${LIBOBJS}
	${RANLIB} $@

afs_bosAdmin.o: afs_bosAdmin.c afs_bosAdmin.h

bosint.xdr.o: ${BOZO}/bosint.xdr.c
	$(AFS_CCRULE) $(BOZO)/bosint.xdr.c

bosint.cs.o: ${BOZO}/bosint.cs.c
	$(AFS_CCRULE) $(BOZO)/bosint.cs.c

clean:
	$(RM) -f *.o libbosadmin*
