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