blob: 5c8fe5f161f8c496cebed9e6bfca445ecbd3c508 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001#!/bin/bash
2
3build_root=`pwd`
4cd ../
5wsroot=`pwd`
6
7# PATH
8CCACHE_DIR="$build_root/.ccache"
9ADD_TO_PATH="$build_root/tools/ccache-bin:$build_root/tools/bin"
10
11# Construct build-config.mk
12cd $build_root
13echo SOURCE_PATH = $wsroot > build-config.mk
14echo
15echo Saving PATH settings in `pwd`/path_setup
16echo Source this file later, as needed
17cat >path_setup <<EOF
18#!/bin/bash
19
20export PATH=$ADD_TO_PATH:$PATH
21export CCACHE_DIR=$CCACHE_DIR
22EOF
23
24# regenerate tools/ccache-bin
25rm -rf tools/ccache-bin
26mkdir -p tools/ccache-bin
27
28if [ ! -f /usr/bin/ccache ] ; then
29 echo Please install ccache AYEC and re-run this script
30fi
31
32cd tools/ccache-bin
33for c in gcc g++
34 do
35 if [ -f /usr/bin/ccache ] ; then
36 ln -s /usr/bin/ccache $c
37 else
38 ln -s /usr/bin/gcc
39 fi
40done
41
42cd $wsroot
43
Ed Warnickecb9cada2015-12-08 15:45:58 -070044cd $build_root
45echo Compile native tools
Damjan Marion29b6af92015-12-13 21:17:07 +010046for tool in vppapigen
Ed Warnickecb9cada2015-12-08 15:45:58 -070047do
48 make V=0 is_build_tool=yes $tool-install
49done
50