aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 23 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 71eb1c6..9e9d30d 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ BIN = \
diff \
doas \
ed \
+ grep \
m4 \
mandoc \
md5 \
@@ -61,6 +62,7 @@ MAN = \
usr.bin/diff/diff.1 \
usr.bin/doas/doas.1 \
usr.bin/doas/doas.conf.5 \
+ usr.bin/grep/grep.1 \
usr.bin/mandoc/apropos.1 \
usr.bin/mandoc/makewhatis.8 \
usr.bin/mandoc/man.1 \
@@ -87,6 +89,13 @@ MAN = \
all: ${BIN}
${BINOBJ}: ${LIB}
+MANDOCLIBS = ${LIB}
+GREPLIBS = ${LIB}
+ifeq (${ZLIB}, lib/libz/libz.a)
+ MANDOCLIBS += ${ZLIB}
+ GREPLIBS += ${ZLIB}
+endif
+
# ------------------------------------------------------------------------------
# diff
DIFFOBJ = \
@@ -133,6 +142,20 @@ ed: ${EDOBJ} ${LIB}
${CC} ${LDFLAGS} -o $@ ${EDOBJ} ${LIB}
# ------------------------------------------------------------------------------
+# grep
+GREPOBJ = \
+ usr.bin/grep/binary.o \
+ usr.bin/grep/file.o \
+ usr.bin/grep/grep.o \
+ usr.bin/grep/mmfile.o \
+ usr.bin/grep/queue.o \
+ usr.bin/grep/util.o
+BINOBJ += ${GREPOBJ}
+
+grep: ${GREPOBJ} ${LIB}
+ ${CC} ${LDFLAGS} -o $@ ${GREPOBJ} ${LIB} -lz
+
+# ------------------------------------------------------------------------------
# m4
M4OBJ = \
usr.bin/m4/eval.o \
@@ -218,10 +241,6 @@ MANDOCOBJ = \
usr.bin/mandoc/term_tag.o \
usr.bin/mandoc/tree.o
BINOBJ += ${MANDOCOBJ}
-MANDOCLIBS = ${LIB}
-ifeq (${ZLIB}, lib/libz/libz.a)
- MANDOCLIBS += ${ZLIB}
-endif
mandoc: ${MANDOCOBJ} ${MANDOCLIBS}
${CC} ${LDFLAGS} -o $@ ${MANDOCOBJ} ${LIB} ${ZLIB} ${LIBFTS}