blob: 5695ba45f71da4615033a0cbd23b405ec5c8f8d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#! /usr/bin/env bash
# file : build/c/gnu/configure
# author : Boris Kolpackov <boris@codesynthesis.com>
# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
# $1 out file
# $2 optimize (y/n)
#
# bld_root - build root
# project_name - project name
#
source $bld_root/dialog.bash
$echo
$echo
$echo "configuring '$project_name'"
$echo
$echo
$echo
$echo "Please enter the gcc binary you would like to use, for example 'gcc-3.4',"
$echo "'/usr/local/bin/gcc' or 'distcc gcc'."
$echo
c_gnu=`read_path --command gcc`
c_gnu_libraries=`$c_gnu -print-search-dirs | sed -e 's/libraries: =//p' -e d`
optimization=
if [ "$2" == "y" ]; then
$echo
$echo "Please select the optimization level you would like to use:"
$echo
$echo "(1) -O1 [Tries to reduce code size and execution time, without"
$echo " performing any optimizations that take a great deal of"
$echo " compilation time.]"
$echo "(2) -O2 [Performs nearly all supported optimizations that do not"
$echo " involve a space-speed tradeoff.]"
$echo "(3) -O3 [Optimize even more.]"
$echo "(4) -Os [Optimize for size.]"
$echo
optimization=`read_option "-O1 -O2 -O3 -Os" "-O2"`
fi
echo "c_gnu := $c_gnu" > $1
echo "c_gnu_libraries := $c_gnu_libraries" >> $1
echo "c_gnu_optimization_options := $optimization" >> $1
|