2005-09-13 05:44:08 +04:00
|
|
|
# $NetBSD: Makefile,v 1.123 2005/09/13 01:44:08 christos Exp $
|
1995-02-25 06:31:42 +03:00
|
|
|
# @(#)Makefile 8.2 (Berkeley) 2/3/94
|
1993-03-21 12:45:37 +03:00
|
|
|
#
|
|
|
|
# All library objects contain sccsid strings by default; they may be
|
|
|
|
# excluded as a space-saving measure. To produce a library that does
|
|
|
|
# not contain these strings, delete -DLIBC_SCCS and -DSYSLIBC_SCCS
|
1997-10-23 03:14:04 +04:00
|
|
|
# from CPPFLAGS below. To remove these strings from just the system call
|
|
|
|
# stubs, remove just -DSYSLIBC_SCCS from CPPFLAGS.
|
1993-04-26 12:25:13 +04:00
|
|
|
#
|
1994-09-03 08:53:16 +04:00
|
|
|
# The NLS (message catalog) functions are always in libc. To choose that
|
|
|
|
# strerror(), perror(), strsignal(), psignal(), etc. actually call the NLS
|
1997-10-23 03:14:04 +04:00
|
|
|
# functions, put -DNLS on the CPPFLAGS line below.
|
1994-09-03 08:53:16 +04:00
|
|
|
#
|
1993-04-27 14:11:24 +04:00
|
|
|
# The YP functions are always in libc. To choose that getpwent() and friends
|
1997-10-23 03:14:04 +04:00
|
|
|
# actually call the YP functions, put -DYP on the CPPFLAGS line below.
|
1999-01-15 15:48:41 +03:00
|
|
|
#
|
|
|
|
# The Hesiod functions are always in libc. To choose that getpwent() and friends
|
|
|
|
# actually call the Hesiod functions, put -DHESIOD on the CPPFLAGS line below.
|
1993-04-26 12:25:13 +04:00
|
|
|
|
2002-08-19 18:55:14 +04:00
|
|
|
USE_SHLIBDIR= yes
|
|
|
|
|
Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.
* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)
* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.
As discussed on tech-toolchain.
2002-03-22 21:10:19 +03:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
1999-02-09 22:30:03 +03:00
|
|
|
LIB= c
|
Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.
* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)
* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.
As discussed on tech-toolchain.
2002-03-22 21:10:19 +03:00
|
|
|
CPPFLAGS+= -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT
|
2004-05-21 06:30:03 +04:00
|
|
|
CPPFLAGS+= -I${.CURDIR}/include -I${.CURDIR}
|
Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.
* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)
* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.
As discussed on tech-toolchain.
2002-03-22 21:10:19 +03:00
|
|
|
|
|
|
|
.if (${USE_HESIOD} != "no")
|
|
|
|
CPPFLAGS+= -DHESIOD
|
|
|
|
.endif
|
|
|
|
|
2003-12-08 00:57:22 +03:00
|
|
|
.if (${USE_INET6} != "no")
|
2000-01-26 05:46:36 +03:00
|
|
|
CPPFLAGS+= -DINET6
|
2003-12-08 00:57:22 +03:00
|
|
|
.endif
|
2005-01-10 05:32:46 +03:00
|
|
|
|
Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.
* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)
* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.
As discussed on tech-toolchain.
2002-03-22 21:10:19 +03:00
|
|
|
CPPFLAGS+= -DNLS
|
2001-02-06 21:47:09 +03:00
|
|
|
|
Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.
* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)
* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.
As discussed on tech-toolchain.
2002-03-22 21:10:19 +03:00
|
|
|
.if (${USE_YP} != "no")
|
|
|
|
CPPFLAGS+= -DYP
|
|
|
|
.endif
|
* 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
|
|
|
|
2001-02-06 21:47:09 +03:00
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
|
|
|
# Set lint to exit on warnings
|
|
|
|
LINTFLAGS+= -w
|
|
|
|
.endif
|
|
|
|
# ignore 'empty translation unit' warnings.
|
|
|
|
LINTFLAGS+= -X 272
|
1999-02-09 22:30:03 +03:00
|
|
|
|
2001-01-08 11:29:59 +03:00
|
|
|
.if exists(${.CURDIR}/arch/${MACHINE_ARCH})
|
|
|
|
ARCHSUBDIR= ${MACHINE_ARCH}
|
|
|
|
.elif exists(${.CURDIR}/arch/${MACHINE_CPU})
|
|
|
|
ARCHSUBDIR= ${MACHINE_CPU}
|
|
|
|
.else
|
|
|
|
.BEGIN:
|
|
|
|
@echo no ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU}
|
|
|
|
@false
|
|
|
|
.endif
|
|
|
|
|
1999-02-24 18:00:08 +03:00
|
|
|
ARCHDIR= ${.CURDIR}/arch/${ARCHSUBDIR}
|
2004-04-18 08:26:15 +04:00
|
|
|
AFLAGS+= -I${ARCHDIR}
|
1994-07-06 08:06:27 +04:00
|
|
|
.if defined(DESTDIR)
|
2004-04-18 08:26:15 +04:00
|
|
|
AFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include
|
1994-07-06 08:06:27 +04:00
|
|
|
.endif
|
2002-03-06 00:25:08 +03:00
|
|
|
CLEANFILES+= tags
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1998-03-04 11:17:20 +03:00
|
|
|
# Don't try to lint the C library against itself when creating llib-lc.ln
|
1996-12-19 10:52:52 +03:00
|
|
|
LLIBS=
|
|
|
|
|
2000-06-03 03:11:05 +04:00
|
|
|
INCSDIR= /usr/include
|
|
|
|
|
1999-02-09 22:30:03 +03:00
|
|
|
.if exists (${ARCHDIR}/Makefile.inc)
|
|
|
|
.PATH: ${ARCHDIR}
|
|
|
|
.include "${ARCHDIR}/Makefile.inc"
|
1993-09-06 02:12:35 +04:00
|
|
|
.endif
|
2004-03-04 01:57:26 +03:00
|
|
|
.if exists (${ARCHDIR}/genassym.cf)
|
|
|
|
DPSRCS+= assym.h
|
|
|
|
CLEANFILES+= assym.h assym.h.tmp
|
|
|
|
|
2005-05-30 20:02:56 +04:00
|
|
|
assym.h: ${ARCHDIR}/genassym.cf
|
2004-03-04 01:57:26 +03:00
|
|
|
${_MKTARGET_CREATE}
|
2005-05-30 20:02:56 +04:00
|
|
|
${TOOL_GENASSYM} -- ${CC} ${CFLAGS} \
|
2005-05-03 08:37:33 +04:00
|
|
|
${CPPFLAGS} ${CPPFLAGS.assym.h} ${PROF} \
|
2004-03-04 01:57:26 +03:00
|
|
|
< ${ARCHDIR}/genassym.cf > assym.h.tmp && \
|
|
|
|
mv -f assym.h.tmp assym.h
|
|
|
|
.endif
|
1993-09-06 02:12:35 +04:00
|
|
|
|
1993-06-15 03:51:26 +04:00
|
|
|
.include "${.CURDIR}/db/Makefile.inc"
|
2003-06-27 09:21:49 +04:00
|
|
|
.include "${.CURDIR}/citrus/Makefile.inc"
|
1993-03-21 12:45:37 +03:00
|
|
|
.include "${.CURDIR}/compat-43/Makefile.inc"
|
2005-09-13 05:44:08 +04:00
|
|
|
.include "${.CURDIR}/compat/Makefile.inc"
|
2000-04-02 19:35:47 +04:00
|
|
|
.include "${.CURDIR}/dlfcn/Makefile.inc"
|
1993-03-21 12:45:37 +03:00
|
|
|
.include "${.CURDIR}/gen/Makefile.inc"
|
1994-05-14 10:25:56 +04:00
|
|
|
.include "${.CURDIR}/gmon/Makefile.inc"
|
1999-02-04 08:08:58 +03:00
|
|
|
.include "${.CURDIR}/hash/Makefile.inc"
|
2003-06-27 09:21:49 +04:00
|
|
|
.include "${.CURDIR}/iconv/Makefile.inc"
|
2004-05-21 06:30:03 +04:00
|
|
|
.include "${.CURDIR}/inet/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/isc/Makefile.inc"
|
1993-03-21 12:45:37 +03:00
|
|
|
.include "${.CURDIR}/locale/Makefile.inc"
|
1997-01-30 04:02:17 +03:00
|
|
|
.include "${.CURDIR}/md/Makefile.inc"
|
1993-03-21 12:45:37 +03:00
|
|
|
.include "${.CURDIR}/net/Makefile.inc"
|
2004-05-21 06:30:03 +04:00
|
|
|
.include "${.CURDIR}/nameser/Makefile.inc"
|
1994-05-30 02:09:13 +04:00
|
|
|
.include "${.CURDIR}/nls/Makefile.inc"
|
1998-11-28 20:01:54 +03:00
|
|
|
.if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "sparc64")
|
1994-05-14 10:25:56 +04:00
|
|
|
.include "${.CURDIR}/quad/Makefile.inc"
|
1995-02-10 20:45:39 +03:00
|
|
|
.endif
|
1994-05-14 10:25:56 +04:00
|
|
|
.include "${.CURDIR}/regex/Makefile.inc"
|
2004-05-21 06:30:03 +04:00
|
|
|
.include "${.CURDIR}/resolv/Makefile.inc"
|
1994-05-14 10:25:56 +04:00
|
|
|
.include "${.CURDIR}/rpc/Makefile.inc"
|
1993-03-21 12:45:37 +03:00
|
|
|
.include "${.CURDIR}/stdio/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/stdlib/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/string/Makefile.inc"
|
1995-04-25 04:00:58 +04:00
|
|
|
.include "${.CURDIR}/termios/Makefile.inc"
|
2003-01-18 13:52:16 +03:00
|
|
|
.include "${.CURDIR}/thread-stub/Makefile.inc"
|
1995-03-13 08:26:07 +03:00
|
|
|
.include "${.CURDIR}/time/Makefile.inc"
|
1993-03-21 12:45:37 +03:00
|
|
|
.include "${.CURDIR}/sys/Makefile.inc"
|
2004-09-14 01:44:54 +04:00
|
|
|
.include "${.CURDIR}/uuid/Makefile.inc"
|
Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.
* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)
* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.
As discussed on tech-toolchain.
2002-03-22 21:10:19 +03:00
|
|
|
.if (${MKYP} != "no")
|
1993-04-26 12:25:13 +04:00
|
|
|
.include "${.CURDIR}/yp/Makefile.inc"
|
Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.
* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)
* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.
As discussed on tech-toolchain.
2002-03-22 21:10:19 +03:00
|
|
|
.endif
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2003-04-10 00:17:06 +04:00
|
|
|
NLS= C.msg Pig.msg ca.msg cs.msg de.msg es.msg fi.msg fr.msg nl.msg \
|
2003-04-14 09:21:47 +04:00
|
|
|
no.msg pl.msg sk.msg sv.msg
|
1995-05-02 23:57:15 +04:00
|
|
|
|
2002-08-19 13:41:27 +04:00
|
|
|
LIBKERN= ${NETBSDSRCDIR}/sys/lib/libkern
|
1993-10-15 04:06:47 +03:00
|
|
|
|
1999-01-15 16:31:15 +03:00
|
|
|
KSRCS= bcopy.c bcmp.c bswap16.c bswap32.c bswap64.c bzero.c ffs.c \
|
1998-08-04 09:55:56 +04:00
|
|
|
strcat.c strchr.c strcmp.c strcpy.c strlen.c \
|
|
|
|
strncmp.c strncpy.c strrchr.c \
|
|
|
|
htonl.c htons.c ntohl.c ntohs.c md5c.c \
|
|
|
|
memchr.c memcmp.c memcpy.c memmove.c memset.c \
|
|
|
|
index.c rindex.c
|
1998-11-28 20:01:54 +03:00
|
|
|
.if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "sparc64")
|
1993-12-04 08:15:26 +03:00
|
|
|
KSRCS+= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
|
|
|
|
lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
|
|
|
|
subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
|
|
|
|
KINCLUDES+= quad/quad.h
|
1995-02-14 00:57:24 +03:00
|
|
|
.endif
|
1993-10-15 04:06:47 +03:00
|
|
|
|
1993-10-15 04:23:49 +03:00
|
|
|
copy-to-libkern: copy-to-libkern-machind copy-to-libkern-machdep
|
|
|
|
|
|
|
|
copy-to-libkern-machind: ${KSRCS}
|
1993-10-15 04:06:47 +03:00
|
|
|
cp -p ${.ALLSRC} ${LIBKERN}
|
1995-02-14 00:57:24 +03:00
|
|
|
.if defined(KINCLUDES) && !empty(KINCLUDES)
|
1993-12-04 08:15:26 +03:00
|
|
|
(cd ${.CURDIR} ; cp -p ${KINCLUDES} ${LIBKERN})
|
1995-02-14 00:57:24 +03:00
|
|
|
.endif
|
1993-10-15 04:06:47 +03:00
|
|
|
|
1993-10-15 04:23:49 +03:00
|
|
|
copy-to-libkern-machdep: ${KMSRCS}
|
|
|
|
.if defined(KMSRCS) && !empty(KMSRCS)
|
1999-02-24 18:00:08 +03:00
|
|
|
cp -p ${.ALLSRC} ${LIBKERN}/arch/${ARCHSUBDIR}
|
1993-10-15 04:23:49 +03:00
|
|
|
.endif
|
1993-11-06 01:43:47 +03:00
|
|
|
.if defined(KMINCLUDES) && !empty(KMINCLUDES)
|
1999-02-24 18:00:08 +03:00
|
|
|
(cd ${.CURDIR} ; cp -p ${KMINCLUDES} ${LIBKERN}/arch/${ARCHSUBDIR})
|
1993-11-06 01:43:47 +03:00
|
|
|
.endif
|
1993-10-15 04:23:49 +03:00
|
|
|
|
1993-10-15 04:06:47 +03:00
|
|
|
rm-from-libkern:
|
|
|
|
for i in ${KSRCS}; do rm -f ${LIBKERN}/$$i; done
|
1993-10-15 04:23:49 +03:00
|
|
|
.if defined(KMSRCS) && !empty(KMSRCS)
|
1999-02-24 18:00:08 +03:00
|
|
|
for i in ${KMSRCS}; do rm -f ${LIBKERN}/arch/${ARCHSUBDIR}/$$i; done
|
1993-10-15 04:23:49 +03:00
|
|
|
.endif
|
1995-01-30 15:21:41 +03:00
|
|
|
|
2002-03-06 00:25:08 +03:00
|
|
|
realall: tags
|
|
|
|
tags: ${SRCS}
|
2004-07-31 18:13:05 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2004-04-07 07:49:16 +04:00
|
|
|
-${TOOL_CTAGS} -w ${.ALLSRC:M*.c}
|
|
|
|
-egrep "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" /dev/null ${.ALLSRC:M*.S} | \
|
1995-02-25 06:31:42 +03:00
|
|
|
sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
|
1997-05-12 20:41:03 +04:00
|
|
|
>> ${.TARGET}; sort -o ${.TARGET} ${.TARGET}
|
1995-02-25 06:31:42 +03:00
|
|
|
|
2002-03-06 00:25:08 +03:00
|
|
|
FILES= tags
|
1999-02-09 22:30:03 +03:00
|
|
|
FILESNAME= libc.tags
|
|
|
|
FILESDIR= /var/db
|
1995-06-07 08:37:54 +04:00
|
|
|
|
2001-01-25 12:21:57 +03:00
|
|
|
|
refine i18n stuffs.
- add libc/citrus directory.
this directory contains the common stuffs not only for locale
but also other facilities relating to i18n (e.g. iconv).
- To keep the binary compatibility for the ctype modules easily,
the interface between libc and the modules is simplified.
- For the future integrated extension, module pool is renamed
from "/usr/lib/runemodule" to "/usr/lib/i18n".
In the future, this directory will contain the modules for "iconv",
"collation", etc.
- some cosmetic changes.
- Bug fix for runetype.h; __attribute__((__packed__)) is placed at
the wrong position and it is invalid unintentionally.
But, the all members of the structures seem well-aligned. Thus,
this bug causes no problem, hopefully.
HEADS UP:
- /usr/lib/rumemodule is obsoleted. If you use the multibyte locales,
you need to install /usr/lib/i18n/* from sys/lib/i18n_module .
- The binary compatibility of /usr/share/locale/*/LC_CTYPE is probably kept.
Perhaps, the bug fix about __packed__ mentioned above breaks the
compatibility... Be careful especially on 64bit platforms.
2002-03-18 01:14:05 +03:00
|
|
|
# workaround for I18N stuffs: build singlebyte setlocale() for libc.a,
|
2001-01-25 12:21:57 +03:00
|
|
|
# multibyte for libc.so. the quirk should be removed when we support
|
|
|
|
# dlopen() from within statically linked binaries.
|
2002-07-20 12:51:32 +04:00
|
|
|
CSHLIBFLAGS+= -D_I18N_DYNAMIC
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|