2012-05-21 12:12:37 +01:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2010-03-18 10:22:54 -04:00
|
|
|
|
|
|
|
mk_add_options MOZ_UNIFY_BDATE=1
|
|
|
|
|
|
|
|
mk_add_options MOZ_POSTFLIGHT_ALL+=build/macosx/universal/flight.mk
|
|
|
|
|
2012-10-17 16:30:05 +02:00
|
|
|
DARWIN_VERSION=`uname -r`
|
|
|
|
ac_add_app_options i386 --target=i386-apple-darwin$DARWIN_VERSION
|
|
|
|
ac_add_app_options x86_64 --target=x86_64-apple-darwin$DARWIN_VERSION
|
2013-01-23 11:23:15 +01:00
|
|
|
ac_add_app_options i386 --with-unify-dist=../x86_64/dist
|
|
|
|
ac_add_app_options x86_64 --with-unify-dist=../i386/dist
|
2010-03-18 10:22:54 -04:00
|
|
|
|
2012-01-18 15:35:28 -05:00
|
|
|
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.6.sdk
|
2010-03-18 10:22:54 -04:00
|
|
|
|
2012-09-05 12:09:50 -07:00
|
|
|
. $topsrcdir/build/macosx/mozconfig.common
|
2011-12-08 12:32:18 -05:00
|
|
|
|
2010-03-18 10:22:54 -04:00
|
|
|
# $MOZ_BUILD_APP is only defined when sourced by configure. That's not a
|
|
|
|
# problem, because the variables it affects only need to be set for
|
|
|
|
# configure.
|
|
|
|
if test -n "$MOZ_BUILD_APP" ; then
|
2011-12-01 09:25:40 -05:00
|
|
|
if test "$MOZ_BUILD_APP" = "i386" -o "$MOZ_BUILD_APP" = "x86_64"; then
|
2010-03-18 10:22:54 -04:00
|
|
|
TARGET_CPU=$MOZ_BUILD_APP
|
2011-03-02 14:03:00 -05:00
|
|
|
|
|
|
|
# $HOST_CXX is presently unused. $HOST_CC will only be used during a cross
|
|
|
|
# compile.
|
|
|
|
HOST_CC=$CC
|
|
|
|
HOST_CXX=$CXX
|
|
|
|
|
|
|
|
NATIVE_CPU=`$topsrcdir/build/autoconf/config.guess | cut -f1 -d-`
|
2010-03-18 10:22:54 -04:00
|
|
|
|
|
|
|
# It's not strictly necessary to specify -arch during native builds, but it
|
|
|
|
# makes the merged about:buildconfig easier to follow, and it reduces
|
|
|
|
# conditionalized differences between builds.
|
2011-03-02 14:03:00 -05:00
|
|
|
CC="$CC -arch $TARGET_CPU"
|
|
|
|
CXX="$CXX -arch $TARGET_CPU"
|
2010-03-18 10:22:54 -04:00
|
|
|
|
|
|
|
# These must be set for cross builds, and don't hurt straight builds.
|
|
|
|
RANLIB=ranlib
|
|
|
|
AR=ar
|
|
|
|
AS=$CC
|
|
|
|
LD=ld
|
2012-12-05 09:21:24 +01:00
|
|
|
STRIP="strip"
|
2010-03-18 10:22:54 -04:00
|
|
|
|
|
|
|
# Let configure know that we mean business.
|
|
|
|
if test "$NATIVE_CPU" != "$TARGET_CPU" ; then
|
|
|
|
CROSS_COMPILE=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Each per-CPU build should be entirely oblivious to the fact that a
|
|
|
|
# universal binary will be produced. The exception is packager.mk, which
|
|
|
|
# needs to know to look for universal bits when building the .dmg.
|
|
|
|
UNIVERSAL_BINARY=1
|
|
|
|
|
|
|
|
export CC CXX HOST_CC HOST_CXX RANLIB AR AS LD STRIP
|
|
|
|
fi
|
|
|
|
fi
|