2013-12-06 12:04:52 +01:00
|
|
|
# $NetBSD: Makefile,v 1.75 2013/06/20 20:42:30 christos Exp $
|
2011-09-26 18:19:29 +02:00
|
|
|
# @(#)Makefile 8.1 (Berkeley) 6/4/93
|
|
|
|
|
|
|
|
USE_SHLIBDIR= yes
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
.include "${NETBSDSRCDIR}/common/lib/libutil/Makefile.inc"
|
|
|
|
|
2012-09-11 18:02:49 +02:00
|
|
|
WARNS?= 5
|
2011-09-26 18:19:29 +02:00
|
|
|
LIB= util
|
|
|
|
CPPFLAGS+=-DLIBC_SCCS -I${.CURDIR}
|
2012-09-11 18:02:49 +02:00
|
|
|
LINTFLAGS+=-w
|
2013-12-06 12:04:52 +01:00
|
|
|
SRCS+= efun.c \
|
|
|
|
\
|
|
|
|
getfsspecname.c getmntopts.c \
|
|
|
|
\
|
|
|
|
\
|
Fine grained compatibility with _RENAMEd symbols
The NetBSD libc provides a mechanism to have versions of system calls.
By 'renaming' symbols to a new version, freshly compiled programs will
automatically use the new symbol iff they use the proper header files. The
old, not renamed, version of the symbol will still exist (after being moved
to the compat directory), so old programs can still link.
Since MINIX doesn't support dynamic linking, the whole rename mechanism
doesn't really work for us. However, removing it would create a huge diff
with the current NetBSD libc.
A lot of the compat code relies on things we don't (seem to) have, and
therefore does not get built and linked. This causes trouble for tools like
autoconf, which will fail to find the renamed symbols. For example,
currently select gets renamed to __select50 in libc. Autoconf looks for
'select' and doesn't find it and reports we don't have it. This is where
the compat.S stub comes into play: it generates the old symbols and jumps to
the new symbols. However, as this is done in one object file, all renamed
symbols get linked together, causing binaries to be huge. This patch fixes
that by generating an object file for each renamed symbol.
This patch also makes the MISSING_SYSCALLS more complete and marginally
reduces the diff with NetBSD.
2011-11-28 11:12:44 +01:00
|
|
|
login.c loginx.c login_cap.c login_tty.c logout.c logoutx.c \
|
|
|
|
logwtmp.c logwtmpx.c opendisk.c parsedate.y \
|
2011-09-26 18:19:29 +02:00
|
|
|
passwd.c pw_scan.c pidfile.c pidlock.c pty.c \
|
|
|
|
raise_default_signal.c \
|
2012-09-11 18:02:49 +02:00
|
|
|
secure_path.c sockaddr_snprintf.c stat_flags.c \
|
|
|
|
strpct.c ttyaction.c ttymsg.c
|
2011-09-26 18:19:29 +02:00
|
|
|
|
2012-11-15 12:06:41 +01:00
|
|
|
MAN= efun.3 \
|
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
|
|
|
getmntopts.3 \
|
2015-09-11 10:52:26 +02:00
|
|
|
getmaxpartitions.3 getfsspecname.3 \
|
Fine grained compatibility with _RENAMEd symbols
The NetBSD libc provides a mechanism to have versions of system calls.
By 'renaming' symbols to a new version, freshly compiled programs will
automatically use the new symbol iff they use the proper header files. The
old, not renamed, version of the symbol will still exist (after being moved
to the compat directory), so old programs can still link.
Since MINIX doesn't support dynamic linking, the whole rename mechanism
doesn't really work for us. However, removing it would create a huge diff
with the current NetBSD libc.
A lot of the compat code relies on things we don't (seem to) have, and
therefore does not get built and linked. This causes trouble for tools like
autoconf, which will fail to find the renamed symbols. For example,
currently select gets renamed to __select50 in libc. Autoconf looks for
'select' and doesn't find it and reports we don't have it. This is where
the compat.S stub comes into play: it generates the old symbols and jumps to
the new symbols. However, as this is done in one object file, all renamed
symbols get linked together, causing binaries to be huge. This patch fixes
that by generating an object file for each renamed symbol.
This patch also makes the MISSING_SYSCALLS more complete and marginally
reduces the diff with NetBSD.
2011-11-28 11:12:44 +01:00
|
|
|
login.3 login_cap.3 loginx.3 \
|
2013-12-06 12:04:52 +01:00
|
|
|
opendisk.3 openpty.3 parsedate.3 pidfile.3 pidlock.3 \
|
Fine grained compatibility with _RENAMEd symbols
The NetBSD libc provides a mechanism to have versions of system calls.
By 'renaming' symbols to a new version, freshly compiled programs will
automatically use the new symbol iff they use the proper header files. The
old, not renamed, version of the symbol will still exist (after being moved
to the compat directory), so old programs can still link.
Since MINIX doesn't support dynamic linking, the whole rename mechanism
doesn't really work for us. However, removing it would create a huge diff
with the current NetBSD libc.
A lot of the compat code relies on things we don't (seem to) have, and
therefore does not get built and linked. This causes trouble for tools like
autoconf, which will fail to find the renamed symbols. For example,
currently select gets renamed to __select50 in libc. Autoconf looks for
'select' and doesn't find it and reports we don't have it. This is where
the compat.S stub comes into play: it generates the old symbols and jumps to
the new symbols. However, as this is done in one object file, all renamed
symbols get linked together, causing binaries to be huge. This patch fixes
that by generating an object file for each renamed symbol.
This patch also makes the MISSING_SYSCALLS more complete and marginally
reduces the diff with NetBSD.
2011-11-28 11:12:44 +01:00
|
|
|
pw_getconf.3 pw_init.3 pw_lock.3 secure_path.3 \
|
|
|
|
raise_default_signal.3 \
|
2013-12-06 12:04:52 +01:00
|
|
|
snprintb.3 sockaddr_snprintf.3 stat_flags.3 strpct.3 ttyaction.3 \
|
|
|
|
ttymsg.3 util.3
|
Fine grained compatibility with _RENAMEd symbols
The NetBSD libc provides a mechanism to have versions of system calls.
By 'renaming' symbols to a new version, freshly compiled programs will
automatically use the new symbol iff they use the proper header files. The
old, not renamed, version of the symbol will still exist (after being moved
to the compat directory), so old programs can still link.
Since MINIX doesn't support dynamic linking, the whole rename mechanism
doesn't really work for us. However, removing it would create a huge diff
with the current NetBSD libc.
A lot of the compat code relies on things we don't (seem to) have, and
therefore does not get built and linked. This causes trouble for tools like
autoconf, which will fail to find the renamed symbols. For example,
currently select gets renamed to __select50 in libc. Autoconf looks for
'select' and doesn't find it and reports we don't have it. This is where
the compat.S stub comes into play: it generates the old symbols and jumps to
the new symbols. However, as this is done in one object file, all renamed
symbols get linked together, causing binaries to be huge. This patch fixes
that by generating an object file for each renamed symbol.
This patch also makes the MISSING_SYSCALLS more complete and marginally
reduces the diff with NetBSD.
2011-11-28 11:12:44 +01:00
|
|
|
|
2015-09-11 10:52:26 +02:00
|
|
|
.if defined(__MINIX)
|
|
|
|
.include "${NETBSDSRCDIR}/minix/lib/libutil/Makefile.inc"
|
|
|
|
.endif
|
|
|
|
|
2011-09-26 18:19:29 +02:00
|
|
|
YPREFIX=__pd
|
2012-02-11 19:31:25 +01:00
|
|
|
.PATH: ${NETBSDSRCDIR}/lib/libc/gen
|
2011-09-26 18:19:29 +02:00
|
|
|
|
2013-01-07 20:10:08 +01:00
|
|
|
.if !defined(__MINIX)
|
Fine grained compatibility with _RENAMEd symbols
The NetBSD libc provides a mechanism to have versions of system calls.
By 'renaming' symbols to a new version, freshly compiled programs will
automatically use the new symbol iff they use the proper header files. The
old, not renamed, version of the symbol will still exist (after being moved
to the compat directory), so old programs can still link.
Since MINIX doesn't support dynamic linking, the whole rename mechanism
doesn't really work for us. However, removing it would create a huge diff
with the current NetBSD libc.
A lot of the compat code relies on things we don't (seem to) have, and
therefore does not get built and linked. This causes trouble for tools like
autoconf, which will fail to find the renamed symbols. For example,
currently select gets renamed to __select50 in libc. Autoconf looks for
'select' and doesn't find it and reports we don't have it. This is where
the compat.S stub comes into play: it generates the old symbols and jumps to
the new symbols. However, as this is done in one object file, all renamed
symbols get linked together, causing binaries to be huge. This patch fixes
that by generating an object file for each renamed symbol.
This patch also makes the MISSING_SYSCALLS more complete and marginally
reduces the diff with NetBSD.
2011-11-28 11:12:44 +01:00
|
|
|
.include "compat/Makefile.inc"
|
|
|
|
.endif
|
2011-09-26 18:19:29 +02:00
|
|
|
|
Fine grained compatibility with _RENAMEd symbols
The NetBSD libc provides a mechanism to have versions of system calls.
By 'renaming' symbols to a new version, freshly compiled programs will
automatically use the new symbol iff they use the proper header files. The
old, not renamed, version of the symbol will still exist (after being moved
to the compat directory), so old programs can still link.
Since MINIX doesn't support dynamic linking, the whole rename mechanism
doesn't really work for us. However, removing it would create a huge diff
with the current NetBSD libc.
A lot of the compat code relies on things we don't (seem to) have, and
therefore does not get built and linked. This causes trouble for tools like
autoconf, which will fail to find the renamed symbols. For example,
currently select gets renamed to __select50 in libc. Autoconf looks for
'select' and doesn't find it and reports we don't have it. This is where
the compat.S stub comes into play: it generates the old symbols and jumps to
the new symbols. However, as this is done in one object file, all renamed
symbols get linked together, causing binaries to be huge. This patch fixes
that by generating an object file for each renamed symbol.
This patch also makes the MISSING_SYSCALLS more complete and marginally
reduces the diff with NetBSD.
2011-11-28 11:12:44 +01:00
|
|
|
.if !defined(__MINIX)
|
2011-09-26 18:19:29 +02:00
|
|
|
MLINKS+=getlabelsector.3 getlabeloffset.3
|
2012-09-11 18:02:49 +02:00
|
|
|
MLINKS+=getlabelsector.3 getlabelusesmbr.3
|
|
|
|
MLINKS+=getdiskrawname.3 getdiskcookedname.3
|
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
|
|
|
.endif
|
2011-09-26 18:19:29 +02:00
|
|
|
MLINKS+=login.3 logout.3
|
|
|
|
MLINKS+=login.3 logwtmp.3
|
|
|
|
MLINKS+=login_cap.3 login_getclass.3
|
|
|
|
MLINKS+=login_cap.3 login_getcapbool.3
|
|
|
|
MLINKS+=login_cap.3 login_getcapnum.3
|
|
|
|
MLINKS+=login_cap.3 login_getcapsize.3
|
|
|
|
MLINKS+=login_cap.3 login_getcapstr.3
|
|
|
|
MLINKS+=login_cap.3 login_getcaptime.3
|
2013-12-06 12:04:52 +01:00
|
|
|
MLINKS+=login_cap.3 login_getpwclass.3
|
2011-09-26 18:19:29 +02:00
|
|
|
MLINKS+=login_cap.3 login_close.3
|
|
|
|
MLINKS+=login_cap.3 setclasscontext.3
|
|
|
|
MLINKS+=login_cap.3 setusercontext.3
|
|
|
|
MLINKS+=loginx.3 logoutx.3 loginx.3 logwtmpx.3
|
|
|
|
MLINKS+=openpty.3 login_tty.3
|
|
|
|
MLINKS+=openpty.3 forkpty.3
|
|
|
|
MLINKS+=pw_getconf.3 pw_getpwconf.3
|
|
|
|
MLINKS+=pw_init.3 pw_edit.3
|
|
|
|
MLINKS+=pw_init.3 pw_prompt.3
|
|
|
|
MLINKS+=pw_init.3 pw_copy.3
|
|
|
|
MLINKS+=pw_init.3 pw_copyx.3
|
|
|
|
MLINKS+=pw_init.3 pw_scan.3
|
|
|
|
MLINKS+=pw_init.3 pw_error.3
|
|
|
|
MLINKS+=pw_lock.3 pw_mkdb.3
|
|
|
|
MLINKS+=pw_lock.3 pw_abort.3
|
|
|
|
MLINKS+=pw_lock.3 pw_getprefix.3
|
|
|
|
MLINKS+=pw_lock.3 pw_setprefix.3
|
|
|
|
MLINKS+=pidlock.3 ttylock.3
|
|
|
|
MLINKS+=pidlock.3 ttyunlock.3
|
|
|
|
MLINKS+=efun.3 esetfunc.3
|
|
|
|
MLINKS+=efun.3 easprintf.3
|
|
|
|
MLINKS+=efun.3 estrlcpy.3
|
|
|
|
MLINKS+=efun.3 estrlcat.3
|
|
|
|
MLINKS+=efun.3 estrdup.3
|
|
|
|
MLINKS+=efun.3 estrndup.3
|
|
|
|
MLINKS+=efun.3 emalloc.3
|
|
|
|
MLINKS+=efun.3 ecalloc.3
|
|
|
|
MLINKS+=efun.3 erealloc.3
|
|
|
|
MLINKS+=efun.3 efopen.3
|
|
|
|
MLINKS+=efun.3 evasprintf.3
|
|
|
|
MLINKS+=stat_flags.3 string_to_flags.3
|
|
|
|
MLINKS+=stat_flags.3 flags_to_string.3
|
|
|
|
MLINKS+=snprintb.3 snprintb_m.3
|
2012-09-11 18:02:49 +02:00
|
|
|
MLINKS+=util.3 libutil.3
|
|
|
|
MLINKS+=strpct.3 strspct.3
|
2011-09-26 18:19:29 +02:00
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|