####################################
# This is a makefile for mawk,
# an implementation of AWK (1988).
####################################
# This builds a regular expression library
# Remove the -DMAWK and the library has general use.
# CFLAGS for typical V7 system
CFLAGS = -O -DMAWK -Dstrchr=index -Dvoid=int
O=rexp.o rexp0.o rexp1.o rexp2.o rexp3.o rexpdb.o
# The following stuff is for compilers whose symbols are unique only
# to 7 (external) or 8 (local) characters.
hash8 encode ../TABLE <$< >$*.c
$(CC) $(CFLAGS) $(CFLAGS2) -c $*.c 2>&1 | hash8 decode ../TABLE
$(CC) $(CFLAGS) $(CFLAGS2) -c $*.c 2>&1 | hash8 decode ../TABLE
hash8 encode ../TABLE <$< >$*.c
hash8 encode ../TABLE <$< >$@
#######################################
if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then\
ranlib regexp.a ; else true ; fi