# 	Makefile for cawf

#	Define UNIX for standard Unix systems.
#
#	Define UNIX and USG for System V Unix systems.
#
#DEFS = -DUNIX -DUSG ...
#
#	Define STDLIB for systems that have <stdlib.h>.
#
#	Redefine CAWFLIB by adding -DCAWFLIB=\"...\" to DEFS.
#
#DEFS = -DUNIX -DUSG -DCAWFLIB=\"/usr/local/lib/cawf\"
#
#	Customize the install rule.

DEFS = -DUNIX -DUSG -DSTDLIB -DCAWFLIB=\"/usr/local/lib/cawf\"

CC = cc -2 -j -Osal -w3 -zc
CFLAGS = ${DEFS} -N8k

HDR = cawf.h cawflib.h regexp.h regmagic.h

SRC = cawf.c error.c expand.c expr.c getopt.c macsup.c output.c pass2.c \
      pass3.c regerror.c regexp.c store.c string.c

OBJ = cawf.o error.o expand.o expr.o getopt.o macsup.o output.o pass2.o \
      pass3.o regerror.o regexp.o store.o string.o

all:	bsfilt cawf fontfilt

bsfilt: bsfilt.c
	${CC} ${CFLAGS} bsfilt.c -o bsfilt

cawf:	${OBJ}
	${CC} ${CFLAGS} ${OBJ} -o cawf

clean:
	rm -f *.o a.out core *errs bsfilt cawf fontfilt

${OBJ}:	${HDR}

fontfilt: fontfilt.o getopt.o	
	${CC} ${CFLAGS} fontfilt.o getopt.o -o fontfilt

install: bsfilt cawf fontfilt
