Shad Ansari | 2f7f9be | 2017-06-07 13:34:53 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # this shell script build the ING SDK with BAL switch app as a thread |
| 3 | # Eventually this script will be replaced by a make file |
| 4 | #set -x |
| 5 | echo "Preparing ING SDK ${ING_SDK} source tree in ${ING_SDK_DIR}" |
| 6 | |
| 7 | # making build directory |
| 8 | rm -fr ${ING_SDK_DIR} |
| 9 | mkdir -p ${ING_SDK_DIR} |
| 10 | cd ${ING_SDK_DIR}/.. |
| 11 | |
| 12 | #untar the sdk tgz file |
| 13 | echo "Untaring ${ING_SDK}.tar.gz" |
| 14 | tar zxf ${ING_SDK_TOP_DIR}/${ING_SDK}.tar.gz |
| 15 | |
| 16 | #patch sdk with bal modifications - DO NOT change the patch order |
| 17 | echo "Patching SDK ${ING_SDK}.tar.gz with patch file ${ING_SDK_PATCH}" |
| 18 | patch -p0 < ${ING_SDK_TOP_DIR}/${ING_SDK_PATCH} |
| 19 | |
| 20 | #link switch app .h and .c files |
| 21 | echo "Link Switch App Source files" |
| 22 | cd ${ING_SDK_DIR} |
| 23 | mkdir -p make/ |
| 24 | |
| 25 | if [ "${SWITCH}" = "qax" ]; |
| 26 | then |
| 27 | ln -s ${ING_SDK_TOP_DIR}/make/Make.local.qax make/Make.local |
| 28 | else |
| 29 | echo " SWITCH = ${SWITCH} is not specified or supported" |
| 30 | exit |
| 31 | fi |
| 32 | |
| 33 | echo "Done" |