]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - dense-linear-algebra-libraries/linalg.git/blob - build_linalg.sh
e76f18a41ac527545f37897f612ca5c033dfb2e4
[dense-linear-algebra-libraries/linalg.git] / build_linalg.sh
1 #!/bin/bash
2 set -e
4 ################################################################################
5 #BLIS-BLAS specific: 
6 # C6X_GEN:c6000_7.6.0
7 # TI_OCL_INSTALL_DIR=/opt/ti/mcsdk-hpc_03_00_01_04/ti-opencl_0.14.0/
8 # need to set up the following before running this script:
9 #    export TARGET_ROOTDIR=/evmk2h_nfs
10 #    export TI_INSTALL_DIR=~/ti
11 ################################################################################
13 if [ $# -ne 3 ]; then
14   echo "Usage: $0 <linalg_base_dir> <mcsdk_hpc_dir> <output_dir>";
15   exit 1;
16 fi
18 cd $1
19 LINALG_BASE_DIR=`pwd`
20 cd - 
22 cd $2
23 MCSDK_HPC_DIR=`pwd`
24 cd -
26 cd $3
27 OUTPUT_DIR=`pwd`
28 cd -
30 [ ! -z $MCSDK_HPC_DIR ] || { echo "Error: $MCSDK_HPC_DIR not set!"; exit 1; }
31 [ ! -z $LINALG_BASE_DIR ] || { echo "Error: $LINALG_BASE_DIR not set!"; exit 1; }
32 [ ! -z $OUTPUT_DIR ] || { echo "Error: $OUTPUT_DIR not set!"; exit 1; }
34 # two environment variables below need to be set by setup_hpc_env.sh
35 #export TI_OCL_INSTALL_DIR=/opt/ti/mcsdk-hpc_03_00_01_04/ti-opencl_0.14.0/
36 #export C6X_C_DIR=/home/uda0869574local/ti/c6000_7.6.0/include
38 cd $MCSDK_HPC_DIR/scripts
39 set +e
40 . setup_hpc_env.sh -s $TI_INSTALL_DIR:$TI_INSTALL_DIR/linaro -t $TARGET_ROOTDIR
41 set -e
43 echo "env" 
44 env
46 ####################### buidling LINALG  ########################
47 cd $LINALG_BASE_DIR
48 make prebuild
49 echo "Generating Debian package ..."
50 LINALG_VER=`cat build/version.txt`
51 tar -czf linalg_$LINALG_VER.tar.gz --exclude='*.git' --exclude="*.obj" --exclude="*.o" --files-from=build/tar_files_list.txt
53 cp -v linalg_$LINALG_VER.tar.gz $OUTPUT_DIR
55 make build
57 echo "Generating IPK ..."
58 mkdir -pv ./ipk_install
59 sudo make install DESTDIR=./ipk_install
61 $MCSDK_HPC_DIR/mkrel/ipk/create_ipk.sh $MCSDK_HPC_DIR/mkrel/ipk/linalg ./ipk_install
62 mv -v *.ipk $OUTPUT_DIR