# 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
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@


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

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} ${ARCHFLAGS} -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

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:   

