2008-07-12 16:29:42 +04:00
|
|
|
# $NetBSD: Makefile,v 1.20 2008/07/12 12:29:42 gmcgarry Exp $
|
1999-07-13 02:04:09 +04:00
|
|
|
|
* Add user-controlled mk.conf variables
- SHLIBDIR Location to install shared libraries if ${USE_SHLIBDIR}
is "yes". Defaults to "/usr/lib".
- USE_SHLIBDIR If "yes", install shared libraries in ${SHLIBDIR}
instead of ${LIBDIR}. Defaults to "no".
Sets ${_LIBSODIR} to the appropriate value.
This may be set by individual Makefiles as well.
- SHLINKDIR Location of shared linker. Defaults to "/usr/libexec".
If != "/usr/libexec", change the dynamic-linker
encoded in shared programs
* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
libtermcap libutil libz
* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
to ${_LIBSODIR}/${LIB}.so* for compatibility.
* Always install /sbin/init statically (for now)
The net effect of these changes depends on how the variables are set:
1.) If nothing is set or changed, there is no change from the
current behaviour:
- Static /bin, /sbin, and bits of /usr/*
- Dynamic rest
- Shared linker is /usr/libexec/ld*so
2.) If the following make variables are set:
LDSTATIC=
SHLINKDIR=/lib
SHLIBDIR=/lib
Then the behaviour becomes:
- Dynamic tools
- .so libraries used by /bin and /sbin are installed to /lib,
with symlinks from /usr/lib/lib*so to -> /lib/lib*so
where appropriate
- Shared linker is /lib/ld*so
3.) As per 2.), but add the following variable:
USE_SHLIBDIR=yes
This forces all .so's to be instaleld in /lib (with compat
symlinks), not just those tagged by their Makefiles to be.
Again, compat symlinks are installed
2001-12-28 04:32:37 +03:00
|
|
|
USE_SHLIBDIR= yes
|
1993-10-07 04:36:21 +03:00
|
|
|
|
2002-08-19 18:55:14 +04:00
|
|
|
LIB= crypt
|
|
|
|
|
2005-01-12 01:41:07 +03:00
|
|
|
SRCS= crypt.c md5crypt.c bcrypt.c crypt-sha1.c util.c pw_gensalt.c
|
2006-10-27 22:22:56 +04:00
|
|
|
SRCS+= hmac_sha1.c
|
2002-05-24 08:02:47 +04:00
|
|
|
|
2006-10-27 23:39:11 +04:00
|
|
|
WARNS= 4
|
1993-10-07 04:36:21 +03:00
|
|
|
|
1994-12-22 12:44:45 +03:00
|
|
|
MAN= crypt.3
|
1993-10-07 04:36:21 +03:00
|
|
|
MLINKS= crypt.3 encrypt.3 crypt.3 setkey.3
|
|
|
|
|
2004-07-02 04:05:23 +04:00
|
|
|
|
|
|
|
.if make(*.test)
|
|
|
|
.SUFFIXES: .test
|
|
|
|
.c.test:
|
|
|
|
${CC} -o $@ -DUNIT_TEST -DMAIN ${LDSTATIC} ${.IMPSRC} ${LDADD}
|
|
|
|
LDADD+= -L${.OBJDIR} -l${LIB} -L${.OBJDIR}/../../libc
|
|
|
|
DPADD+= lib${LIB}.a
|
|
|
|
LDSTATIC?= -static
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
.else
|
1993-10-07 04:36:21 +03:00
|
|
|
.include <bsd.lib.mk>
|
2004-07-02 04:05:23 +04:00
|
|
|
.endif
|
2006-05-12 03:16:28 +04:00
|
|
|
|
2008-07-12 16:29:42 +04:00
|
|
|
.if ${HAVE_GCC} == 4 || defined(HAVE_PCC)
|
2006-05-12 03:16:28 +04:00
|
|
|
COPTS.crypt-sha1.c+= -Wno-pointer-sign
|
|
|
|
.endif
|