Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / mk / platform / Darwin.mk
blob3bc66781f10b5983762d512c8256820a61503092
1 # $NetBSD: Darwin.mk,v 1.51 2013/04/04 10:24:14 jperkin Exp $
3 # Variable definitions for the Darwin operating system.
5 # OS, Kernel, Xcode Version
7 # Codename OS Kernel Xcode
8 # Cheetah 10.0.x 1.3.1
9 # Puma 10.1 1.4.1
10 # 10.1.x 5.x.y
11 # Jaguar 10.2.x 6.x.y
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].*-*)
21 X11_TYPE?= native
22 .endif
24 .if !defined(CPP) || ${CPP} == "cpp"
25 CPP= ${CC} -E ${CPP_PRECOMP_FLAGS}
26 .endif
27 .if empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
28 ECHO_N?= /bin/echo -n
29 .else
30 ECHO_N?= ${ECHO} -n
31 .endif
32 LDD?= /usr/bin/otool -L
33 IMAKE_MAKE?= ${MAKE} # program which gets invoked by imake
34 PKGLOCALEDIR?= share
35 PS?= /bin/ps
36 # XXX: default from defaults/mk.conf. Verify/correct for this platform
37 # and remove this comment.
38 SU?= /usr/bin/su
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
43 .endif
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
52 .endif
53 DEF_UMASK?= 0022
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
60 ROOT_GROUP?= wheel
61 ROOT_USER?= root
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 _OPSYS_SYSTEM_RPATH?= /usr/lib
75 _OPSYS_LIB_DIRS?= /usr/lib
76 _OPSYS_INCLUDE_DIRS?= /usr/include
78 .if ${OS_VERSION:R} >= 6
79 _OPSYS_HAS_INET6= yes # IPv6 is standard
80 .else
81 _OPSYS_HAS_INET6= no # IPv6 is not standard
82 .endif
83 _OPSYS_HAS_JAVA= yes # Java is standard
84 _OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
85 _OPSYS_HAS_OSSAUDIO= no # libossaudio is available
86 _OPSYS_PERL_REQD= 5.8.0 # base version of perl required
87 _OPSYS_PTHREAD_AUTO= yes # -lpthread not needed for pthreads
88 _OPSYS_LINKER_RPATH_FLAG= -L # darwin has no rpath, use -L instead
89 _OPSYS_COMPILER_RPATH_FLAG= -L # compiler flag to pass rpaths to linker
90 _OPSYS_SHLIB_TYPE= dylib # shared lib type
91 _PATCH_CAN_BACKUP= yes # native patch(1) can make backups
92 _PATCH_BACKUP_ARG?= -V simple -b -z # switch to patch(1) for backup suffix
93 _USE_RPATH= no # don't add rpath to LDFLAGS
95 # Builtin defaults which make sense for this platform.
96 PREFER.linux-pam?= native
98 # flags passed to the linker to extract all symbols from static archives.
99 # this is GNU ld.
100 _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
101 _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
103 _OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk
105 _STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-Wl,-x} # cc(1) option to strip
106 _STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip
108 # check for maximum command line length and set it in configure's environment,
109 # to avoid a test required by the libtool script that takes forever.
110 _OPSYS_MAX_CMDLEN_CMD= /usr/sbin/sysctl -n kern.argmax
112 # Darwin 7.7.x has poll() in libc, but no poll.h. Try to help GNU
113 # configure packages that break because of this by pretending that
114 # there is no poll().
115 .if defined(GNU_CONFIGURE)
116 . if !exists(/usr/include/poll.h) && !exists(/usr/include/sys/poll.h)
117 CONFIGURE_ENV+= ac_cv_func_poll=no
118 . endif
119 .endif
121 # Use "/bin/ksh" for buildlink3 wrapper script to improve build performance.
122 .if empty(OS_VERSION:M[0-8].*) && exists(/bin/ksh)
123 WRAPPER_BIN_SH?= /bin/ksh
124 .endif