# $Header: makefile,v 72.3 92/12/18 16:47:53 ssa Exp $

# Common makefile for co command in rcs

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

default: all

all:	co

metrics: co.M

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

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

clean:		
	rm -f *.o

clobber: clean
	rm -f co co.M

co.o:	$(INC)/system.h $(INC)/bin.h \
	$(INC)/rcsbase.h $(INC)/time.h

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