1 # $NetBSD: Darwin.mk,v 1.49 2012/11/19 11:34:15 ryoon Exp $
3 # Variable definitions for the Darwin operating system.
5 # OS, Kernel, Xcode Version
7 # Codename OS Kernel Xcode
12 # Panther 10.3.x 7.x.y
13 # Tiger 10.4.x 8.x.y 2.x (gcc 4.0, 4.0.1 from 2.2)
14 # Leopard 10.5.x 9.x.y 3.x (gcc 4.0.1, 4.0.1 and 4.2.1 from 3.1)
15 # Snow Leopard 10.6.x 10.x.y 3.2+ (gcc 4.0.1 and 4.2.1)
16 # Lion 10.7.x 11.x.y 4.1 (llvm gcc 4.2.1)
17 # Mountain Lion 10.8.x 12.x.y 4.5 (llvm gcc 4.2.1)
19 # Tiger (and earlier) use Xfree 4.4.0 (and earlier)
20 .if empty
(MACHINE_PLATFORM
:MDarwin-
[0-8].
*-*)
24 .if
!defined
(CPP
) ||
${CPP} == "cpp"
25 CPP
= ${CC} -E
${CPP_PRECOMP_FLAGS}
27 .if empty
(MACHINE_PLATFORM
:MDarwin-
[0-8].
*-*)
32 LDD?
= /usr
/bin
/otool
-L
33 IMAKE_MAKE?
= ${MAKE} # program which gets invoked by imake
36 # XXX: default from defaults/mk.conf. Verify/correct for this platform
37 # and remove this comment.
39 TYPE?
= type
# Shell builtin
40 IMAKEOPTS
+= -DBuildHtmlManPages
=NO
41 .if defined
(UNPRIVILEGED
) && !empty
(UNPRIVILEGED
:M
[Yy
][Ee
][Ss
])
42 IMAKEOPTS
+= -DInstallFlags
=-c
# do not set user or group
45 .if
!defined
(PKGSRC_COMPILER
) ||
!empty
(PKGSRC_COMPILER
:Mgcc
)
46 # don't look in "/usr/local/include" before "/usr/include".
47 CPP_PRECOMP_FLAGS?
= -isystem
/usr
/include
48 # don't symlink to /usr/bin/gcc since the latter is a wrapper that tries
49 # evoke the real (architecture-dependent) gcc binary in the same place
50 # which fails when called via a symlink from a different directory
51 COMPILER_USE_SYMLINKS?
= no
54 DEFAULT_SERIAL_DEVICE?
= /dev
/null
55 EXPORT_SYMBOLS_LDFLAGS?
= # Don't add symbols to the dynamic symbol table
56 MOTIF_TYPE_DEFAULT?
= motif
# default 2.0 compatible libs type
57 NOLOGIN?
= /usr
/bin
/false
58 PKG_TOOLS_BIN?
= ${LOCALBASE}/sbin
59 ROOT_CMD?
= /usr
/bin
/sudo
${SH} -c
62 SERIAL_DEVICES?
= /dev
/null
63 ULIMIT_CMD_datasize?
= ulimit
-d
`ulimit -H -d`
64 ULIMIT_CMD_stacksize?
= ulimit
-s
`ulimit -H -s`
65 ULIMIT_CMD_memorysize?
= ulimit
-m
`ulimit -H -m`
67 GROUPADD?
= ${LOCALBASE}/sbin
/groupadd
68 USERADD?
= ${LOCALBASE}/sbin
/useradd
69 _PKG_USER_HOME?
= /var
/empty
# to match other system accounts
70 _USER_DEPENDS
= user
>=20040801:..
/..
/sysutils
/user_darwin
72 _OPSYS_EMULDIR.darwin
= # empty
74 .if
${OS_VERSION
:R
} >= 6
75 _OPSYS_HAS_INET6
= yes
# IPv6 is standard
77 _OPSYS_HAS_INET6
= no
# IPv6 is not standard
79 _OPSYS_HAS_JAVA
= yes
# Java is standard
80 _OPSYS_HAS_MANZ
= yes
# MANZ controls gzipping of man pages
81 _OPSYS_HAS_OSSAUDIO
= no
# libossaudio is available
82 _OPSYS_PERL_REQD
= 5.8.0 # base version of perl required
83 _OPSYS_PTHREAD_AUTO
= yes
# -lpthread not needed for pthreads
84 _OPSYS_LINKER_RPATH_FLAG
= -L
# darwin has no rpath, use -L instead
85 _OPSYS_COMPILER_RPATH_FLAG
= -L
# compiler flag to pass rpaths to linker
86 _OPSYS_SHLIB_TYPE
= dylib
# shared lib type
87 _PATCH_CAN_BACKUP
= yes
# native patch(1) can make backups
88 _PATCH_BACKUP_ARG?
= -V simple
-b
-z
# switch to patch(1) for backup suffix
89 _USE_RPATH
= no
# don't add rpath to LDFLAGS
91 # flags passed to the linker to extract all symbols from static archives.
93 _OPSYS_WHOLE_ARCHIVE_FLAG
= -Wl
,--whole-archive
94 _OPSYS_NO_WHOLE_ARCHIVE_FLAG
= -Wl
,--no-whole-archive
96 _OPSYS_CAN_CHECK_SHLIBS
= no
# can't use readelf in check/bsd.check-vars.mk
98 _STRIPFLAG_CC?
= ${_INSTALL_UNSTRIPPED
:D
:U-Wl
,-x
} # cc(1) option to strip
99 _STRIPFLAG_INSTALL?
= ${_INSTALL_UNSTRIPPED
:D
:U-s
} # install(1) option to strip
101 # check for maximum command line length and set it in configure's environment,
102 # to avoid a test required by the libtool script that takes forever.
103 _OPSYS_MAX_CMDLEN_CMD
= /usr
/sbin
/sysctl
-n kern.argmax
105 # Darwin 7.7.x has poll() in libc, but no poll.h. Try to help GNU
106 # configure packages that break because of this by pretending that
107 # there is no poll().
108 .if defined
(GNU_CONFIGURE
)
109 . if
!exists
(/usr
/include/poll.h
) && !exists
(/usr
/include/sys
/poll.h
)
110 CONFIGURE_ENV
+= ac_cv_func_poll
=no
114 # Use "/bin/ksh" for buildlink3 wrapper script to improve build performance.
115 .if empty
(OS_VERSION
:M
[0-8].
*) && exists
(/bin
/ksh
)
116 WRAPPER_BIN_SH?
= /bin
/ksh