]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - dense-linear-algebra-libraries/linalg.git/blob - build_linalg.sh
Added linalg examples.
[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 export TI_OCL_INSTALL_DIR=/opt/ti/mcsdk-hpc_03_00_01_04/ti-opencl_0.14.0/
45 echo "env" 
46 env
48 ####################### buidling LINALG  ########################
49 cd $LINALG_BASE_DIR
50 make prebuild
51 echo "Generating Debian package ..."
52 LINALG_VER=`cat build/version.txt`
53 tar -czf linalg_$LINALG_VER.tar.gz --exclude='*.git' --exclude="*.obj" --exclude="*.o" --files-from=build/tar_files_list.txt
55 cp -v linalg_$LINALG_VER.tar.gz $OUTPUT_DIR
57 make build
59 echo "Generating IPK ..."
60 mkdir -pv ./ipk_install
61 sudo make install DESTDIR=./ipk_install
63 $MCSDK_HPC_DIR/mkrel/ipk/create_ipk.sh $MCSDK_HPC_DIR/mkrel/ipk/linalg ./ipk_install
64 mv -v *.ipk $OUTPUT_DIR