# 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

DEST=@DEST@
TOP_INCDIR=@TOP_INCDIR@
TOP_LIBDIR=@TOP_LIBDIR@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
libexecdir=@libexecdir@
libdir=@libdir@
includedir=@includedir@
mandir=@mandir@
afssrvbindir=@afssrvbindir@
afssrvsbindir=@afssrvsbindir@
afssrvlibexecdir=@afssrvlibexecdir@
COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
RXGEN=${TOP_SRCDIR}/rxgen/rxgen
TOP_SRCDIR=@TOP_SRCDIR@
SYS_NAME=@AFS_SYSNAME@

SHELL=/bin/sh

include ../../config/Makefile.${SYS_NAME}

INCDIRS=-I. -I.. -I${TOP_INCDIR} ${FSINCLUDES}
INSTALL = ${SRCDIR}/bin/install
LDFLAGS = ${OPTMZ} ${PROF} ${LDIRS} ${XLDFLAGS}

LIBS=${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/vlib.a \
	${TOP_LIBDIR}/util.a \
	${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libdir.a \
	${TOP_LIBDIR}/liblwp.a  ${TOP_LIBDIR}/libacl.a ${XLIBS}

NAMEI_LIBS=../vlib.a ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/liblwp.a

CFLAGS = -D${SYS_NAME} ${OPTMZ} ${INCDIRS} ${XCFLAGS} -g

PROGS = listVicepx

PUBLICHEADERS=../nfs.h ../vnode.h ../viceinode.h ../volume.h ../vldb.h \
	../voldefs.h ../partition.h ../fssync.h ../inodeops.h

OBJECTS=listVicepx.o utilities.o  updateDirInode.o

all: listVicepx updateDirInode testpart

kinstall:
	@echo No kernel source here.

install:   

${OBJECTS}: ${PUBLICHEADERS} ${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h ${TOP_INCDIR}/afs/afsint.h ../filesignal.h ../vutils.h ../vldb.h ../salvage.h ../volinodes.h ../qiin.h

listVicepx.o:	listVicepx.c  utilities.c
		${CC} ${CFLAGS} -c listVicepx.c
		${CC} ${CFLAGS} -c utilities.c

testpart:	testpart.c ../vlib.a
		${CC} ${CFLAGS} ${LDFLAGS} -o $@ testpart.c \
		${TOP_LIBDIR}/vlib.a ${TOP_LIBDIR}/liblwp.a \
		${TOP_LIBDIR}/util.a ${XLIBS}
		

listVicepx:	listVicepx.o utilities.o 
		${CC} ${LDFLAGS} -o listVicepx listVicepx.o utilities.o ${LIBS} 

updateDirInode.o:	updateDirInode.c  
		${CC} ${CFLAGS} -c updateDirInode.c

updateDirInode:	updateDirInode.o 
		${CC} ${LDFLAGS} -o updateDirInode updateDirInode.o ${LIBS} 


NAMEI_PROGS = nicreate nincdec nino nilist
namei: ${NAMEI_PROGS}

nicreate: nicreate.o nsubr.o
	${CC} ${CFLAGS} -o nicreate nicreate.o nsubr.o ${NAMEI_LIBS}

nincdec: nincdec.o nsubr.o
	${CC} ${CFLAGS} -o nincdec nincdec.o nsubr.o ${NAMEI_LIBS}

nilist: nilist.o nsubr.o
	${CC} ${CFLAGS} -o nilist nilist.o nsubr.o ${NAMEI_LIBS}

nino: nino.o
	${CC} ${CFLAGS} -o nino nino.o ${TOP_LIBDIR}/util.a

clean:
	$(RM) -f *.o *.a 
	$(RM) -f ${SCMPROGS} ${STAGEPROGS} core listVicepx updateDirInode
dest:   

