aboutsummaryrefslogtreecommitdiff
path: root/nss/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'nss/Makefile')
-rw-r--r--nss/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/nss/Makefile b/nss/Makefile
index c49f375e95..16578a3548 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -37,8 +37,10 @@ routines = nsswitch getnssent getnssent_r digits_dots \
databases = proto service hosts network grp pwd rpc ethers \
spwd netgrp key alias sgrp
-others := getent
-install-bin := getent
+others := getent makedb
+install-bin := getent makedb
+makedb-modules = xmalloc hash-string
+extra-objs += $(makedb-modules:=.o)
tests = test-netdb tst-nss-test1
xtests = bug-erange
@@ -60,7 +62,7 @@ extra-libs-others = $(extra-libs)
# The sources are found in the appropriate subdir.
subdir-dirs = $(services:%=nss_%)
-vpath %.c $(subdir-dirs)
+vpath %.c $(subdir-dirs) ../locale/programs ../intl
libnss_files-routines := $(addprefix files-,$(databases)) \
@@ -80,6 +82,10 @@ ifeq (yes,$(build-static-nss))
$(objpfx)getent: $(objpfx)libnss_files.a
endif
+ifeq (yes,$(have-selinux))
+LDLIBS-makedb := -lselinux
+endif
+
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
# This ensures they will load libc.so for needed symbols if loaded by
# a statically-linked program that hasn't already loaded it.
@@ -88,6 +94,8 @@ $(services:%=$(objpfx)libnss_%.so): $(libnss-libc) \
$(common-objpfx)libc_nonshared.a
+$(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o)
+
distribute += nss_test1.c
CFLAGS-nss_test1.c = -DNOT_IN_libc=1