#
# To Build tgrep, just enter "make"
#
######################### STOP EDITING NOW ###########################
PROGRAM=libpat.a

include ../../Rules.runtime

.KEEP_STATE: 

SRC_FILES= pmatch.c bmpmatch.c
HEADER_FILES=pmatch.h proto.h debug.h
OBJ_FILES=$(SRC_FILES:%.c=%.o)

all: $(PROGRAM) tgrep.man

tgrep.man: tgrep.1
	nroff -man tgrep.1 > tgrep.man

$(PROGRAM): $(OBJ_FILES)
	ar -r $(PROGRAM) $(OBJ_FILES)

%.o : %.c $(HEADER_FILES)
	$(CC) $(CFLAGS) -c $< -o $@

clean: 
	rm -f $(OBJ_FILES) *~ *.bak

clobber: clean
	rm -f $(PROGRAM) *.flc tgrep.man
