386BSD 0.1 development
[unix-history] / usr / src / usr.bin / grep / Makefile.gnu
CommitLineData
9fcd019c
WJ
1#
2# Makefile for GNU e?grep
3#
4
5# Add -DUSG for System V.
6CFLAGS = -O
7
8#
9# You may add getopt.o if your C library lacks getopt(); note that
10# 4.3BSD getopt() is said to be somewhat broken.
11#
12# Add alloca.o if your machine does not support alloca().
13#
14OBJS = dfa.o regex.o
15GOBJ = grep.o
16EOBJ = egrep.o
17
18# Space provided for machine dependent libraries.
19LIBS =
20
21all: regress
22
23regress: egrep grep
24 cd tests; sh regress.sh
25
26egrep: $(OBJS) $(EOBJ)
27 $(CC) $(CFLAGS) -o egrep $(OBJS) $(EOBJ) $(LIBS)
28
29egrep.o: grep.c
30 rm -f egrep.c; cp grep.c egrep.c
31 $(CC) $(CFLAGS) -DEGREP -c egrep.c
32 rm -f egrep.c
33
34grep: $(OBJS) $(GOBJ)
35 $(CC) $(CFLAGS) -o grep $(OBJS) $(GOBJ) $(LIBS)
36
37clean:
38 rm -f grep egrep *.o core tests/core tests/tmp.script \
39 tests/khadafy.out egrep.c
40
41dfa.o egrep.o grep.o: dfa.h
42egrep.o grep.o regex.o: regex.h