# $Header: makefile,v 72.2 92/12/18 16:47:11 ssa Exp $

# Common makefile for rcs command

INC	= ../include
PFLAGS  = -I$(INC)
LIBS	= ../lib/librcs.a -lBUILD

default: rcs

metrics: rcs.M

rcs:    rcs.o ../hpux_rel.o
	$(CC) $(LDFLAGS) rcs.o ../hpux_rel.o $(LIBS) -o rcs

rcs.M:    rcs.c ../hpux_rel.c
	$(METRICS) $(CFLAGS) $(PFLAGS) rcs.c ../hpux_rel.c $(LIBS) -o rcs.M

clean:		
	rm -f core rcs.o

clobber: clean
	rm -f rcs rcs.M

rcs.o:  $(INC)/system.h $(INC)/bin.h \
	$(INC)/rcsbase.h $(INC)/copyright.h

# Redefine the .c to .o rule as to include PFLAGS
.c.o:
	$(CC) $(CFLAGS) $(PFLAGS) -c $<
