2010-09-04 16:17:58 +04:00
|
|
|
# $NetBSD: Makefile,v 1.143 2010/09/04 12:17:58 ahoka 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
|
|
|
|
2006-03-12 00:07:18 +03:00
|
|
|
.include "Makefile.inc"
|
2002-08-19 18:55:14 +04:00
|
|
|
|
1999-02-09 22:30:03 +03:00
|
|
|
LIB= c
|
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
|
|
|
|
2008-10-26 10:43:07 +03:00
|
|
|
LIBCDIR= ${.CURDIR}
|
|
|
|
|
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
|
2006-03-12 00:07:18 +03:00
|
|
|
|
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
|
|
|
|
2006-03-12 00:07:18 +03:00
|
|
|
# The following controls how to build compatibility code for old NetBSD
|
|
|
|
# binaries. If BUILDCOLD is yes, then we build a separate library; otherwise
|
|
|
|
# we include the code in libc.
|
|
|
|
BUILDCOLD?= no
|
|
|
|
.if "${BUILDCOLD}" == "yes"
|
|
|
|
SUBDIR=compat
|
|
|
|
.include <bsd.subdir.mk>
|
|
|
|
.else
|
|
|
|
COMPATDIR=${.CURDIR}/compat
|
|
|
|
.include "${.CURDIR}/compat/Makefile.inc"
|
|
|
|
.endif
|
|
|
|
|
2005-12-20 22:31:47 +03:00
|
|
|
.include "${.CURDIR}/../../common/lib/libc/Makefile.inc"
|
2008-06-23 14:22:40 +04:00
|
|
|
.include "${.CURDIR}/atomic/Makefile.inc"
|
2010-04-25 04:54:44 +04:00
|
|
|
.include "${.CURDIR}/cdb/Makefile.inc"
|
1993-06-15 03:51:26 +04:00
|
|
|
.include "${.CURDIR}/db/Makefile.inc"
|
2010-05-30 12:28:53 +04:00
|
|
|
.if (${CITRUS} == "yes")
|
2003-06-27 09:21:49 +04:00
|
|
|
.include "${.CURDIR}/citrus/Makefile.inc"
|
2010-05-30 12:28:53 +04:00
|
|
|
.endif
|
1993-03-21 12:45:37 +03:00
|
|
|
.include "${.CURDIR}/compat-43/Makefile.inc"
|
2000-04-02 19:35:47 +04:00
|
|
|
.include "${.CURDIR}/dlfcn/Makefile.inc"
|
2006-01-25 18:43:01 +03:00
|
|
|
.include "${.CURDIR}/gdtoa/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"
|
2007-11-13 18:21:19 +03:00
|
|
|
.include "${.CURDIR}/misc/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
|
2010-09-04 16:17:58 +04:00
|
|
|
.if (${USE_LIBTRE} == "yes")
|
|
|
|
.include "${NETBSDSRCDIR}/external/bsd/tre/Makefile.inc"
|
|
|
|
.else
|
1994-05-14 10:25:56 +04:00
|
|
|
.include "${.CURDIR}/regex/Makefile.inc"
|
2010-09-04 16:17:58 +04:00
|
|
|
.endif
|
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"
|
2007-05-30 05:13:14 +04:00
|
|
|
.include "${.CURDIR}/ssp/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
|
|
|
|
2009-08-11 21:29:04 +04:00
|
|
|
# Remove from SRCS the .c files for any .S files added by the MD makefiles,
|
|
|
|
# also remove from SRCS the .c files for the .S and .c files in NO_SRCS.
|
|
|
|
# Add the .c file for .S files (in both variables) to LSRCS so that the
|
|
|
|
# 'normal' .c file for assembly files is used for the lint librray.
|
|
|
|
#
|
|
|
|
# Usage:
|
|
|
|
# Add .S files to NO_SRSC when another .S file provides the entry points.
|
|
|
|
# Add .c files to NO_SRSC when another .c file provides the entry points.
|
|
|
|
# (lint is run on all .c files in SRCS)
|
|
|
|
|
|
|
|
.for check_file in ${SRCS:M*.S} ${NO_SRCS}
|
|
|
|
unwanted_file := ${SRCS:M${check_file:.S=.c}}
|
2009-07-31 00:57:15 +04:00
|
|
|
.if "${unwanted_file}" != ""
|
|
|
|
SRCS := ${SRCS:N${unwanted_file}}
|
2009-08-11 21:29:04 +04:00
|
|
|
.if "${unwanted_file}" != "${check_file}"
|
|
|
|
LSRCS := ${LSRCS} ${unwanted_file}
|
|
|
|
.endif
|
2009-07-31 00:57:15 +04:00
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
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
|
|
|
|
2009-12-06 15:56:59 +03:00
|
|
|
realall: tags
|
|
|
|
tags: ${.OBJDIR}/tags
|
2009-12-06 09:30:52 +03:00
|
|
|
${.OBJDIR}/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
|
|
|
|
2009-12-06 09:30:52 +03:00
|
|
|
FILES= ${.OBJDIR}/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.
|
2010-05-30 12:28:53 +04:00
|
|
|
.if (${CITRUS} == "yes")
|
2007-03-19 15:27:22 +03:00
|
|
|
CSHLIBFLAGS+= -D_I18N_DYNAMIC
|
2010-05-30 12:28:53 +04:00
|
|
|
.endif
|
2002-07-20 12:51:32 +04:00
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|
2007-12-07 23:34:04 +03:00
|
|
|
|
|
|
|
# force the dynamic linker to initialize libc first
|
2007-12-08 21:34:51 +03:00
|
|
|
SHLIB_SHFLAGS+= -Wl,-z,initfirst
|
2007-12-07 23:34:04 +03:00
|
|
|
|