152a38012Sejakowatz#!/bin/sh 252a38012Sejakowatz# 3338b8dc3SIngo Weinhold# configure [ <options> ] 4614026d7Sshatty 5022fa244SIngo Weinhold# usage 6022fa244SIngo Weinhold# 7022fa244SIngo Weinhold# Prints usage. 8022fa244SIngo Weinhold# 9022fa244SIngo Weinholdusage() 10022fa244SIngo Weinhold{ 11022fa244SIngo Weinhold cat << EOF 12022fa244SIngo Weinhold 13022fa244SIngo WeinholdUsage: $0 <options> 14022fa244SIngo Weinholdoptions: 156f9587ddSAxel Dörfler --bochs-debug Enables bochs serial debug emulation (activated 166f9587ddSAxel Dörfler via kernel settings file). 17338b8dc3SIngo Weinhold --build-cross-tools <build tools dir> 18338b8dc3SIngo Weinhold Assume cross compilation. <build tools dir> 19338b8dc3SIngo Weinhold defines the location of the build tools sources. 20338b8dc3SIngo Weinhold They will be compiled and placed in the output 21a5b60fa8SOliver Tappe directory under "cross-tools". The HAIKU_* tools 22a5b60fa8SOliver Tappe variables will be set accordingly. 2320ab75e6SIngo Weinhold --build-cross-tools-gcc4 <arch> <build tools dir> 2429ef597dSIngo Weinhold Like "--build-cross-tools" just that gcc 4 will 25a5b60fa8SOliver Tappe be used for cross-compilation. Note, that the 26a5b60fa8SOliver Tappe resulting Haiku installation built with gcc 4 27a5b60fa8SOliver Tappe will not be binary compatible with BeOS R5. 2820ab75e6SIngo Weinhold <arch> specifies the target architecture, either 2920ab75e6SIngo Weinhold "x86" or "ppc". 30eccc7665SIngo Weinhold --cross-tools-prefix <prefix> 31eccc7665SIngo Weinhold Assume cross compilation. <prefix> should be a 32eccc7665SIngo Weinhold path to the directory where the cross 33eccc7665SIngo Weinhold compilation tools are located, plus the platform 34eccc7665SIngo Weinhold prefix, e.g. "/path/to/tools/i586-pc-beos-". 35eccc7665SIngo Weinhold This overrides the HAIKU_* tool variables. 36*a66c32ddSIngo Weinhold --distro-compatibility <level> 37*a66c32ddSIngo Weinhold The distribution's level of compatibility with 38*a66c32ddSIngo Weinhold the official Haiku distribution. The generated 39*a66c32ddSIngo Weinhold files will contain the respective trademarks 40*a66c32ddSIngo Weinhold accordingly. 41*a66c32ddSIngo Weinhold official -- the official Haiku distribution. 42*a66c32ddSIngo Weinhold compatible -- a Haiku Compatible (tm) distro. 43*a66c32ddSIngo Weinhold default -- any other distro (default value). 44eccc7665SIngo Weinhold --help Prints out this help. 45eccc7665SIngo Weinhold --include-gpl-addons Include GPL licensed add-ons. 46614026d7Sshatty --target=TARGET Select build target platform. [default=${target}] 47a17b9c0cSshatty valid targets=r5,bone,dano,haiku 48eccc7665SIngo Weinhold --use-gcc-pipe Build with GCC option -pipe. Speeds up the build 495a34a443SFrançois Revol process, but uses more memory. 504f4e5272SIngo Weinhold --use-xattr Use Linux xattr support for BeOS attribute 514f4e5272SIngo Weinhold emulation. Warning: Make sure your file system 524f4e5272SIngo Weinhold supports sufficient attribute sizes (4 KB per 534f4e5272SIngo Weinhold file for all attributes won't suffice). 54338b8dc3SIngo Weinhold 55338b8dc3SIngo Weinholdenvironment variables: 56338b8dc3SIngo Weinhold HAIKU_AR The static library archiver. Defaults to "ar". 57338b8dc3SIngo Weinhold HAIKU_CC The compiler. Defaults to "gcc". 58338b8dc3SIngo Weinhold HAIKU_LD The linker. Defaults to "ld". 59338b8dc3SIngo Weinhold HAIKU_OBJCOPY The objcopy to be used. Defaults to "objcopy". 60338b8dc3SIngo Weinhold HAIKU_RANLIB The static library indexer. Defaults to "ranlib". 61338b8dc3SIngo Weinhold HAIKU_CPPFLAGS The preprocessor flags. Defaults to "". 62338b8dc3SIngo Weinhold HAIKU_CCFLAGS The C flags. Defaults to "". 63338b8dc3SIngo Weinhold HAIKU_CXXFLAGS The C++ flags. Defaults to "". 64338b8dc3SIngo Weinhold HAIKU_LDFLAGS The linker flags. Defaults to "". 65338b8dc3SIngo Weinhold HAIKU_ARFLAGS The flags passed to HAIKU_AR for archiving. 66338b8dc3SIngo Weinhold Defaults to "ru". 67338b8dc3SIngo Weinhold HAIKU_UNARFLAGS The flags passed to HAIKU_AR for unarchiving. 68338b8dc3SIngo Weinhold Defaults to "x". 69022fa244SIngo WeinholdEOF 70022fa244SIngo Weinhold} 71022fa244SIngo Weinhold 72022fa244SIngo Weinhold# assertparam 73022fa244SIngo Weinhold# 74022fa244SIngo Weinhold# Checks whether at least one parameter is left. 75022fa244SIngo Weinhold# 76022fa244SIngo Weinholdassertparam() 77022fa244SIngo Weinhold{ 7820ab75e6SIngo Weinhold if [ $2 -lt 2 ]; then 79022fa244SIngo Weinhold echo $0: \`$1\': Parameter expected. 80022fa244SIngo Weinhold exit 1 81022fa244SIngo Weinhold fi 82022fa244SIngo Weinhold} 83022fa244SIngo Weinhold 8420ab75e6SIngo Weinhold# assertparams 8520ab75e6SIngo Weinhold# 8620ab75e6SIngo Weinhold# Checks whether at least a certain number of parameters is left. 8720ab75e6SIngo Weinhold# 8820ab75e6SIngo Weinholdassertparams() 8920ab75e6SIngo Weinhold{ 9020ab75e6SIngo Weinhold if [ $3 -le $2 ]; then 9120ab75e6SIngo Weinhold echo $0: \`$1\': Not enough parameters. 9220ab75e6SIngo Weinhold exit 1 9320ab75e6SIngo Weinhold fi 9420ab75e6SIngo Weinhold} 9520ab75e6SIngo Weinhold 9609c5682dSIngo Weinhold# standard_gcc_settings 9709c5682dSIngo Weinhold# 9809c5682dSIngo Weinhold# Sets the variables for a GCC platform. 9909c5682dSIngo Weinhold# 10009c5682dSIngo Weinholdstandard_gcc_settings() 10109c5682dSIngo Weinhold{ 10209c5682dSIngo Weinhold # PLATFORM_LINKLIBS 103338b8dc3SIngo Weinhold gcclib=`$HAIKU_CC -print-libgcc-file-name` 10409c5682dSIngo Weinhold gccdir=`dirname ${gcclib}` 1055b0f7b1bSOliver Tappe 106338b8dc3SIngo Weinhold haikuGCCVersion=`$HAIKU_CC -dumpversion` 107338b8dc3SIngo Weinhold haikuGCCMachine=`$HAIKU_CC -dumpmachine` 108338b8dc3SIngo Weinhold 109338b8dc3SIngo Weinhold HAIKU_GCC_LIB_DIR=${gccdir} 110338b8dc3SIngo Weinhold HAIKU_GCC_LIBGCC=${gccdir}/libgcc.a 111338b8dc3SIngo Weinhold HAIKU_GCC_GLUE_CODE="crtbegin.o crtend.o" 112338b8dc3SIngo Weinhold HAIKU_GCC_HEADERS_DIR=${gccdir}/include 1135d978968SIngo Weinhold HAIKU_GCC_LIBGCC_OBJECTS=`$HAIKU_AR t ${HAIKU_GCC_LIBGCC} | grep -v eabi.o` 1145d978968SIngo Weinhold # Note: We filter out eabi.o. It's present in gcc's libgcc for PPC and 1155d978968SIngo Weinhold # neither needed nor wanted. 1168b5934c9SIngo Weinhold 1178b5934c9SIngo Weinhold case $haikuGCCVersion in 1188b5934c9SIngo Weinhold 4.*) 1195b0f7b1bSOliver Tappe # for gcc 4 we use the libstdc++ and libsupc++ that come with the 1205b0f7b1bSOliver Tappe # compiler 1218b5934c9SIngo Weinhold haikuStaticLibStdCxx=`$HAIKU_CC -print-file-name=libstdc++.a` 1228b5934c9SIngo Weinhold haikuSharedLibStdCxx=`$HAIKU_CC -print-file-name=libstdc++.so` 123c89fc875SIngo Weinhold haikuStaticLibSupCxx=`$HAIKU_CC -print-file-name=libsupc++.a` 124c89fc875SIngo Weinhold haikuSharedLibSupCxx=`$HAIKU_CC -print-file-name=libsupc++.so` 1258b5934c9SIngo Weinhold local headers=$gccdir/../../../../include/c++/$haikuGCCVersion 1268b5934c9SIngo Weinhold haikuCxxHeadersDir=$headers 12729ef597dSIngo Weinhold for d in $haikuGCCMachine backward ext; do 12829ef597dSIngo Weinhold # Note: We need the line break, otherwise the line might become 12929ef597dSIngo Weinhold # too long for jam (512 bytes max). 13029ef597dSIngo Weinhold haikuCxxHeadersDir="$haikuCxxHeadersDir 13129ef597dSIngo Weinhold $headers/$d" 1328b5934c9SIngo Weinhold done 133274b450aSMarcus Overhagen 134dad36002SMarcus Overhagen 135dad36002SMarcus Overhagen # when not building the crosscompiler, to use cpp headers from 136274b450aSMarcus Overhagen # tree first, but fallback to local C++ system headers (like <new>) 137dad36002SMarcus Overhagen # if [ "$buildCrossTools" = "" ]; then 138dad36002SMarcus Overhagen # haikuCxxHeadersDir="headers/cpp $haikuCxxHeadersDir" 139dad36002SMarcus Overhagen # fi 1408b5934c9SIngo Weinhold 1418b5934c9SIngo Weinhold if [ $haikuStaticLibStdCxx = libstdc++.a ]; then 1428b5934c9SIngo Weinhold haikuStaticLibStdCxx= 1438b5934c9SIngo Weinhold fi 1448b5934c9SIngo Weinhold if [ $haikuSharedLibStdCxx = libstdc++.so ]; then 1458b5934c9SIngo Weinhold haikuSharedLibStdCxx= 1468b5934c9SIngo Weinhold fi 147c89fc875SIngo Weinhold if [ $haikuStaticLibSupCxx = libsupc++.a ]; then 148c89fc875SIngo Weinhold haikuStaticLibSupCxx= 149c89fc875SIngo Weinhold fi 150c89fc875SIngo Weinhold if [ $haikuSharedLibSupCxx = libsupc++.so ]; then 151c89fc875SIngo Weinhold haikuSharedLibSupCxx= 152c89fc875SIngo Weinhold fi 1538b5934c9SIngo Weinhold ;; 1546cc8eecfSOliver Tappe 2.9*) 1555b0f7b1bSOliver Tappe # check for correct (most up-to-date) legacy compiler and complain 1565b0f7b1bSOliver Tappe # if an older one is installed 1575b0f7b1bSOliver Tappe if [ $haikuGCCVersion != $haikuRequiredLegacyGCCVersion ]; then 1585b0f7b1bSOliver Tappe echo "GCC version $haikuRequiredLegacyGCCVersion is required!"; 1595b0f7b1bSOliver Tappe echo "Please download it from www.haiku-os.org..."; 1605b0f7b1bSOliver Tappe exit 1; 1615b0f7b1bSOliver Tappe fi 1625b0f7b1bSOliver Tappe ;; 1638b5934c9SIngo Weinhold esac 16409c5682dSIngo Weinhold} 16509c5682dSIngo Weinhold 166338b8dc3SIngo Weinhold# set_default_value 167338b8dc3SIngo Weinhold# 168338b8dc3SIngo Weinhold# Set the value for a variable, if no value is set yet. 169338b8dc3SIngo Weinhold# 170338b8dc3SIngo Weinholdset_default_value() 171338b8dc3SIngo Weinhold{ 1720838a930SJérôme Duval eval "$1=\${$1-$2}" 173338b8dc3SIngo Weinhold} 174338b8dc3SIngo Weinhold 175338b8dc3SIngo Weinhold# get_build_tool_path 176338b8dc3SIngo Weinhold# 177338b8dc3SIngo Weinhold# Gets a usable absolute path of a build tool. 178338b8dc3SIngo Weinhold# 179338b8dc3SIngo Weinholdget_build_tool_path() 180338b8dc3SIngo Weinhold{ 181338b8dc3SIngo Weinhold local var="HAIKU_$1" 182338b8dc3SIngo Weinhold local tool=$2 183338b8dc3SIngo Weinhold local path="${crossToolsPrefix}$tool" 184338b8dc3SIngo Weinhold 185338b8dc3SIngo Weinhold if [ -f "$path" ]; then 186338b8dc3SIngo Weinhold # get absolute path 187338b8dc3SIngo Weinhold local oldPwd=$(pwd) 188338b8dc3SIngo Weinhold cd $(dirname "$path") 189338b8dc3SIngo Weinhold path="$(pwd)/$(basename "$path")" 190338b8dc3SIngo Weinhold cd $oldPwd 191338b8dc3SIngo Weinhold else 192338b8dc3SIngo Weinhold which "$path" &> /dev/null || { 193338b8dc3SIngo Weinhold echo "Build tool \"$path\" not found." >&2 194338b8dc3SIngo Weinhold exit 1 195338b8dc3SIngo Weinhold } 196338b8dc3SIngo Weinhold fi 197338b8dc3SIngo Weinhold 198338b8dc3SIngo Weinhold eval "$var=$path" 199338b8dc3SIngo Weinhold} 200338b8dc3SIngo Weinhold 201338b8dc3SIngo Weinhold# get cwd and the source directory 202338b8dc3SIngo WeinholdcurrentDir=`pwd` 2036e7c6fe5SIngo Weinholdcd `dirname "$0"` 204338b8dc3SIngo WeinholdsourceDir=`pwd` 2056e7c6fe5SIngo Weinholdcd "$currentDir" 206338b8dc3SIngo Weinhold 207022fa244SIngo Weinhold# default parameter values 208022fa244SIngo Weinhold# 20952a38012Sejakowatzplatform=`uname` 210338b8dc3SIngo WeinholdhaikuGCCVersion= 2119743fe87SIngo WeinholdhaikuGCCMachine=i586-pc-beos 2128b5934c9SIngo WeinholdhaikuStaticLibStdCxx= 2138b5934c9SIngo WeinholdhaikuSharedLibStdCxx= 214c89fc875SIngo WeinholdhaikuStaticLibSupCxx= 215c89fc875SIngo WeinholdhaikuSharedLibSupCxx= 2168b5934c9SIngo WeinholdhaikuCxxHeadersDir= 217db63fe67SAxel DörflerhostGCCVersion=`gcc -dumpversion` 2182b94bc7bSlillobochs_debug=0 219e91f3ca1Sbeveloperinclude_gpl_addons=0 220*a66c32ddSIngo WeinholddistroCompatibility=default 22162339647SAxel Dörflertarget=haiku 222eccc7665SIngo Weinholduse_gcc_pipe=0 2234f4e5272SIngo Weinholduse_xattr=0 224338b8dc3SIngo WeinholdcrossToolsPrefix= 225338b8dc3SIngo WeinholdbuildCrossTools= 22629ef597dSIngo WeinholdbuildCrossToolsScript="$sourceDir/build/scripts/build_cross_tools" 22720ab75e6SIngo WeinholdbuildCrossToolsMachine= 228338b8dc3SIngo Weinhold 229af4bf973SOliver Tappeexport haikuRequiredLegacyGCCVersion="2.95.3-beos-060710" 230af4bf973SOliver Tappe # version of legacy gcc required to build haiku 231af4bf973SOliver Tappe 232338b8dc3SIngo Weinholdset_default_value HAIKU_AR ar 233338b8dc3SIngo Weinholdset_default_value HAIKU_CC gcc 234338b8dc3SIngo Weinholdset_default_value HAIKU_LD ld 235338b8dc3SIngo Weinholdset_default_value HAIKU_OBJCOPY objcopy 236338b8dc3SIngo Weinholdset_default_value HAIKU_RANLIB ranlib 237338b8dc3SIngo Weinholdset_default_value HAIKU_CPPFLAGS "" 238338b8dc3SIngo Weinholdset_default_value HAIKU_CCFLAGS "" 239338b8dc3SIngo Weinholdset_default_value HAIKU_CXXFLAGS "" 240338b8dc3SIngo Weinholdset_default_value HAIKU_LDFLAGS "" 241338b8dc3SIngo Weinholdset_default_value HAIKU_ARFLAGS ru 242338b8dc3SIngo Weinholdset_default_value HAIKU_UNARFLAGS x 24362339647SAxel Dörfler 244022fa244SIngo Weinhold# parse parameters 245022fa244SIngo Weinhold# 24620ab75e6SIngo Weinholdwhile [ $# -gt 0 ] ; do 247022fa244SIngo Weinhold case "$1" in 2482b94bc7bSlillo --bochs-debug) bochs_debug=1; shift 1;; 249a5b60fa8SOliver Tappe --build-cross-tools) assertparam "$1" $#; buildCrossTools=$2; shift 2;; 25020ab75e6SIngo Weinhold --build-cross-tools-gcc4) assertparams "$1" 2 $#; buildCrossTools=$3; 25129ef597dSIngo Weinhold buildCrossToolsScript="${buildCrossToolsScript}_gcc4"; 25220ab75e6SIngo Weinhold case "$2" in 25320ab75e6SIngo Weinhold x86) haikuGCCMachine=i586-pc-haiku;; 25420ab75e6SIngo Weinhold ppc) haikuGCCMachine=powerpc-apple-haiku;; 25520ab75e6SIngo Weinhold *) echo "Unsupported target architecture: $2" 25620ab75e6SIngo Weinhold exit 1;; 25720ab75e6SIngo Weinhold esac 258a5b60fa8SOliver Tappe buildCrossToolsMachine=$haikuGCCMachine 25920ab75e6SIngo Weinhold shift 3;; 260eccc7665SIngo Weinhold --cross-tools-prefix) assertparam "$1" $#; crossToolsPrefix=$2; shift 2;; 261022fa244SIngo Weinhold --help | -h) usage; exit 0;; 262eccc7665SIngo Weinhold --include-gpl-addons) include_gpl_addons=1; shift 1;; 263*a66c32ddSIngo Weinhold --distro-compatibility) 264*a66c32ddSIngo Weinhold assertparam "$1" $#; distroCompatibility=$2; 265*a66c32ddSIngo Weinhold case "$distroCompatibility" in 266*a66c32ddSIngo Weinhold official) ;; 267*a66c32ddSIngo Weinhold compatible) ;; 268*a66c32ddSIngo Weinhold default) ;; 269*a66c32ddSIngo Weinhold *) echo "Invalid distro compatibility" \ 270*a66c32ddSIngo Weinhold "level: $distroCompatibility" 271*a66c32ddSIngo Weinhold exit 1;; 272*a66c32ddSIngo Weinhold esac 273*a66c32ddSIngo Weinhold shift 2;; 274eccc7665SIngo Weinhold --target=*) target=`echo $1 | cut -d'=' -f2-`; shift 1;; 275eccc7665SIngo Weinhold --use-gcc-pipe) use_gcc_pipe=1; shift 1;; 2764f4e5272SIngo Weinhold --use-xattr) use_xattr=1; shift 1;; 277022fa244SIngo Weinhold *) echo Invalid argument: \`$1\'; exit 1;; 278022fa244SIngo Weinhold esac 279022fa244SIngo Weinholddone 280022fa244SIngo Weinhold 2810df3cc9cSIngo Weinhold# detect the build platform 282338b8dc3SIngo Weinholdcase "${platform}" in 2830df3cc9cSIngo Weinhold BeOS) revision=`uname -r` 2840df3cc9cSIngo Weinhold case "$revision" in 28514998c8bSIngo Weinhold 6.*) buildPlatform=dano ;; 2860df3cc9cSIngo Weinhold 5.1) buildPlatform=dano ;; 2870df3cc9cSIngo Weinhold 5.0.4) buildPlatform=bone ;; 2880df3cc9cSIngo Weinhold 5.0*) buildPlatform=r5 ;; 2890df3cc9cSIngo Weinhold *) echo Unknown BeOS version: $revision 2900df3cc9cSIngo Weinhold exit 1 ;; 2910df3cc9cSIngo Weinhold esac 2920df3cc9cSIngo Weinhold ;; 293338b8dc3SIngo Weinhold Linux) buildPlatform=linux ;; 294307807f2SNathan Whitehorn FreeBSD) buildPlatform=freebsd ;; 2956dcd0ccfSIngo Weinhold Darwin) buildPlatform=darwin ;; 296338b8dc3SIngo Weinhold *) echo Unsupported platform: ${platform} 2974cbe4925SAxel Dörfler exit 1 ;; 2984cbe4925SAxel Dörfleresac 29952a38012Sejakowatz 300338b8dc3SIngo Weinhold# create output directory 301338b8dc3SIngo Weinholdif [ "$currentDir" = "$sourceDir" ]; then 302338b8dc3SIngo Weinhold outputDir=$currentDir/generated 303338b8dc3SIngo Weinholdelse 304338b8dc3SIngo Weinhold outputDir=$currentDir 305338b8dc3SIngo Weinholdfi 3066e7c6fe5SIngo WeinholdbuildOutputDir="$outputDir/build" 3076e7c6fe5SIngo WeinholdbuildAttributesDir="$outputDir/attributes" 3086e7c6fe5SIngo Weinholdmkdir -p "$buildOutputDir" || exit 1 309338b8dc3SIngo Weinhold 310338b8dc3SIngo Weinhold# build cross tools from sources 311338b8dc3SIngo Weinholdif [ -n "$buildCrossTools" ]; then 31220ab75e6SIngo Weinhold "$buildCrossToolsScript" $buildCrossToolsMachine "$sourceDir" \ 3136e7c6fe5SIngo Weinhold "$buildCrossTools" "$outputDir" || exit 1 314a5b60fa8SOliver Tappe crossToolsPrefix="$outputDir/cross-tools/bin/${haikuGCCMachine}-" 315338b8dc3SIngo Weinholdfi 316338b8dc3SIngo Weinhold 317338b8dc3SIngo Weinhold# cross tools 318338b8dc3SIngo Weinholdif [ -n "$crossToolsPrefix" ]; then 319338b8dc3SIngo Weinhold get_build_tool_path AR ar 320338b8dc3SIngo Weinhold get_build_tool_path CC gcc 321338b8dc3SIngo Weinhold get_build_tool_path LD ld 322338b8dc3SIngo Weinhold get_build_tool_path OBJCOPY objcopy 323338b8dc3SIngo Weinhold get_build_tool_path RANLIB ranlib 324338b8dc3SIngo Weinholdfi 325338b8dc3SIngo Weinhold 326338b8dc3SIngo Weinhold# prepare gcc settings 327338b8dc3SIngo Weinholdstandard_gcc_settings 328338b8dc3SIngo Weinhold 329eedc3d0bSIngo Weinhold# check whether the Haiku compiler really targets Haiku or BeOS 330eedc3d0bSIngo Weinholdcase "$haikuGCCMachine" in 331eedc3d0bSIngo Weinhold *-*-haiku) ;; 332eedc3d0bSIngo Weinhold *-*-beos) ;; 333eedc3d0bSIngo Weinhold *) echo The compiler specified as Haiku target compiler is not a valid \ 334eedc3d0bSIngo Weinhold Haiku cross-compiler. Please see ReadMe.cross-compile. >&2 335eedc3d0bSIngo Weinhold echo compiler: $HAIKU_CC 336eedc3d0bSIngo Weinhold echo compiler is configured for target: $haikuGCCMachine 337eedc3d0bSIngo Weinhold exit 1 ;; 338eedc3d0bSIngo Weinholdesac 339eedc3d0bSIngo Weinhold 34052a38012Sejakowatz# Generate BuildConfig 3416e7c6fe5SIngo Weinholdcat << EOF > "$buildOutputDir/BuildConfig" 34252a38012Sejakowatz# BuildConfig 34352a38012Sejakowatz# Note: This file has been automatically generated by configure. 34452a38012Sejakowatz 3456e7c6fe5SIngo WeinholdTARGET_PLATFORM ?= "${target}" ; 3466e7c6fe5SIngo WeinholdHOST_PLATFORM ?= "${buildPlatform}" ; 347338b8dc3SIngo Weinhold 348eccc7665SIngo WeinholdBOCHS_DEBUG_HACK ?= "${bochs_debug}" ; 349eccc7665SIngo WeinholdINCLUDE_GPL_ADDONS ?= "${include_gpl_addons}" ; 350*a66c32ddSIngo WeinholdHAIKU_DISTRO_COMPATIBILITY ?= "${distroCompatibility}" ; 351eccc7665SIngo WeinholdHAIKU_USE_GCC_PIPE ?= "${use_gcc_pipe}" ; 3524f4e5272SIngo WeinholdHAIKU_HOST_USE_XATTR ?= "${use_xattr}" ; 353eccc7665SIngo Weinhold 354338b8dc3SIngo WeinholdHAIKU_GCC_RAW_VERSION ?= ${haikuGCCVersion} ; 355338b8dc3SIngo WeinholdHAIKU_GCC_MACHINE ?= ${haikuGCCMachine} ; 356338b8dc3SIngo WeinholdHAIKU_GCC_LIB_DIR ?= ${HAIKU_GCC_LIB_DIR} ; 357338b8dc3SIngo WeinholdHAIKU_GCC_HEADERS_DIR ?= ${HAIKU_GCC_HEADERS_DIR} ; 358338b8dc3SIngo WeinholdHAIKU_GCC_LIBGCC ?= ${HAIKU_GCC_LIBGCC} ; 359338b8dc3SIngo Weinhold 3608b5934c9SIngo WeinholdHAIKU_STATIC_LIBSTDC++ ?= ${haikuStaticLibStdCxx} ; 3618b5934c9SIngo WeinholdHAIKU_SHARED_LIBSTDC++ ?= ${haikuSharedLibStdCxx} ; 362c89fc875SIngo WeinholdHAIKU_STATIC_LIBSUPC++ ?= ${haikuStaticLibSupCxx} ; 363c89fc875SIngo WeinholdHAIKU_SHARED_LIBSUPC++ ?= ${haikuSharedLibSupCxx} ; 3648b5934c9SIngo WeinholdHAIKU_C++_HEADERS_DIR ?= ${haikuCxxHeadersDir} ; 3658b5934c9SIngo Weinhold 366338b8dc3SIngo WeinholdHAIKU_BUILD_ATTRIBUTES_DIR ?= ${buildAttributesDir} ; 367338b8dc3SIngo Weinhold 368338b8dc3SIngo WeinholdHAIKU_AR ?= ${HAIKU_AR} ; 369338b8dc3SIngo WeinholdHAIKU_CC ?= ${HAIKU_CC} ; 370338b8dc3SIngo WeinholdHAIKU_LD ?= ${HAIKU_LD} ; 371338b8dc3SIngo WeinholdHAIKU_OBJCOPY ?= ${HAIKU_OBJCOPY} ; 372338b8dc3SIngo WeinholdHAIKU_RANLIB ?= ${HAIKU_RANLIB} ; 373338b8dc3SIngo WeinholdHAIKU_CPPFLAGS ?= ${HAIKU_CPPFLAGS} ; 374338b8dc3SIngo WeinholdHAIKU_CCFLAGS ?= ${HAIKU_CCFLAGS} ; 375338b8dc3SIngo WeinholdHAIKU_CXXFLAGS ?= ${HAIKU_CXXFLAGS} ; 376338b8dc3SIngo WeinholdHAIKU_LDFLAGS ?= ${HAIKU_LDFLAGS} ; 377338b8dc3SIngo WeinholdHAIKU_ARFLAGS ?= ${HAIKU_ARFLAGS} ; 378338b8dc3SIngo WeinholdHAIKU_UNARFLAGS ?= ${HAIKU_UNARFLAGS} ; 379338b8dc3SIngo Weinhold 3808b5934c9SIngo WeinholdHOST_GCC_RAW_VERSION ?= ${hostGCCVersion} ; 3818b5934c9SIngo Weinhold 382c4786ea6SlilloEOF 383c4786ea6Slillo 384b1e5b60cSAxel Dörfler# Libgcc.a objects 385b1e5b60cSAxel Dörfler 3866e7c6fe5SIngo Weinholdcat << EOF > "$buildOutputDir/libgccObjects" 387b1e5b60cSAxel Dörfler# libgcc.a objects to be linked against libroot.so 388b1e5b60cSAxel Dörfler# Note: This file has been automatically generated by configure. 389b1e5b60cSAxel Dörfler 390338b8dc3SIngo WeinholdHAIKU_GCC_LIBGCC_OBJECTS ?= ${HAIKU_GCC_LIBGCC_OBJECTS} ; 391b1e5b60cSAxel DörflerEOF 392b1e5b60cSAxel Dörfler 3934c74bde8SJérôme Duval# Generate Timezones binaries bindings 3944c74bde8SJérôme Duval 395338b8dc3SIngo WeinholdtimezoneSources="africa antarctica asia australasia europe northamerica 396338b8dc3SIngo Weinhold southamerica pacificnew etcetera factory backward" 397338b8dc3SIngo Weinhold 3986e7c6fe5SIngo Weinholdcat << EOF > "$buildOutputDir/Timezones" 399b1e5b60cSAxel Dörfler# Timezones used for the build 400b1e5b60cSAxel Dörfler# Note: This file has been automatically generated by configure. 401b1e5b60cSAxel Dörfler 402338b8dc3SIngo WeinholdHAIKU_TIME_ZONE_SOURCES = ${timezoneSources} ; 403338b8dc3SIngo Weinhold 404b1e5b60cSAxel DörflerEOF 405b1e5b60cSAxel Dörfler 406338b8dc3SIngo Weinholdfor source in ${timezoneSources}; do 407338b8dc3SIngo Weinhold f=$sourceDir/src/data/etc/timezones/$source 4084c74bde8SJérôme Duval 4096e7c6fe5SIngo WeinholdTZOBJECTS=`gawk '/^Zone/ { print $2 } /^Link/ { print $3 } ' "$f" ` 4104c74bde8SJérôme Duval 4116e7c6fe5SIngo Weinholdcat << EOF >> "$buildOutputDir/Timezones" 412338b8dc3SIngo WeinholdTZ_OBJECTS on <timezone-source>${source} ?= $TZOBJECTS ; 4134c74bde8SJérôme DuvalEOF 4144c74bde8SJérôme Duvaldone 415338b8dc3SIngo Weinhold 416338b8dc3SIngo Weinhold# Generate a boot strap Jamfile in the output directory, if it is not in 417338b8dc3SIngo Weinhold# the source dir. 418338b8dc3SIngo Weinhold 419338b8dc3SIngo Weinholdif [ "$currentDir" != "$sourceDir" ]; then 420338b8dc3SIngo Weinhold 421338b8dc3SIngo Weinholdcat << EOF > $outputDir/Jamfile 422338b8dc3SIngo Weinhold# automatically generated Jamfile 423338b8dc3SIngo Weinhold 424338b8dc3SIngo WeinholdHAIKU_TOP = ${sourceDir} ; 425338b8dc3SIngo WeinholdHAIKU_OUTPUT_DIR = ${outputDir} ; 426338b8dc3SIngo Weinhold 427338b8dc3SIngo Weinholdinclude [ FDirName \$(HAIKU_TOP) Jamfile ] ; 428338b8dc3SIngo Weinhold 429338b8dc3SIngo WeinholdEOF 430338b8dc3SIngo Weinhold 431338b8dc3SIngo Weinholdfi 432338b8dc3SIngo Weinhold 433