From e216eab538577bedc5ecd51b2bff581e926e2aa0 Mon Sep 17 00:00:00 2001 From: allonli Date: Mon, 28 May 2018 11:52:21 +0800 Subject: [PATCH] checking system environment variables --- README.md | 18 ++++++++++++++++++ build.sh | 16 ++++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d975d37305..b6ae2beed9 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,24 @@ This project is used to develop the next version deep learning freamwork for mob [Used model in development](https://mms-mis.cdn.bcebos.com/paddle-mobile/models.zip) +## cross-compilation to android + +* NDK is required +* ANDROID_NDK environment variable is required + +```bash +sh build.sh android +``` + +## build for x86 +paddle-mobile is to run on arm platform. x86 only used to test not arm assembly code. So do not recommend compiling x86. + +Now only support osx. + +``` +sh build.sh mac +``` + ## Old Version of Mobile-Deep-Learning The old version of MDL was I moved to here [Mobile-Deep-Learning](https://github.com/allonli/mobile-deep-learning) diff --git a/build.sh b/build.sh index 5761b94a78..d1603f4a9c 100755 --- a/build.sh +++ b/build.sh @@ -1,11 +1,15 @@ #!/bin/bash -. /etc/profile -. ~/.bashrc -#. ~/.zshrc - -build_for_linux() { -} +if [ -f "~/.bashrc" ] ; then + . ~/.bashrc +elif [ -f "~/.bash_profile" ] ; then + ~/.bash_profile +elif [ -f "~/.zshrc" ] ; then + . ~/.zshrc +else + echo "not found user environment. load /etc/profile" + . /etc/profile +fi build_for_mac() { if [ ! `which brew` ]; then -- GitLab