diff --git a/README.md b/README.md index d975d3730569dd503b781531a1f2de78de018056..b6ae2beed999d146c64ffc9ee495373d9b77a175 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 5761b94a787a111369d8a0057078d3c8df583019..d1603f4a9cd9a36e8e2a92b8cb9124c801f5464b 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