2018-01-01 08:32:25 +08:00
|
|
|
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
2000-02-29 13:21:42 +08:00
|
|
|
# This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
# The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 12:58:11 +08:00
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
2000-02-29 13:21:42 +08:00
|
|
|
|
|
|
|
# The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 12:58:11 +08:00
|
|
|
# Lesser General Public License for more details.
|
2000-02-29 13:21:42 +08:00
|
|
|
|
2001-07-06 12:58:11 +08:00
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
2012-02-10 07:18:22 +08:00
|
|
|
# License along with the GNU C Library; if not, see
|
|
|
|
# <http://www.gnu.org/licenses/>.
|
2000-02-29 13:21:42 +08:00
|
|
|
|
|
|
|
#
|
2000-03-04 08:47:31 +08:00
|
|
|
# Sub-makefile for crypt() portion of the library.
|
2000-02-29 13:21:42 +08:00
|
|
|
#
|
|
|
|
subdir := crypt
|
|
|
|
|
2014-02-27 07:12:03 +08:00
|
|
|
include ../Makeconfig
|
|
|
|
|
2000-03-04 08:47:31 +08:00
|
|
|
headers := crypt.h
|
|
|
|
|
|
|
|
extra-libs := libcrypt
|
|
|
|
extra-libs-others := $(extra-libs)
|
|
|
|
|
2009-04-03 01:00:46 +08:00
|
|
|
libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \
|
|
|
|
crypt_util
|
2000-03-04 08:47:31 +08:00
|
|
|
|
2012-10-10 18:05:10 +08:00
|
|
|
tests := cert md5c-test sha256c-test sha512c-test badsalttest
|
2000-02-29 13:21:42 +08:00
|
|
|
|
2009-04-03 01:00:46 +08:00
|
|
|
ifeq ($(nss-crypt),yes)
|
2017-10-04 21:02:35 +08:00
|
|
|
nss-cpp-flags := -DUSE_NSS \
|
|
|
|
-I$(shell nss-config --includedir) -I$(shell nspr-config --includedir)
|
2017-12-12 05:11:16 +08:00
|
|
|
CPPFLAGS-sha256-crypt.c += $(nss-cpp-flags)
|
|
|
|
CPPFLAGS-sha512-crypt.c += $(nss-cpp-flags)
|
|
|
|
CPPFLAGS-md5-crypt.c += $(nss-cpp-flags)
|
2009-04-08 02:34:16 +08:00
|
|
|
LDLIBS-crypt.so = -lfreebl3
|
2009-04-03 01:00:46 +08:00
|
|
|
else
|
|
|
|
libcrypt-routines += md5 sha256 sha512
|
|
|
|
|
|
|
|
tests += md5test sha256test sha512test
|
|
|
|
|
2012-08-16 02:51:04 +08:00
|
|
|
# The test md5test-giant uses up to 400 MB of RSS and runs on a fast
|
|
|
|
# machine over a minute.
|
|
|
|
xtests = md5test-giant
|
2009-04-03 01:00:46 +08:00
|
|
|
endif
|
2000-02-29 13:21:42 +08:00
|
|
|
|
|
|
|
include ../Rules
|
|
|
|
|
2012-11-13 07:17:31 +08:00
|
|
|
ifneq ($(nss-crypt),yes)
|
|
|
|
md5-routines := md5 $(filter md5%,$(libcrypt-sysdep_routines))
|
|
|
|
sha256-routines := sha256 $(filter sha256%,$(libcrypt-sysdep_routines))
|
|
|
|
sha512-routines := sha512 $(filter sha512%,$(libcrypt-sysdep_routines))
|
|
|
|
|
|
|
|
$(objpfx)md5test: $(patsubst %, $(objpfx)%.o,$(md5-routines))
|
|
|
|
$(objpfx)md5test-giant: $(patsubst %, $(objpfx)%.o,$(md5-routines))
|
|
|
|
$(objpfx)sha256test: $(patsubst %, $(objpfx)%.o,$(sha256-routines))
|
|
|
|
$(objpfx)sha512test: $(patsubst %, $(objpfx)%.o,$(sha512-routines))
|
|
|
|
endif
|
|
|
|
|
2000-07-05 02:24:11 +08:00
|
|
|
ifeq (yes,$(build-shared))
|
Update.
2000-08-17 Greg McGary <greg@mcgary.org>
* Makeconfig (link-extra-libs-bounded): Strip `-bp' suffix
from test program name when constructing suffix for $(LDLIBS-*).
(bounded-thread-library): New variable.
* crypt/Makefile
[build-shared, build-static] (libcrypt-dep): Remove variable.
($(addprefix $(objpfx),$(tests))): Consolidate individual dependencies.
[build-bounded] ($(tests:%=$(objpfx)%-bp)): Add dependencies.
* linuxthreads/Makefile (libpthread, librt): Remove variables.
(librt-tests): Add variable. (tests): Use it.
[build-shared, build-static]
($(addprefix $(objpfx),$(tests)), $(addprefix $(objpfx),$(librt-tests))):
Consolidate individual dependencies.
[build-bounded]
($(tests:%=$(objpfx)%-bp), $(librt-tests:%=$(objpfx)%-bp)):
Add dependencies.
* math/Makefile (LDLIBS-*): Remove variables (they are redundant).
[build-bounded] ($(tests:%=$(objpfx)%-bp)): Add dependencies.
* misc/Makefile
[build-bounded] ($(objpfx)tst-tsearch-bp): Add dependencies.
* rt/Makefile
[build-shared, build-static]
($(addprefix $(objpfx),$(tests))): Consolidate individual dependencies.
[build-bounded] ($(tests:%=$(objpfx)%-bp)): Add dependencies.
2000-08-17 Greg McGary <greg@mcgary.org>
* sysdeps/generic/bp-checks.h: s/\(CHECK\w+\)opt/\1_NULL_OK/
* sysdeps/unix/make-syscalls.sh: Likewise.
* sysdeps/unix/sysv/linux/shmctl.c: Likewise.
* sysdeps/unix/sysv/linux/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c: Likewise.
2000-08-17 Greg McGary <greg@mcgary.org>
* sysdeps/i386/fpu/s_frexp.S: Check bounds.
Wrap extern symbols in BP_SYM ().
* sysdeps/i386/fpu/s_frexpf.S: Likewise.
* sysdeps/i386/fpu/s_frexpl.S: Likewise.
* sysdeps/i386/fpu/s_remquo.S: Likewise.
* sysdeps/i386/fpu/s_remquof.S: Likewise.
* sysdeps/i386/fpu/s_remquol.S: Likewise.
* sysdeps/i386/fpu/s_sincos.S: Likewise.
* sysdeps/i386/fpu/s_sincosf.S: Likewise.
* sysdeps/i386/fpu/s_sincosl.S: Likewise.
* sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
* sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise.
2000-08-17 15:38:02 +08:00
|
|
|
$(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
|
2000-07-05 02:24:11 +08:00
|
|
|
else
|
Update.
2000-08-17 Greg McGary <greg@mcgary.org>
* Makeconfig (link-extra-libs-bounded): Strip `-bp' suffix
from test program name when constructing suffix for $(LDLIBS-*).
(bounded-thread-library): New variable.
* crypt/Makefile
[build-shared, build-static] (libcrypt-dep): Remove variable.
($(addprefix $(objpfx),$(tests))): Consolidate individual dependencies.
[build-bounded] ($(tests:%=$(objpfx)%-bp)): Add dependencies.
* linuxthreads/Makefile (libpthread, librt): Remove variables.
(librt-tests): Add variable. (tests): Use it.
[build-shared, build-static]
($(addprefix $(objpfx),$(tests)), $(addprefix $(objpfx),$(librt-tests))):
Consolidate individual dependencies.
[build-bounded]
($(tests:%=$(objpfx)%-bp), $(librt-tests:%=$(objpfx)%-bp)):
Add dependencies.
* math/Makefile (LDLIBS-*): Remove variables (they are redundant).
[build-bounded] ($(tests:%=$(objpfx)%-bp)): Add dependencies.
* misc/Makefile
[build-bounded] ($(objpfx)tst-tsearch-bp): Add dependencies.
* rt/Makefile
[build-shared, build-static]
($(addprefix $(objpfx),$(tests))): Consolidate individual dependencies.
[build-bounded] ($(tests:%=$(objpfx)%-bp)): Add dependencies.
2000-08-17 Greg McGary <greg@mcgary.org>
* sysdeps/generic/bp-checks.h: s/\(CHECK\w+\)opt/\1_NULL_OK/
* sysdeps/unix/make-syscalls.sh: Likewise.
* sysdeps/unix/sysv/linux/shmctl.c: Likewise.
* sysdeps/unix/sysv/linux/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c: Likewise.
2000-08-17 Greg McGary <greg@mcgary.org>
* sysdeps/i386/fpu/s_frexp.S: Check bounds.
Wrap extern symbols in BP_SYM ().
* sysdeps/i386/fpu/s_frexpf.S: Likewise.
* sysdeps/i386/fpu/s_frexpl.S: Likewise.
* sysdeps/i386/fpu/s_remquo.S: Likewise.
* sysdeps/i386/fpu/s_remquof.S: Likewise.
* sysdeps/i386/fpu/s_remquol.S: Likewise.
* sysdeps/i386/fpu/s_sincos.S: Likewise.
* sysdeps/i386/fpu/s_sincosf.S: Likewise.
* sysdeps/i386/fpu/s_sincosl.S: Likewise.
* sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
* sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise.
2000-08-17 15:38:02 +08:00
|
|
|
$(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
|
|
|
|
endif
|