summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
author박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh1302.park@samsung.com>2018-03-19 08:26:24 +0900
committerGitHub Enterprise <noreply-CODE@samsung.com>2018-03-19 08:26:24 +0900
commitd579dbbc3f632c5cbb254ee6687a037116c62e96 (patch)
treeeb44dbd026ef5ae01ffe5288447ddf2c89504302 /scripts
parent30d192850454f101025cfb957b45a63ae5b6f2d8 (diff)
downloadnnfw-d579dbbc3f632c5cbb254ee6687a037116c62e96.tar.gz
nnfw-d579dbbc3f632c5cbb254ee6687a037116c62e96.tar.bz2
nnfw-d579dbbc3f632c5cbb254ee6687a037116c62e96.zip
Add basic configure & build tools (#11)
* Add basic configure & build tools This commit introduces 'nncc' script which eases CMake configure and build. Signed-off-by: Jonghyun Park <jh1302.park@samsung.com> * Fix a typo (NNCC_SCIPRT_RPATH -> NNCC_SCRIPT_RPATH)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build.configuration1
-rw-r--r--scripts/command/build12
-rw-r--r--scripts/command/configure10
3 files changed, 23 insertions, 0 deletions
diff --git a/scripts/build.configuration b/scripts/build.configuration
new file mode 100644
index 000000000..d22c92dce
--- /dev/null
+++ b/scripts/build.configuration
@@ -0,0 +1 @@
+BUILD_WORKSPACE_RPATH="build"
diff --git a/scripts/command/build b/scripts/command/build
new file mode 100644
index 000000000..cdbc3e543
--- /dev/null
+++ b/scripts/command/build
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+source "${NNCC_SCRIPT_PATH}/build.configuration"
+
+BUILD_WORKSPACE_PATH="${NNCC_PROJECT_PATH}/${BUILD_WORKSPACE_RPATH}"
+
+if [[ ! -d "${BUILD_WORKSPACE_PATH}" ]]; then
+ echo "'${BUILD_WORKSPACE_RPATH}' does not exist. Please run 'configure' first"
+ exit 255
+fi
+cd "${BUILD_WORKSPACE_PATH}"
+make
diff --git a/scripts/command/configure b/scripts/command/configure
new file mode 100644
index 000000000..3af975849
--- /dev/null
+++ b/scripts/command/configure
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+source "${NNCC_SCRIPT_PATH}/build.configuration"
+
+BUILD_WORKSPACE_PATH="${NNCC_PROJECT_PATH}/${BUILD_WORKSPACE_RPATH}"
+
+mkdir -p "${BUILD_WORKSPACE_PATH}"
+
+cd "${BUILD_WORKSPACE_PATH}"
+cmake "${NNCC_PROJECT_PATH}" "$@"