# Where to find things and to put things
P_INC	= ../../include
INSTDIR	= UNDEFINED

# libraries should be relative to this dir, not SRC
SRV_LIB	= libpsrv.a

# args to cc, etc.
CC	= cc
F_CC	= -g -c 
F_CPP	= -I${P_INC} ${MACHDEF} 

CFILES = \
	change_acl.c \
	check_acl.c \
	check_nfs.c \
	dsdir.c \
	dsdb.c \
	dsfile.c \
	plog.c \
	reply.c \
	rdgram.c \
	retrieve_fp.c

OBJECTS	= \
	change_acl.o \
	check_acl.o \
	check_nfs.o \
	dsdir.o \
	dsdb.o \
	dsfile.o \
	plog.o \
	reply.o \
	rdgram.o \
	retrieve_fp.o


CODE	= ${CFILES} Makefile

all:	${SRV_LIB}

install:
	cp ${SRV_LIB} ${INSTDIR}/${SRV_LIB}
	ranlib ${INSTDIR}/${SRV_LIB}

clean:
	rm -f a.out core *~ tags TAGS
	rm -f ${OBJECTS} ${SRV_LIB} 

src:	${CODE}

${CODE}:
	co -q $@

${OBJECTS}:
	${CC} ${F_CC} ${F_CPP} $*.c

${SRV_LIB}: ${OBJECTS}
	rm -f ${SRV_LIB}
	ar rv ${SRV_LIB} ${OBJECTS}
	ranlib ${SRV_LIB}

# Dependencies
change_acl.o: ../../include/pauthent.h
change_acl.o: ../../include/pfs.h
change_acl.o: ../../include/plog.h
change_acl.o: ../../include/pmachine.h
change_acl.o: ../../include/pprot.h
change_acl.o: ../../include/psite.h
check_acl.o: ../../include/pauthent.h
check_acl.o: ../../include/pfs.h
check_acl.o: ../../include/plog.h
check_acl.o: ../../include/pmachine.h
check_acl.o: ../../include/pprot.h
check_acl.o: ../../include/psite.h
check_nfs.o: ../../include/pfs.h
check_nfs.o: ../../include/pmachine.h
dsdb.o: ../../include/perrno.h
dsdb.o: ../../include/pfs.h
dsdb.o: ../../include/plog.h
dsdb.o: ../../include/pmachine.h
dsdb.o: ../../include/pprot.h
dsdb.o: ../../include/psite.h
dsdir.o: ../../include/perrno.h
dsdir.o: ../../include/pfs.h
dsdir.o: ../../include/plog.h
dsdir.o: ../../include/pmachine.h
dsdir.o: ../../include/pprot.h
dsfile.o: ../../include/perrno.h
dsfile.o: ../../include/pfs.h
dsfile.o: ../../include/plog.h
dsfile.o: ../../include/pmachine.h
dsfile.o: ../../include/pprot.h
plog.o: ../../include/pfs.h
plog.o: ../../include/plog.h
plog.o: ../../include/pmachine.h
plog.o: ../../include/psite.h
reply.o: ../../include/perrno.h
reply.o: ../../include/pfs.h
reply.o: ../../include/plog.h
reply.o: ../../include/pprot.h
retrieve_fp.o: ../../include/perrno.h
retrieve_fp.o: ../../include/pfs.h
