# 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

#
# Main targets
#
all: \
	${TOP_LIBDIR}/libacl.a \
	depinstall

depinstall: \
	${TOP_INCDIR}/afs/acl.h \
	${TOP_INCDIR}/afs/prs_fs.h 

libacl.a: aclprocs.o netprocs.o AFS_component_version_number.o
	$(RM) -f $@
	$(AR) crv $@ aclprocs.o netprocs.o AFS_component_version_number.o
	$(RANLIB) $@

aclprocs.o: aclprocs.c acl.h

netprocs.o: netprocs.c acl.h

#
# Installation targets
#

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

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

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

install: \
	${DESTDIR}${libdir}/afs/libacl.a \
	${DESTDIR}${includedir}/afs/acl.h \
	${DESTDIR}${includedir}/afs/prs_fs.h

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

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

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

dest: ${DEST}/lib/afs/libacl.a \
	${DEST}/include/afs/acl.h \
	${DEST}/include/afs/prs_fs.h

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

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

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


#
# Misc. targets
#
test:
	cd test; $(MAKE)

clean: 
	$(RM) -f acltest *.o *.a core AFS_component_version_number.c

include ../config/Makefile.version


