############################ -*- Mode: Makefile -*- ###########################
## Makefile
## 
## Description     : NDMP library Makefile
## 
## Copyright (c) 1996,1997 PDC, Network Appliance. All Rights Reserved.
##
## $Id: Makefile,v 1.6 1998/02/09 06:51:35 tim Exp $
## 
###############################################################################

.KEEP_STATE:

CC = gcc
CFLAGS = -g -Wall -W -Wstrict-prototypes

SRCS = log.c comm.c md5c.c ndmp_xdr.c
OBJS = $(SRCS:.c=.o)

all: libndmp.a ndmp.h

libndmp.a: $(OBJS)
	ar rv $@ $?

ndmp.h: ndmp.x
	rpcgen -C -h -o $@ ndmp.x

ndmp_xdr.c: ndmp.x
	rpcgen -c -o $@ ndmp.x

ndmp_xdr.o: ndmp_xdr.c ndmp.h
	$(CC) -c -g ndmp_xdr.c

${OBJS}: ndmp.h

tags:
	etags -t *.[ch]

clean:
	rm -f libndmp.a *.o core *~ TAGS .make.state ndmp.h ndmp_xdr.c
