# 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 $?

PTSERVER = ../../ptserver/

ADMINOBJS = \
	afs_ptsAdmin.o

PTSERVEROBJS = \
	ptint.xdr.o \
	ptint.cs.o

LIBOBJS = ${ADMINOBJS} ${PTSERVEROBJS}

all: ${TOP_INCDIR}/afs/afs_ptsAdmin.h ${TOP_LIBDIR}/libptsadmin.a

install: ${DESTDIR}${includedir}/afs/afs_ptsAdmin.h ${DESTDIR}${libdir}/afs/libptsadmin.a

dest: ${DEST}/include/afs/afs_ptsAdmin.h ${DEST}/lib/afs/libptsadmin.a

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

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

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

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

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

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

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

afs_ptsAdmin.o: afs_ptsAdmin.h

ptint.xdr.o: ${PTSERVER}/ptint.xdr.c
	${CCRULE}

ptint.cs.o: ${PTSERVER}/ptint.cs.c
	${CCRULE}

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