Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
# $NetBSD: Makefile,v 1.149 2012/01/20 16:31:29 joerg Exp $
|
2012-02-11 19:31:25 +01:00
|
|
|
# @(#)Makefile 8.2 (Berkeley) 2/3/94
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# from CPPFLAGS below. To remove these strings from just the system call
|
|
|
|
# stubs, remove just -DSYSLIBC_SCCS from CPPFLAGS.
|
|
|
|
#
|
|
|
|
# The NLS (message catalog) functions are always in libc. To choose that
|
|
|
|
# strerror(), perror(), strsignal(), psignal(), etc. actually call the NLS
|
|
|
|
# functions, put -DNLS on the CPPFLAGS line below.
|
|
|
|
#
|
|
|
|
# The YP functions are always in libc. To choose that getpwent() and friends
|
|
|
|
# actually call the YP functions, put -DYP on the CPPFLAGS line below.
|
|
|
|
#
|
|
|
|
# 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.
|
2010-02-16 15:41:33 +01:00
|
|
|
|
2010-02-24 12:58:05 +01:00
|
|
|
.include "Makefile.inc"
|
|
|
|
|
2010-02-16 15:41:33 +01:00
|
|
|
LIB= c
|
2012-02-11 19:31:25 +01:00
|
|
|
CPPFLAGS+= -I${.CURDIR}/include -I${.CURDIR}
|
|
|
|
|
|
|
|
LIBCDIR= ${.CURDIR}
|
|
|
|
|
|
|
|
.if exists (${ARCHDIR}/Makefile.inc)
|
|
|
|
.PATH: ${ARCHDIR}
|
|
|
|
.include "${ARCHDIR}/Makefile.inc"
|
|
|
|
.endif
|
2010-02-16 15:41:33 +01:00
|
|
|
|
2012-02-11 19:31:25 +01:00
|
|
|
.if exists (${ARCHDIR}/genassym.cf)
|
|
|
|
DPSRCS+= assym.h
|
|
|
|
CLEANFILES+= assym.h assym.h.tmp
|
|
|
|
|
|
|
|
assym.h: ${ARCHDIR}/genassym.cf
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
${TOOL_GENASSYM} -- ${CC} ${CFLAGS} \
|
|
|
|
${CPPFLAGS} ${CPPFLAGS.assym.h} ${PROF} \
|
|
|
|
< ${ARCHDIR}/genassym.cf > assym.h.tmp && \
|
|
|
|
mv -f assym.h.tmp assym.h
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# 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
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
COMPATDIR=${.CURDIR}/compat
|
|
|
|
.include "${.CURDIR}/compat/Makefile.inc"
|
2013-11-12 16:07:41 +01:00
|
|
|
.endif
|
|
|
|
|
2012-11-15 12:06:41 +01:00
|
|
|
.if defined(__MINIX)
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
SUBDIR+= pkgconfig
|
|
|
|
.include <bsd.subdir.mk>
|
2012-11-15 12:06:41 +01:00
|
|
|
.endif # defined(__MINIX)
|
2012-02-11 19:31:25 +01:00
|
|
|
|
|
|
|
.include "${.CURDIR}/../../common/lib/libc/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/atomic/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/cdb/Makefile.inc"
|
2010-07-14 19:46:18 +02:00
|
|
|
.include "${.CURDIR}/db/Makefile.inc"
|
2012-02-11 19:31:25 +01:00
|
|
|
.include "${.CURDIR}/citrus/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/compat-43/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/dlfcn/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/gdtoa/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/gen/Makefile.inc"
|
|
|
|
.if defined(__MINIX)
|
|
|
|
# gmon needs profil()
|
|
|
|
.else
|
|
|
|
.include "${.CURDIR}/gmon/Makefile.inc"
|
|
|
|
.endif
|
|
|
|
.include "${.CURDIR}/hash/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/iconv/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/inet/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/isc/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/locale/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/md/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/misc/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/net/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/nameser/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/nls/Makefile.inc"
|
2013-06-17 16:51:49 +02:00
|
|
|
.if (${MACHINE_ARCH} != "alpha") && (${ARCHSUBDIR} != "sparc64") && ${USE_BITCODE:Uno} != "yes"
|
2012-02-11 19:31:25 +01:00
|
|
|
.include "${.CURDIR}/quad/Makefile.inc"
|
|
|
|
.endif
|
|
|
|
.if (${USE_LIBTRE} == "yes")
|
|
|
|
.include "${NETBSDSRCDIR}/external/bsd/tre/Makefile.inc"
|
|
|
|
.else
|
2010-02-16 15:41:33 +01:00
|
|
|
.include "${.CURDIR}/regex/Makefile.inc"
|
2012-02-11 19:31:25 +01:00
|
|
|
.endif
|
|
|
|
.include "${.CURDIR}/resolv/Makefile.inc"
|
|
|
|
.if defined(__MINIX)
|
|
|
|
# RPC needs pollts() and a reserved port allocator.
|
|
|
|
.else
|
|
|
|
.include "${.CURDIR}/rpc/Makefile.inc"
|
|
|
|
.endif
|
|
|
|
.include "${.CURDIR}/ssp/Makefile.inc"
|
2010-02-16 15:41:33 +01:00
|
|
|
.include "${.CURDIR}/stdio/Makefile.inc"
|
2012-02-11 19:31:25 +01:00
|
|
|
.include "${.CURDIR}/stdlib/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/string/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/termios/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/thread-stub/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/time/Makefile.inc"
|
|
|
|
.if defined(__MINIX)
|
|
|
|
.include "${.CURDIR}/sys-minix/Makefile.inc"
|
|
|
|
.else
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
.include "${.CURDIR}/tls/Makefile.inc"
|
2012-02-11 19:31:25 +01:00
|
|
|
.endif
|
2013-02-25 15:45:22 +01:00
|
|
|
.include "${.CURDIR}/sys/Makefile.inc"
|
2012-02-11 19:31:25 +01:00
|
|
|
.include "${.CURDIR}/uuid/Makefile.inc"
|
|
|
|
.if (${MKYP} != "no")
|
|
|
|
.include "${.CURDIR}/yp/Makefile.inc"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# 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}}
|
|
|
|
.if "${unwanted_file}" != ""
|
|
|
|
SRCS := ${SRCS:N${unwanted_file}}
|
|
|
|
.if "${unwanted_file}" != "${check_file}"
|
|
|
|
LSRCS := ${LSRCS} ${unwanted_file}
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
NLS= C.msg Pig.msg ca.msg cs.msg de.msg es.msg fi.msg fr.msg nl.msg \
|
|
|
|
no.msg pl.msg sk.msg sv.msg
|
|
|
|
|
|
|
|
.if defined(__MINIX)
|
|
|
|
realall:
|
|
|
|
.else
|
|
|
|
realall: tags
|
|
|
|
.endif
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
tags: ${SRCS}
|
2012-02-11 19:31:25 +01:00
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
-${TOOL_CTAGS} -w ${.ALLSRC:M*.c}
|
|
|
|
-egrep "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" /dev/null ${.ALLSRC:M*.S} | \
|
|
|
|
sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
|
|
|
|
>> ${.TARGET}; sort -o ${.TARGET} ${.TARGET}
|
|
|
|
|
|
|
|
.if !defined(__MINIX)
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
FILES= tags
|
2012-02-11 19:31:25 +01:00
|
|
|
FILESNAME= libc.tags
|
|
|
|
FILESDIR= /var/db
|
|
|
|
.endif
|
|
|
|
|
|
|
|
|
|
|
|
# workaround for I18N stuffs: build singlebyte setlocale() for libc.a,
|
|
|
|
# multibyte for libc.so. the quirk should be removed when we support
|
|
|
|
# dlopen() from within statically linked binaries.
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
.if !defined(__MINIX)
|
|
|
|
CSHLIBFLAGS+= -D_I18N_DYNAMIC
|
|
|
|
.endif
|
2010-02-16 15:41:33 +01:00
|
|
|
|
2010-06-25 20:29:09 +02:00
|
|
|
.include <bsd.lib.mk>
|
2012-02-11 19:31:25 +01:00
|
|
|
|
|
|
|
# force the dynamic linker to initialize libc first
|
|
|
|
SHLIB_SHFLAGS+= -Wl,-z,initfirst
|