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