# 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

CC = ${MT_CC}
CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS}
CCRULE = ${CC} ${CFLAGS} -c $?

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

install: ${DESTDIR}${includedir}/afs/afs_bosAdmin.h ${DESTDIR}${libdir}/afs/libbosadmin.a

dest: ${DEST}/include/afs/afs_bosAdmin.h ${DEST}/lib/afs/libbosadmin.a

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

${DEST}/include/afs/afs_bosAdmin.h: afs_bosAdmin.h
	${INSTALL} $? $@

${DESTDIR}${includedir}/afs/afs_bosAdmin.h: afs_bosAdmin.h
	${INSTALL} $? $@


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

${DEST}/lib/afs/libbosadmin.a: libbosadmin.a
	${INSTALL} $? $@

${DESTDIR}${libdir}/afs/libbosadmin.a: libbosadmin.a
	${INSTALL} $? $@


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

afs_bosAdmin.o: afs_bosAdmin.h

bosint.xdr.o: ${BOZO}/bosint.xdr.c
	${CCRULE}

bosint.cs.o: ${BOZO}/bosint.cs.c
	${CCRULE}

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