# $Source: /hpux/shared/supp//usr/src/cmd/text/./tbl.d/makefile,v $
# $Revision: 72.3 $

# Common makefile for tbl

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

OFILES  = t0.o t1.o t2.o t3.o t4.o t5.o t6.o t7.o t8.o t9.o tb.o tc.o\
 	  te.o tf.o tg.o ti.o tm.o tr.o ts.o tt.o tu.o tv.o hpux_rel.o
CFILES  = t0.c t1.c t2.c t3.c t4.c t5.c t6.c t7.c t8.c t9.c tb.c tc.c\
 	  te.c tf.c tg.c ti.c tm.c tr.c ts.c tt.c tu.c tv.c hpux_rel.c
MSGSRC  = t1.c t3.c t4.c t5.c t6.c t7.c t8.c t9.c tb.c tc.c te.c tg.c tr.c

default: all

all:	tbl tbl.cat

metrics:	tbl.M

tbl:	$(OFILES) 
	$(CC) $(LDFLAGS) -o tbl $(OFILES)

tbl.M:	$(CFILES) 
	$(METRICS) $(CFLAGS) -o tbl.M $(CFILES)

tbl.cat: $(MSGSRC)
	for i in $(MSGSRC); do \
		$(FINDMSG) $$i >tbl.msg;\
		$(GENCAT) $@ tbl.msg;\
	done

$(OFILES): t..c
	$(CC)  -Aa -D_HPUX_SOURCE -c  $*.c

clean:
	rm -f *.o tbl.msg

clobber: clean
	rm -f tbl tbl.cat tbl.M
