1#!/bin/sh 2# 3# configure [ <options> ] 4 5# usage 6# 7# Prints usage. 8# 9usage() 10{ 11 cat << EOF 12 13Usage: $0 <options> 14options: 15 --build-cross-tools <build tools dir> 16 Assume cross compilation. <build tools dir> 17 defines the location of the build tools sources. 18 They will be compiled and placed in the output 19 directory under "cross-tools". The HAIKU_* tools 20 variables will be set accordingly. 21 --build-cross-tools-gcc4 <arch> <build tools dir> 22 Like "--build-cross-tools" just that gcc 4 will 23 be used for cross-compilation. Note, that the 24 resulting Haiku installation built with gcc 4 25 will not be binary compatible with BeOS R5. 26 <arch> specifies the target architecture, either 27 "x86", "x86_64", "ppc", "m68k", "arm" or "mipsel". 28 --cross-tools-prefix <prefix> 29 Assume cross compilation. <prefix> should be a 30 path to the directory where the cross 31 compilation tools are located, plus the platform 32 prefix, e.g. "/path/to/tools/i586-pc-haiku-". 33 This overrides the HAIKU_* tool variables. 34 --distro-compatibility <level> 35 The distribution's level of compatibility with 36 the official Haiku distribution. The generated 37 files will contain the respective trademarks 38 accordingly. 39 official -- the official Haiku distribution. 40 compatible -- a Haiku Compatible (tm) distro. 41 default -- any other distro (default value). 42 --enable-multiuser Enable experimental multiuser support. 43 --help Prints out this help. 44 --include-gpl-addons Include GPL licensed add-ons. 45 --include-patented-code Enable code that is known to implemented patented 46 ideas and techniques. If this option is not 47 specified, the resulting distribution may still 48 implement patented ideas and techniques. This 49 option only disables code that is currently known 50 to be problematic. 51 --include-sources Includes the source code of projects that require 52 either an offer of source code or a copy of the 53 patched sources. This is preferable when 54 distributing on physical mediums. 55 --include-3rdparty Include 3rdparty/ in the build system. 56 -j<n> Only relevant for --build-cross-tools and 57 --build-cross-tools-gcc4. Is passed on to the 58 make building the build tools. 59 --target=TARGET Select build target platform. 60 [default=${TARGET_PLATFORM}] 61 valid targets=r5,bone,dano,haiku 62 --update re-runs last configure invocation [must be given 63 as first option!] 64 --use-gcc-pipe Build with GCC option -pipe. Speeds up the build 65 process, but uses more memory. 66 --use-32bit Use -m32 flag on 64bit host gcc compiler. 67 --use-xattr Use Linux xattr support for BeOS attribute 68 emulation. Warning: Make sure your file system 69 supports sufficient attribute sizes (4 KB per 70 file for all attributes won't suffice). 71 72environment variables: 73 HAIKU_AR The static library archiver. Defaults to "ar". 74 HAIKU_CC The compiler. Defaults to "gcc". 75 HAIKU_LD The linker. Defaults to "ld". 76 HAIKU_OBJCOPY The objcopy to be used. Defaults to "objcopy". 77 HAIKU_RANLIB The static library indexer. Defaults to "ranlib". 78 HAIKU_YASM The yasm assembler (x86 only). 79 HAIKU_CPPFLAGS The preprocessor flags. Defaults to "". 80 HAIKU_CCFLAGS The C flags. Defaults to "". 81 HAIKU_CXXFLAGS The C++ flags. Defaults to "". 82 HAIKU_LDFLAGS The linker flags. Defaults to "". 83 HAIKU_ARFLAGS The flags passed to HAIKU_AR for archiving. 84 Defaults to "cru". 85 HAIKU_UNARFLAGS The flags passed to HAIKU_AR for unarchiving. 86 Defaults to "x". 87 88Non-standard output directories: 89 By default all objects, build configuration, and other related files are 90 stored in /path/to/haiku_source/generated. To store objects in a non-default 91 location, run "../../relative/path/to/haiku_source/configure <options>" from 92 within your non-default location. "jam [ options ] targets" can then be run 93 directly inside your non-default location. Another option is to invoke "jam 94 [ options ] targets" from within haiku_source. This can be accomplished by 95 either "export HAIKU_OUTPUT_DIR=your non-default location" before invoking 96 jam or by creating a symlink of haiku_source/generated pointing to your 97 non-default location and running jam. 98 99 100EOF 101} 102 103# assertparam 104# 105# Checks whether at least one parameter is left. 106# 107assertparam() 108{ 109 if [ $2 -lt 2 ]; then 110 echo $0: \`$1\': Parameter expected. 111 exit 1 112 fi 113} 114 115# assertparams 116# 117# Checks whether at least a certain number of parameters is left. 118# 119assertparams() 120{ 121 if [ $3 -le $2 ]; then 122 echo $0: \`$1\': Not enough parameters. 123 exit 1 124 fi 125} 126 127# real_path 128# 129# returns the realpath of a symbolic link. 130# 131real_path() 132{ 133 perl -MCwd=realpath -e'print realpath($ARGV[0]), "\n"' "$1" 134} 135 136# standard_gcc_settings 137# 138# Sets the variables for a GCC platform. 139# 140standard_gcc_settings() 141{ 142 if which greadlink > /dev/null 2>&1; then 143 readlink="greadlink -e" 144 elif which realpath > /dev/null 2>&1; then 145 readlink=realpath 146 elif readlink -e / > /dev/null 2>&1; then 147 readlink="readlink -e" 148 else 149 readlink=real_path 150 fi 151 152 # PLATFORM_LINKLIBS 153 gcclib=`$HAIKU_CC -print-libgcc-file-name` 154 gccdir=`dirname ${gcclib}` 155 156 HAIKU_GCC_RAW_VERSION=`$HAIKU_CC -dumpversion` 157 HAIKU_GCC_MACHINE=`$HAIKU_CC -dumpmachine` 158 159 HAIKU_GCC_LIB_DIR=${gccdir} 160 HAIKU_GCC_LIBGCC=${gccdir}/libgcc.a 161 HAIKU_GCC_GLUE_CODE="crtbegin.o crtend.o" 162 HAIKU_GCC_HEADERS_DIR="${gccdir}/include 163 ${gccdir}/include-fixed" 164 HAIKU_GCC_LIBGCC_OBJECTS=`$HAIKU_AR t ${HAIKU_GCC_LIBGCC} | grep -v eabi.o` 165 # Note: We filter out eabi.o. It's present in gcc's libgcc for PPC and 166 # neither needed nor wanted. 167 168 case $HAIKU_GCC_RAW_VERSION in 169 4.*) 170 # for gcc 4 we use the libstdc++ and libsupc++ that come with the 171 # compiler 172 HAIKU_STATIC_LIBSTDCXX=`$HAIKU_CC -print-file-name=libstdc++.a` 173 HAIKU_SHARED_LIBSTDCXX=`$HAIKU_CC -print-file-name=libstdc++.so` 174 HAIKU_STATIC_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++.a` 175 HAIKU_SHARED_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++.so` 176 177 local headers 178 if [ -d $gccdir/../../../../$HAIKU_GCC_MACHINE/include/c++/$HAIKU_GCC_RAW_VERSION ]; then 179 headers=$gccdir/../../../../$HAIKU_GCC_MACHINE/include/c++/$HAIKU_GCC_RAW_VERSION 180 else 181 headers=$gccdir/../../../../include/c++/$HAIKU_GCC_RAW_VERSION 182 fi 183 184 HAIKU_CXX_HEADERS_DIR=$headers 185 for d in $HAIKU_GCC_MACHINE backward ext; do 186 # Note: We need the line break, otherwise the line might become 187 # too long for jam (512 bytes max). 188 HAIKU_CXX_HEADERS_DIR="$HAIKU_CXX_HEADERS_DIR 189 $headers/$d" 190 done 191 192 # Unset the HAIKU_{SHARED,STATIC}_LIB{STD,SUP}CXX variables, if the 193 # compiler didn't give us actual file names. Otherwise resolve 194 # symlinks to avoid problems when copying the libraries to the 195 # image. 196 197 if [ $HAIKU_STATIC_LIBSTDCXX = libstdc++.a ]; then 198 HAIKU_STATIC_LIBSTDCXX= 199 else 200 HAIKU_STATIC_LIBSTDCXX=`$readlink $HAIKU_STATIC_LIBSTDCXX` 201 fi 202 203 if [ $HAIKU_SHARED_LIBSTDCXX = libstdc++.so ]; then 204 HAIKU_SHARED_LIBSTDCXX= 205 else 206 HAIKU_SHARED_LIBSTDCXX=`$readlink $HAIKU_SHARED_LIBSTDCXX` 207 fi 208 209 if [ $HAIKU_STATIC_LIBSUPCXX = libsupc++.a ]; then 210 HAIKU_STATIC_LIBSUPCXX= 211 else 212 HAIKU_STATIC_LIBSUPCXX=`$readlink $HAIKU_STATIC_LIBSUPCXX` 213 fi 214 215 if [ $HAIKU_SHARED_LIBSUPCXX = libsupc++.so ]; then 216 HAIKU_SHARED_LIBSUPCXX= 217 else 218 HAIKU_SHARED_LIBSUPCXX=`$readlink $HAIKU_SHARED_LIBSUPCXX` 219 fi 220 ;; 221 2.9*) 222 # check for correct (most up-to-date) legacy compiler and complain 223 # if an older one is installed 224 if [ $HAIKU_GCC_RAW_VERSION != $haikuRequiredLegacyGCCVersion ]; then 225 echo "GCC version $haikuRequiredLegacyGCCVersion is required!"; 226 echo "Please download it from www.haiku-os.org..."; 227 exit 1; 228 fi 229 ;; 230 esac 231} 232 233# set_default_value 234# 235# Set the value for a variable, if no value is set yet. 236# 237set_default_value() 238{ 239 eval "$1=\${$1-$2}" 240} 241 242# get_build_tool_path 243# 244# Gets a usable absolute path of a build tool. 245# 246get_build_tool_path() 247{ 248 local var="HAIKU_$1" 249 local tool=$2 250 local path="${crossToolsPrefix}$tool" 251 252 if [ -f "$path" ]; then 253 # get absolute path 254 local oldPwd="`pwd`" 255 cd "`dirname "$path"`" 256 path="`pwd`/`basename "$path"`" 257 cd $oldPwd 258 else 259 which "$path" > /dev/null 2>&1 || { 260 echo "Build tool \"$path\" not found." >&2 261 exit 1 262 } 263 fi 264 265 eval "$var=$path" 266} 267 268# get cwd and the source directory 269currentDir=`pwd` 270cd `dirname "$0"` 271sourceDir=`pwd` 272cd "$currentDir" 273 274# backup the passed arguments 275configureArgs="$@" 276 277# internal default parameter values 278# 279platform=`uname` 280platformMachine=`uname -m` 281targetArch=x86 282crossToolsPrefix= 283buildCrossTools= 284buildCrossToolsScript="$sourceDir/build/scripts/build_cross_tools" 285buildCrossToolsMachine= 286buildCrossToolsJobs= 287 288# exported (BuildSetup) default parameter values 289# 290HAIKU_GCC_RAW_VERSION= 291HAIKU_GCC_MACHINE=i586-pc-haiku 292HAIKU_STATIC_LIBSTDCXX= 293HAIKU_SHARED_LIBSTDCXX= 294HAIKU_STATIC_LIBSUPCXX= 295HAIKU_SHARED_LIBSUPCXX= 296HAIKU_CXX_HEADERS_DIR= 297HOST_GCC_RAW_VERSION=`gcc -dumpversion` 298HOST_GCC_MACHINE=`gcc -dumpmachine` 299HAIKU_INCLUDE_GPL_ADDONS=0 300HAIKU_INCLUDE_PATENTED_CODE=0 301HAIKU_INCLUDE_SOURCES=0 302HAIKU_INCLUDE_3RDPARTY=0 303HAIKU_ENABLE_MULTIUSER=0 304HAIKU_DISTRO_COMPATIBILITY=default 305TARGET_PLATFORM=haiku 306HAIKU_USE_GCC_PIPE=0 307HAIKU_HOST_USE_32BIT=0 308HAIKU_HOST_USE_XATTR=0 309HOST_GCC_LD=`gcc -print-prog-name=ld` 310HOST_GCC_OBJCOPY=`gcc -print-prog-name=objcopy` 311SFDISK_BINARY=sfdisk 312HOST_SFDISK=$SFDISK_BINARY 313 314haikuRequiredLegacyGCCVersion="2.95.3-110711" 315export haikuRequiredLegacyGCCVersion 316 # version of legacy gcc required to build haiku 317 318set_default_value HAIKU_AR ar 319set_default_value HAIKU_CC gcc 320set_default_value HAIKU_LD ld 321set_default_value HAIKU_OBJCOPY objcopy 322set_default_value HAIKU_RANLIB ranlib 323set_default_value HAIKU_YASM yasm 324set_default_value HAIKU_CPPFLAGS "" 325set_default_value HAIKU_CCFLAGS "" 326set_default_value HAIKU_CXXFLAGS "" 327set_default_value HAIKU_LDFLAGS "" 328set_default_value HAIKU_ARFLAGS cru 329set_default_value HAIKU_UNARFLAGS x 330 331# determine output directory 332if [ "$currentDir" = "$sourceDir" ]; then 333 outputDir=$currentDir/generated 334else 335 outputDir=$currentDir 336fi 337buildOutputDir="$outputDir/build" 338HAIKU_BUILD_ATTRIBUTES_DIR="$outputDir/attributes" 339buildConfigFile="$buildOutputDir/BuildConfig" 340 341# check for update request 342if [ "$1" = "--update" ]; then 343 if ! [ -e "$buildConfigFile" ]; then 344 echo $0 --update: \'$buildConfigFile\' not found - updating not possible. 345 exit 1 346 fi 347 if ! type perl >/dev/null 2>&1; then 348 echo $0 --update: \'perl\' not found - updating not possible. 349 exit 1 350 fi 351 # convert BuildConfig from jam format to shell format and evaluate it 352 shellConfigFile="${buildConfigFile}.shell" 353 perl "$sourceDir/build/scripts/convert_build_config_to_shell_format.pl" \ 354 <"$buildConfigFile" >"$shellConfigFile" 355 . "$shellConfigFile" 356 rm "$shellConfigFile" 357 shift 358fi 359 360# parse parameters 361# 362while [ $# -gt 0 ] ; do 363 case "$1" in 364 --build-cross-tools) assertparam "$1" $#; buildCrossTools=$2; shift 2;; 365 --build-cross-tools-gcc4) 366 assertparams "$1" 2 $# 367 buildCrossTools=$3 368 buildCrossToolsScript="${buildCrossToolsScript}_gcc4" 369 case "$2" in 370 x86) HAIKU_GCC_MACHINE=i586-pc-haiku;; 371 x86_64) HAIKU_GCC_MACHINE=x86_64-pc-haiku; targetArch=x86_64;; 372 ppc) HAIKU_GCC_MACHINE=powerpc-apple-haiku; targetArch=ppc;; 373 m68k) HAIKU_GCC_MACHINE=m68k-unknown-haiku; targetArch=m86k;; 374 arm) HAIKU_GCC_MACHINE=arm-unknown-haiku; targetArch=arm;; 375 mipsel) HAIKU_GCC_MACHINE=mipsel-unknown-haiku; targetArch=mips;; 376 *) echo "Unsupported target architecture: $2" 377 exit 1;; 378 esac 379 buildCrossToolsMachine=$HAIKU_GCC_MACHINE 380 shift 3 381 ;; 382 --cross-tools-prefix) 383 assertparam "$1" $# 384 crossToolsPrefix=$2 385 shift 2 386 ;; 387 --distro-compatibility) 388 assertparam "$1" $# 389 HAIKU_DISTRO_COMPATIBILITY=$2 390 case "$HAIKU_DISTRO_COMPATIBILITY" in 391 official) ;; 392 compatible) ;; 393 default) ;; 394 *) echo "Invalid distro compatibility" \ 395 "level: $HAIKU_DISTRO_COMPATIBILITY" 396 exit 1;; 397 esac 398 shift 2 399 ;; 400 --enable-multiuser) HAIKU_ENABLE_MULTIUSER=1; shift 1;; 401 --help | -h) usage; exit 0;; 402 --include-gpl-addons) HAIKU_INCLUDE_GPL_ADDONS=1; shift 1;; 403 --include-patented-code) HAIKU_INCLUDE_PATENTED_CODE=1; shift 1;; 404 --include-sources) HAIKU_INCLUDE_SOURCES=1; shift 1;; 405 --include-3rdparty) HAIKU_INCLUDE_3RDPARTY=1; shift 1;; 406 -j*) buildCrossToolsJobs="$1"; shift 1;; 407 --target=*) TARGET_PLATFORM=`echo $1 | cut -d'=' -f2-`; shift 1;; 408 --use-gcc-pipe) HAIKU_USE_GCC_PIPE=1; shift 1;; 409 --use-32bit) HAIKU_HOST_USE_32BIT=1; shift 1;; 410 --use-xattr) HAIKU_HOST_USE_XATTR=1; shift 1;; 411 *) echo Invalid argument: \`$1\'; exit 1;; 412 esac 413done 414 415# detect the build platform 416case "${platform}" in 417 BeOS) revision=`uname -r` 418 case "$revision" in 419 6.*) HOST_PLATFORM=dano ;; 420 5.1) HOST_PLATFORM=dano ;; 421 5.0.4) HOST_PLATFORM=bone ;; 422 5.0*) HOST_PLATFORM=r5 ;; 423 *) echo Unknown BeOS version: $revision 424 exit 1 ;; 425 esac 426 ;; 427 Darwin) HOST_PLATFORM=darwin ;; 428 FreeBSD) HOST_PLATFORM=freebsd 429 SFDISK_BINARY=sfdisk-linux 430 if [ "$HAIKU_HOST_USE_32BIT" = 1 ] ; then 431 echo Unsupported platform: FreeBSD ${platformMachine} 432 exit 1 433 fi ;; 434 Haiku) HOST_PLATFORM=haiku_host ;; 435 Linux) HOST_PLATFORM=linux ;; 436 OpenBSD) HOST_PLATFORM=openbsd ;; 437 SunOS) HOST_PLATFORM=sunos ;; 438 CYGWIN_NT-*) HOST_PLATFORM=cygwin ;; 439 *) echo Unsupported platform: ${platform} 440 exit 1 ;; 441esac 442 443# check yasm version 444if [ $targetArch = "x86" ]; then 445 $HAIKU_YASM --version > /dev/null || { 446 echo "The yasm assembler version 0.7.0 or later must be installed." 447 echo "Download from: http://www.tortall.net/projects/yasm/wiki/Download" 448 exit 1 449 } 450 451 set -- $($HAIKU_YASM --version | head -n 1) 452 versionOK=0 453 case $2 in 454 0.[0-6].*) ;; 455 *) versionOK=1 ;; 456 esac 457versionOK=1 458 459 if [ $versionOK = 0 ]; then 460 echo "The yasm assembler version 0.7.0 or later must be installed." 461 echo "The installed version is $2." 462 echo "Download from: http://www.tortall.net/projects/yasm/wiki/Download" 463 exit 1 464 fi 465fi 466 467# check common locations for sfdisk 468for sfdiskDir in /sbin /usr/sbin /usr/local/sbin ; do 469 if [ -e ${sfdiskDir}/${SFDISK_BINARY} ]; then 470 HOST_SFDISK=${sfdiskDir}/${SFDISK_BINARY} 471 fi 472done 473 474# check for case-sensitive filesystem if on darwin 475if [ $HOST_PLATFORM = "darwin" ]; then 476 diskutil info $(pwd) | grep -i "case-sensitive" > /dev/null 477 if [ $? != 0 ]; then 478 echo "You need a case-sensitive file-system to build Haiku." 479 echo "Please see the following guide on how to set one up:" 480 echo "http://haiku-os.org/documents/dev/how_to_build_haiku_on_mac_os_x" 481 exit 1 482 fi 483fi 484 485# create output directory 486mkdir -p "$buildOutputDir" || exit 1 487 488# build cross tools from sources 489if [ -n "$buildCrossTools" ]; then 490 "$buildCrossToolsScript" $buildCrossToolsMachine "$sourceDir" \ 491 "$buildCrossTools" "$outputDir" $buildCrossToolsJobs || exit 1 492 crossToolsPrefix="$outputDir/cross-tools/bin/${HAIKU_GCC_MACHINE}-" 493fi 494 495# cross tools 496if [ -n "$crossToolsPrefix" ]; then 497 get_build_tool_path AR ar 498 get_build_tool_path CC gcc 499 get_build_tool_path LD ld 500 get_build_tool_path OBJCOPY objcopy 501 get_build_tool_path RANLIB ranlib 502fi 503 504# prepare gcc settings 505standard_gcc_settings 506 507# check whether the Haiku compiler really targets Haiku or BeOS 508case "$HAIKU_GCC_MACHINE" in 509 *-*-haiku) ;; 510 *-*-beos) ;; 511 *) echo The compiler specified as Haiku target compiler is not a valid \ 512 Haiku cross-compiler. Please see ReadMe.cross-compile. >&2 513 echo compiler: $HAIKU_CC 514 echo compiler is configured for target: $HAIKU_GCC_MACHINE 515 exit 1 ;; 516esac 517 518# Generate BuildConfig 519cat << EOF > "$buildConfigFile" 520# BuildConfig 521# Note: This file has been automatically generated by configure with the 522# following arguments: 523# ${configureArgs} 524 525TARGET_PLATFORM ?= "${TARGET_PLATFORM}" ; 526HOST_PLATFORM ?= "${HOST_PLATFORM}" ; 527 528HAIKU_INCLUDE_GPL_ADDONS ?= "${HAIKU_INCLUDE_GPL_ADDONS}" ; 529HAIKU_INCLUDE_PATENTED_CODE ?= "${HAIKU_INCLUDE_PATENTED_CODE}" ; 530HAIKU_INCLUDE_SOURCES ?= "${HAIKU_INCLUDE_SOURCES}" ; 531HAIKU_INCLUDE_3RDPARTY ?= "${HAIKU_INCLUDE_3RDPARTY}" ; 532HAIKU_ENABLE_MULTIUSER ?= "${HAIKU_ENABLE_MULTIUSER}" ; 533HAIKU_DISTRO_COMPATIBILITY ?= "${HAIKU_DISTRO_COMPATIBILITY}" ; 534HAIKU_USE_GCC_PIPE ?= "${HAIKU_USE_GCC_PIPE}" ; 535HAIKU_HOST_USE_32BIT ?= "${HAIKU_HOST_USE_32BIT}" ; 536HAIKU_HOST_USE_XATTR ?= "${HAIKU_HOST_USE_XATTR}" ; 537 538HAIKU_GCC_RAW_VERSION ?= ${HAIKU_GCC_RAW_VERSION} ; 539HAIKU_GCC_MACHINE ?= ${HAIKU_GCC_MACHINE} ; 540HAIKU_GCC_LIB_DIR ?= ${HAIKU_GCC_LIB_DIR} ; 541HAIKU_GCC_HEADERS_DIR ?= ${HAIKU_GCC_HEADERS_DIR} ; 542HAIKU_GCC_LIBGCC ?= ${HAIKU_GCC_LIBGCC} ; 543 544HAIKU_STATIC_LIBSTDC++ ?= ${HAIKU_STATIC_LIBSTDCXX} ; 545HAIKU_SHARED_LIBSTDC++ ?= ${HAIKU_SHARED_LIBSTDCXX} ; 546HAIKU_STATIC_LIBSUPC++ ?= ${HAIKU_STATIC_LIBSUPCXX} ; 547HAIKU_SHARED_LIBSUPC++ ?= ${HAIKU_SHARED_LIBSUPCXX} ; 548HAIKU_C++_HEADERS_DIR ?= ${HAIKU_CXX_HEADERS_DIR} ; 549 550HAIKU_BUILD_ATTRIBUTES_DIR ?= ${HAIKU_BUILD_ATTRIBUTES_DIR} ; 551 552HAIKU_AR ?= ${HAIKU_AR} ; 553HAIKU_CC ?= ${HAIKU_CC} ; 554HAIKU_LD ?= ${HAIKU_LD} ; 555HAIKU_OBJCOPY ?= ${HAIKU_OBJCOPY} ; 556HAIKU_RANLIB ?= ${HAIKU_RANLIB} ; 557HAIKU_YASM ?= ${HAIKU_YASM} ; 558HAIKU_CPPFLAGS ?= ${HAIKU_CPPFLAGS} ; 559HAIKU_CCFLAGS ?= ${HAIKU_CCFLAGS} ; 560HAIKU_CXXFLAGS ?= ${HAIKU_CXXFLAGS} ; 561HAIKU_LDFLAGS ?= ${HAIKU_LDFLAGS} ; 562HAIKU_ARFLAGS ?= ${HAIKU_ARFLAGS} ; 563HAIKU_UNARFLAGS ?= ${HAIKU_UNARFLAGS} ; 564 565HOST_GCC_RAW_VERSION ?= ${HOST_GCC_RAW_VERSION} ; 566HOST_GCC_MACHINE ?= ${HOST_GCC_MACHINE} ; 567HOST_LD ?= ${HOST_GCC_LD} ; 568HOST_OBJCOPY ?= ${HOST_GCC_OBJCOPY} ; 569HOST_SFDISK ?= ${HOST_SFDISK} ; 570 571EOF 572 573# Libgcc.a objects 574 575cat << EOF > "$buildOutputDir/libgccObjects" 576# libgcc.a objects to be linked against libroot.so 577# Note: This file has been automatically generated by configure. 578 579HAIKU_GCC_LIBGCC_OBJECTS ?= ${HAIKU_GCC_LIBGCC_OBJECTS} ; 580EOF 581 582# Generate a boot strap Jamfile in the output directory. 583 584cat << EOF > $outputDir/Jamfile 585# automatically generated Jamfile 586 587HAIKU_TOP = ${sourceDir} ; 588HAIKU_OUTPUT_DIR = ${outputDir} ; 589 590include [ FDirName \$(HAIKU_TOP) Jamfile ] ; 591 592EOF 593