2004-11-16 19:04:00 +01:00
|
|
|
# $NetBSD: NetBSD.mk,v 1.5 2004/11/16 18:04:00 tv Exp $
|
2001-06-12 14:49:55 +02:00
|
|
|
#
|
|
|
|
# Variable definitions for the NetBSD operating system.
|
|
|
|
|
|
|
|
AWK?= /usr/bin/awk
|
|
|
|
BASENAME?= /usr/bin/basename
|
|
|
|
CAT?= /bin/cat
|
|
|
|
CHMOD?= /bin/chmod
|
|
|
|
CHOWN?= /usr/sbin/chown
|
|
|
|
CHGRP?= /usr/bin/chgrp
|
2001-07-13 08:16:02 +02:00
|
|
|
CMP?= /usr/bin/cmp
|
2001-06-12 14:49:55 +02:00
|
|
|
CP?= /bin/cp
|
2003-07-23 22:13:47 +02:00
|
|
|
# Needed for 1.6.1 and earlier due to rpcgen bugs and paths
|
|
|
|
.if defined(CPP) && ${CPP} == "cpp"
|
|
|
|
CPP= /usr/bin/cpp
|
|
|
|
.endif
|
2001-06-12 14:49:55 +02:00
|
|
|
CUT?= /usr/bin/cut
|
2002-12-15 14:03:02 +01:00
|
|
|
DATE?= /bin/date
|
2001-06-12 14:49:55 +02:00
|
|
|
DC?= /usr/bin/dc
|
2001-06-18 21:58:55 +02:00
|
|
|
DIRNAME?= /usr/bin/dirname
|
2001-06-12 14:49:55 +02:00
|
|
|
ECHO?= echo # Shell builtin
|
2004-04-07 16:26:50 +02:00
|
|
|
ECHO_N?= ${ECHO} -n
|
2001-06-12 14:49:55 +02:00
|
|
|
EGREP?= /usr/bin/egrep
|
2002-10-05 01:32:17 +02:00
|
|
|
EXPR?= /bin/expr
|
2001-06-12 14:49:55 +02:00
|
|
|
FALSE?= false # Shell builtin
|
2002-12-15 03:12:32 +01:00
|
|
|
FGREP?= /usr/bin/fgrep
|
2001-07-15 14:40:03 +02:00
|
|
|
FILE_CMD?= /usr/bin/file
|
2001-06-12 14:49:55 +02:00
|
|
|
FIND?= /usr/bin/find
|
2001-12-19 11:29:11 +01:00
|
|
|
GMAKE?= ${LOCALBASE}/bin/gmake
|
2001-06-12 14:49:55 +02:00
|
|
|
GREP?= /usr/bin/grep
|
2002-10-17 01:42:00 +02:00
|
|
|
.if exists(/bin/tar)
|
|
|
|
GTAR?= /bin/tar
|
|
|
|
.else
|
2001-06-12 14:49:55 +02:00
|
|
|
GTAR?= /usr/bin/tar
|
2002-10-17 01:42:00 +02:00
|
|
|
.endif
|
2001-06-12 14:49:55 +02:00
|
|
|
GUNZIP_CMD?= /usr/bin/gunzip -f
|
|
|
|
GZCAT?= /usr/bin/gzcat
|
|
|
|
GZIP?= -9
|
|
|
|
GZIP_CMD?= /usr/bin/gzip -nf ${GZIP}
|
|
|
|
HEAD?= /usr/bin/head
|
2003-02-28 04:41:39 +01:00
|
|
|
HOSTNAME_CMD?= /bin/hostname
|
2001-06-12 14:49:55 +02:00
|
|
|
ID?= /usr/bin/id
|
|
|
|
LDCONFIG?= /sbin/ldconfig
|
|
|
|
LN?= /bin/ln
|
|
|
|
LS?= /bin/ls
|
2003-03-04 15:50:09 +01:00
|
|
|
M4?= /usr/bin/m4
|
2004-01-27 17:11:47 +01:00
|
|
|
MAIL_CMD?= /usr/bin/mail
|
2001-06-12 14:49:55 +02:00
|
|
|
MKDIR?= /bin/mkdir -p
|
|
|
|
MTREE?= /usr/sbin/mtree
|
|
|
|
MV?= /bin/mv
|
2002-12-15 14:03:02 +01:00
|
|
|
NICE?= /usr/bin/nice
|
2001-06-12 14:49:55 +02:00
|
|
|
PATCH?= /usr/bin/patch
|
|
|
|
PAX?= /bin/pax
|
2002-04-10 00:15:40 +02:00
|
|
|
PERL5?= ${LOCALBASE}/bin/perl
|
2001-06-12 14:49:55 +02:00
|
|
|
PKGLOCALEDIR?= share
|
2002-01-19 22:29:41 +01:00
|
|
|
PS?= /bin/ps
|
2003-01-15 21:55:38 +01:00
|
|
|
PWD_CMD?= /bin/pwd # needs to print physical path
|
2001-06-12 14:49:55 +02:00
|
|
|
RM?= /bin/rm
|
|
|
|
RMDIR?= /bin/rmdir
|
2004-05-31 18:47:00 +02:00
|
|
|
RSH?= /usr/bin/rsh
|
2001-06-12 14:49:55 +02:00
|
|
|
SED?= /usr/bin/sed
|
|
|
|
SETENV?= /usr/bin/env
|
|
|
|
SH?= /bin/sh
|
2002-01-19 22:29:41 +01:00
|
|
|
SHLOCK= /usr/bin/shlock
|
2001-06-12 15:16:09 +02:00
|
|
|
SORT?= /usr/bin/sort
|
2001-06-12 14:49:55 +02:00
|
|
|
SU?= /usr/bin/su
|
|
|
|
TAIL?= /usr/bin/tail
|
2003-09-23 09:26:22 +02:00
|
|
|
.if exists(/bin/tar)
|
|
|
|
TAR?= /bin/tar
|
|
|
|
.else
|
|
|
|
TAR?= /usr/bin/tar
|
|
|
|
.endif
|
2002-12-16 10:18:56 +01:00
|
|
|
TEE?= /usr/bin/tee
|
2001-06-12 14:49:55 +02:00
|
|
|
TEST?= test # Shell builtin
|
|
|
|
TOUCH?= /usr/bin/touch
|
|
|
|
TR?= /usr/bin/tr
|
|
|
|
TRUE?= true # Shell builtin
|
2002-12-16 10:18:56 +01:00
|
|
|
TSORT?= /usr/bin/tsort
|
2001-06-12 14:49:55 +02:00
|
|
|
TYPE?= type # Shell builtin
|
2001-06-12 15:16:09 +02:00
|
|
|
WC?= /usr/bin/wc
|
2001-06-12 14:49:55 +02:00
|
|
|
XARGS?= /usr/bin/xargs
|
2001-11-19 17:17:51 +01:00
|
|
|
|
|
|
|
.if exists(/usr/sbin/user)
|
|
|
|
USERADD?= /usr/sbin/useradd
|
|
|
|
GROUPADD?= /usr/sbin/groupadd
|
|
|
|
.else
|
|
|
|
USERADD?= ${LOCALBASE}/sbin/useradd
|
|
|
|
GROUPADD?= ${LOCALBASE}/sbin/groupadd
|
2004-04-27 15:43:05 +02:00
|
|
|
_USER_DEPENDS= user>=20000313:../../sysutils/user
|
2001-11-20 17:53:44 +01:00
|
|
|
.endif
|
2001-11-21 13:42:23 +01:00
|
|
|
|
2004-11-16 19:04:00 +01:00
|
|
|
CPP_PRECOMP_FLAGS?= # unset
|
2001-11-21 15:10:06 +01:00
|
|
|
DEF_UMASK?= 0022
|
2002-09-04 16:47:32 +02:00
|
|
|
.if ${OBJECT_FMT} == "ELF"
|
|
|
|
EXPORT_SYMBOLS_LDFLAGS?=-Wl,-E # add symbols to the dynamic symbol table
|
|
|
|
.else
|
|
|
|
EXPORT_SYMBOLS_LDFLAGS?=-Wl,--export-dynamic
|
|
|
|
.endif
|
2001-11-21 14:54:14 +01:00
|
|
|
MOTIF_TYPE_DEFAULT?= openmotif # default 2.0 compatible libs type
|
2001-11-21 15:10:06 +01:00
|
|
|
NOLOGIN?= /sbin/nologin
|
2003-12-10 14:37:48 +01:00
|
|
|
.if exists(${LOCALBASE}/sbin/pkg_info)
|
|
|
|
PKG_TOOLS_BIN?= ${LOCALBASE}/sbin
|
|
|
|
.else
|
2001-11-21 15:10:06 +01:00
|
|
|
PKG_TOOLS_BIN?= /usr/sbin
|
2003-12-10 14:37:48 +01:00
|
|
|
.endif
|
2002-07-15 18:24:01 +02:00
|
|
|
ROOT_CMD?= ${SU} - root -c
|
2001-11-21 15:10:06 +01:00
|
|
|
ROOT_USER?= root
|
2001-11-20 17:19:20 +01:00
|
|
|
ROOT_GROUP?= wheel
|
2002-08-28 13:06:17 +02:00
|
|
|
ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d`
|
|
|
|
ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s`
|
|
|
|
ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m`
|
2001-11-21 13:53:04 +01:00
|
|
|
|
2003-02-24 20:49:47 +01:00
|
|
|
# imake installs manpages in weird places
|
|
|
|
# these values from /usr/X11R6/lib/X11/config/NetBSD.cf
|
|
|
|
IMAKE_MAN_SOURCE_PATH= man/cat
|
2004-01-31 17:52:16 +01:00
|
|
|
IMAKE_MANNEWSUFFIX= 0
|
2003-02-24 20:49:47 +01:00
|
|
|
IMAKE_MAN_SUFFIX= 1
|
|
|
|
IMAKE_LIBMAN_SUFFIX= 3
|
2004-01-31 17:52:16 +01:00
|
|
|
IMAKE_KERNMAN_SUFFIX= ${IMAKE_MANNEWSUFFIX}
|
2003-02-24 20:49:47 +01:00
|
|
|
IMAKE_FILEMAN_SUFFIX= 5
|
2004-01-31 17:52:16 +01:00
|
|
|
IMAKE_MISCMAN_SUFFIX= ${IMAKE_MANNEWSUFFIX}
|
2003-02-24 20:49:47 +01:00
|
|
|
IMAKE_MAN_DIR= ${IMAKE_MAN_SOURCE_PATH}1
|
|
|
|
IMAKE_LIBMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}3
|
2004-01-31 17:52:16 +01:00
|
|
|
IMAKE_KERNMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}4
|
2003-02-24 20:49:47 +01:00
|
|
|
IMAKE_FILEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}5
|
2004-01-31 17:52:16 +01:00
|
|
|
IMAKE_MISCMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}7
|
2003-02-24 20:49:47 +01:00
|
|
|
|
2001-11-21 14:17:14 +01:00
|
|
|
_DO_SHLIB_CHECKS= yes # fixup PLIST for shared libs/run ldconfig
|
2001-11-21 14:44:44 +01:00
|
|
|
_IMAKE_MAKE= ${MAKE} # program which gets invoked by imake
|
2002-12-18 07:18:14 +01:00
|
|
|
.if exists(/usr/include/netinet6)
|
|
|
|
_OPSYS_HAS_INET6= yes # IPv6 is standard
|
|
|
|
.else
|
|
|
|
_OPSYS_HAS_INET6= no # IPv6 is not standard
|
|
|
|
.endif
|
2002-12-03 21:53:39 +01:00
|
|
|
_OPSYS_HAS_JAVA= no # Java is not standard
|
2001-11-21 14:44:44 +01:00
|
|
|
_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
|
2001-11-21 14:57:31 +01:00
|
|
|
_OPSYS_HAS_OSSAUDIO= yes # libossaudio is available
|
2004-11-11 23:29:40 +01:00
|
|
|
_OPSYS_LIBTOOL_REQD= 1.5.10nb6
|
2002-12-03 22:13:37 +01:00
|
|
|
_OPSYS_PERL_REQD= # no base version of perl required
|
2003-09-14 18:30:34 +02:00
|
|
|
_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
|
2004-03-11 23:57:22 +01:00
|
|
|
_OPSYS_SHLIB_TYPE= ELF/a.out # shared lib type
|
2002-12-03 20:24:26 +01:00
|
|
|
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
|
2003-12-16 23:54:13 +01:00
|
|
|
_PATCH_BACKUP_ARG?= -V simple -b # switch to patch(1) for backup suffix
|
2001-11-21 14:44:44 +01:00
|
|
|
_PREFORMATTED_MAN_DIR= cat # directory where catman pages are
|
2002-12-03 20:17:33 +01:00
|
|
|
_USE_GNU_GETTEXT= no # Don't use GNU gettext
|
2001-11-21 14:44:44 +01:00
|
|
|
_USE_RPATH= yes # add rpath to LDFLAGS
|
2001-11-21 15:10:06 +01:00
|
|
|
|
2003-04-15 07:29:45 +02:00
|
|
|
# flags passed to the linker to extract all symbols from static archives.
|
|
|
|
# this is GNU ld.
|
|
|
|
_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
|
|
|
|
_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
|
|
|
|
|
2003-06-06 19:13:31 +02:00
|
|
|
# for programs which use dlopen()
|
|
|
|
# not necessary since 1.6 (shared libs are linked against libgcc_pic)
|
|
|
|
.if !empty(OS_VERSION:M1.5*)
|
|
|
|
LINK_ALL_LIBGCC_HACK= -Wl,--whole-archive -lgcc -Wl,--no-whole-archive
|
|
|
|
.endif
|
|
|
|
|
2004-10-13 17:31:31 +02:00
|
|
|
.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS)
|
2002-02-27 05:41:22 +01:00
|
|
|
_STRIPFLAG_CC?= -s # cc(1) option to strip
|
|
|
|
_STRIPFLAG_INSTALL?= -s # install(1) option to strip
|
|
|
|
.endif
|
|
|
|
|
2001-11-21 15:10:06 +01:00
|
|
|
.if (${MACHINE_ARCH} == alpha)
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/ttyC0
|
|
|
|
SERIAL_DEVICES?= /dev/ttyC0 \
|
|
|
|
/dev/ttyC1
|
|
|
|
.elif (${MACHINE_ARCH} == "i386")
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/tty00
|
|
|
|
SERIAL_DEVICES?= /dev/tty00 \
|
|
|
|
/dev/tty01
|
|
|
|
.elif (${MACHINE_ARCH} == m68k)
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/tty00
|
|
|
|
SERIAL_DEVICES?= /dev/tty00 \
|
|
|
|
/dev/tty01
|
|
|
|
.elif (${MACHINE_ARCH} == mipsel)
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/ttyC0
|
|
|
|
SERIAL_DEVICES?= /dev/ttyC0 \
|
|
|
|
/dev/ttyC1
|
|
|
|
.elif (${MACHINE_ARCH} == "sparc")
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/ttya
|
|
|
|
SERIAL_DEVICES?= /dev/ttya \
|
|
|
|
/dev/ttyb
|
|
|
|
.else
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/null
|
|
|
|
SERIAL_DEVICES?= /dev/null
|
|
|
|
.endif
|
For NetBSD/alpha versions >= 1.5V add -mieee to both CFLAGS and FFLAGS.
This will pass -mieee to those package which obey CFLAGS and FFLAGS.
paraphrasing an email from Ross:
The executive summary is: if i386 uses it (and
it does) then alpha should also, or some programs will SIGFPE out
on alpha when they don't on i386.
If anyone asks, the details are as follows:
The actual effect of -mieee is to put a software completion code
bit into every floating point instruction, and to put trap barrier
instructions in the code as necessary to ensure that traps are
delivered before branches or other instructions make it impossible
to trace backwards to the trapping op.
The code bits have little effect on the hardware, mainly what
happens is that when the hardware and palcode deliver a trap, they
tell the trap handler whether the faulting op had a completion
code. If it did, the kernel is suppose to trace backwards, find
the op, and interpret it in SW, doing all the wacky ieee stuff that
most chips don't do, stuff like denormal arithmetic and the generation
of magic values (infinity, NaN) and the sticky flags. We do all
that now except for a couple of truly obscure things that SoftFloat
didn't support and which I haven't yet added. (And these are things
that happen ONLY when you are taking overflow and underflow traps,
which no one has every really done AFAICT. If you have the default
behavior of gradual underflow and nontrapping infinity generation,
we do everything.)
This brings up the question of -mieee libraries, but that's not a
pkgsrc problem. (Except to the extent that I recommend that libraries
from pkgsrc, like everything else, also be compiled with -mieee.
And in the case of libraries, it might be worth individually
modifying the Makefile for the "not easy" case.)
2002-01-24 15:58:07 +01:00
|
|
|
|
|
|
|
# Add -mieee to CFLAGS and FFLAGS for NetBSD->=1.5V-alpha
|
|
|
|
.for __tmp__ in 1.5[V-Z] 1.5[A-Z][A-Z]* 1.[6-9]* [2-9].*
|
|
|
|
. if ${MACHINE_PLATFORM:MNetBSD-${__tmp__}-alpha} != ""
|
|
|
|
CFLAGS+= -mieee
|
|
|
|
FFLAGS+= -mieee
|
2003-10-19 09:38:31 +02:00
|
|
|
. endif # MACHINE_PLATFORM
|
|
|
|
.endfor # __tmp__
|
2002-11-24 10:17:44 +01:00
|
|
|
|
|
|
|
# check for kqueue(2) support, added in NetBSD-1.6J
|
|
|
|
.if exists(/usr/include/sys/event.h)
|
|
|
|
PKG_HAVE_KQUEUE= # defined
|
|
|
|
.endif
|
2004-04-10 00:43:31 +02:00
|
|
|
|
|
|
|
# check for maximum command line length and set it in configure's environment,
|
|
|
|
# to avoid a test required by the libtool script that takes forever.
|
|
|
|
.if defined(GNU_CONFIGURE) && defined(USE_LIBTOOL)
|
|
|
|
_OPSYS_MAX_CMDLEN!= /sbin/sysctl -n kern.argmax
|
|
|
|
.endif
|
2004-05-12 03:03:58 +02:00
|
|
|
|
2004-05-12 16:10:18 +02:00
|
|
|
# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
|
|
|
|
# (it defaults to 'no' as per bsd.pkg.defaults.mk).
|
|
|
|
# Set the group and mode to meaningful values in that case (defaults to
|
|
|
|
# BINOWN, BINGRP and BINMODE as per bsd.pkg.defaults.mk).
|
2004-05-12 03:03:58 +02:00
|
|
|
.if !(empty(SETGIDGAME:M[yY][eE][sS]))
|
|
|
|
GAMEOWN= games
|
|
|
|
GAMEGRP= games
|
|
|
|
GAMEMODE= 2555
|
|
|
|
.endif
|