PROGRAM			= cat
GENCAT                  = gencat
MSGHDRS			= $(PROGRAM)_msg.h
CATFILE                 = $(PROGRAM).cat
MSGFILES                = $(PROGRAM).msg
IDIR			= /usr/bin/
HFILES			= $(MSGHDRS)
OBJECTS			= $(PROGRAM).o

FLAGS			= -Ae -D__STDC_EXT__ -D_HPUX_SOURCE -D_FILE_OFFSET_BITS=64

default: $(PROGRAM) $(PROGRAM).cat

$(PROGRAM):	$(HFILES) $(OBJECTS)
	$(CC) $(CFLAGS) $(FLAGS) -o $@ $(OBJECTS) $(LIBS)
	$(GENCAT) $(CATFILE) $(MSGFILES)
$(PROGRAM).cat:	$(PROGRAM).msg
	$(GENCAT) $@ $(MSGFILES)
#
# Next rule not normally needed since cat_msg.h is checked into shared source.
# However, if we get new updates form OSF with changes to cat.msg, then this
# rule needs to be applied once to get a new cat_msg.h and check it into
# shred source.  Alex Leontiev 10/27/93
#
# $(MSGHDRS):
# 	$(MK_HDR) $(PROGRAM) $(PROGRAM).msg > $(PROGRAM)_msg

.c.o:
	$(CC) -c $(CFLAGS) $(FLAGS) $<

clean:
	rm -f cat.o

clobber: clean
	rm -f cat
