forked from asyncvlsi/act
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·95 lines (79 loc) · 1.75 KB
/
configure
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/sh
#-------------------------------------------------------------------------
#
# Copyright (c) 2011 Rajit Manohar
# All Rights Reserved
#
#-------------------------------------------------------------------------
#
# Create the "config" file in the scripts/ directory that contains
# standard definitions
#
if [ x$VLSI_TOOLS_SRC = "x" ]
then
echo "Environment variable VLSI_TOOLS_SRC undefined."
echo "It should be set to the root of the tools source tree."
exit 1
fi
first_char=`echo $0 | sed 's/^\(.\).*$/\1/g'`
if [ x$first_char = "x/" ]
then
full_pathname=./`dirname $0`
else
full_pathname=`pwd`/`dirname $0`
fi
arch=`$full_pathname/scripts/getarch`;
os=`$full_pathname/scripts/getos`;
baseos=`$full_pathname/scripts/getbaseos`;
installdir=/usr/local/cad
if [ $# -eq 1 ]
then
installdir=$1
fi
if [ ! -d $installdir ]
then
echo "Missing install directory [$installdir]."
exit 1
fi
echo "Configuring for [$arch] architecture, os [${os}]"
echo "Install directory: [$installdir]"
if [ ! -d $installdir/bin ]
then
mkdir $installdir/bin
fi
if [ ! -d $installdir/lib ]
then
mkdir $installdir/lib
fi
if [ ! -d $installdir/include ]
then
mkdir $installdir/include
fi
if [ ! -d $installdir/include/act ]
then
mkdir $installdir/include/act
fi
c_compiler_name=gcc
cxx_compiler_name=g++
c_compiler_flags=-O2
make_program=gmake
myranlib=ranlib
cat <<EOF > $full_pathname/scripts/config
#
# This file is auto-generated, don't edit it!
#
ARCH=$arch
OS=$os
BASEOS=$baseos
RANLIB=$myranlib
INSTALLDIR=$installdir
C_COMPILER_NAME=$c_compiler_name
CXX_COMPILER_NAME=$cxx_compiler_name
C_COMPILER_FLAGS=$c_compiler_flags
SH_BUILD_OPTIONS="-shared -DPIC -fPIC"
SH_LINK_OPTIONS="-shared -Wl,-x"
EOF
if ! $full_pathname/scripts/check
then
exit 1
fi