# $Source: /hpux/shared/supp//usr/src/cmd/vis/./makefile,v $
# $Revision: 72.1 $

# Common makefile for vis

FINDMSG = /usr/bin/findmsg
GENCAT = /usr/bin/gencat

default: all

all:	vis vis.cat

metrics:	vis.M

vis:	vis.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o vis vis.c

vis.M:	vis.c
	$(METRICS) $(CFLAGS) -o vis.M vis.c

clean:
	/bin/rm -f vis.o vis.msg

clobber: clean
	 /bin/rm -f vis vis.cat vis.M

vis.cat: vis.msg

#
# We define two rules for creating .cat and .msg files so make can do that
# work for us.  With these rules, it is only necessary to specify that the
# .cat depends on the .msg.  Make will automatically know to create the .msg
# from the .c and how to create the .cat file.
#

.c.msg:
	${FINDMSG} $*.c >$*.msg

.msg.cat:
	${GENCAT} $*.cat $*.msg

.SUFFIXES: .cat .msg
