aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2021-03-13 14:08:29 +0300
committerCem Keylan <cem@ckyln.com>2021-03-13 14:08:29 +0300
commit0ea3661a6ba0baaa39b95e836e8f2c87e2f4c20f (patch)
treeb4f26bf5b77a8818c972a36d01b29adb533a5c83 /Makefile
parentedf65a21574455989192e1a91453aa6f7dc90d53 (diff)
downloadotools-0ea3661a6ba0baaa39b95e836e8f2c87e2f4c20f.tar.gz
add configuration for fts, handle if it is available on system1.3.1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d10f3e4..2194ac4 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,6 @@ LIBOBJ = \
lib/libc/crypt/arc4random.o \
lib/libc/crypt/arc4random_uniform.o \
lib/libc/crypt/blowfish.o \
- lib/libc/gen/fts.o \
lib/libc/gen/getprogname.o \
lib/libc/gen/pwcache.o \
lib/libc/gen/readpassphrase.o \
@@ -48,6 +47,14 @@ LIBOBJ = \
lib/libutil/ohash.o \
lib/libutil/pidfile.o
+ifeq (${FTS}, 0)
+LIBOBJ += lib/libc/gen/fts.o
+else
+CFLAGS += -DHAVE_FTS
+ ifeq (${FTS}, 1)
+ LIBFTS = -lfts
+ endif
+endif
MAN = \
usr.bin/diff/diff.1 \
@@ -194,7 +201,7 @@ MANDOCOBJ = \
usr.bin/mandoc/tree.o
BINOBJ += ${MANDOCOBJ}
mandoc: ${MANDOCOBJ} ${LIB}
- ${CC} ${LDFLAGS} -o $@ ${MANDOCOBJ} ${LIB} ${ZLIB}
+ ${CC} ${LDFLAGS} -o $@ ${MANDOCOBJ} ${LIB} ${ZLIB} ${LIBFTS}
# ------------------------------------------------------------------------------
# md5
@@ -239,7 +246,7 @@ PAXOBJ = \
bin/pax/tty_subs.o
BINOBJ += ${PAXOBJ}
pax: ${PAXOBJ} ${LIB}
- ${CC} ${LDFLAGS} -o $@ ${PAXOBJ} ${LIB}
+ ${CC} ${LDFLAGS} -o $@ ${PAXOBJ} ${LIB} ${LIBFTS}
# ------------------------------------------------------------------------------
# patch