| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | ##### android armv7 without neon |
| 4 | mkdir -p build-android-armv7-without-neon |
| 5 | pushd build-android-armv7-without-neon |
| 6 | cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=OFF -DANDROID_PLATFORM=android-19 -DNCNN_VULKAN=ON .. |
| 7 | make -j4 |
| 8 | make install |
| 9 | popd |
| 10 | |
| 11 | ##### android armv7 |
| 12 | mkdir -p build-android-armv7 |
| 13 | pushd build-android-armv7 |
| 14 | cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-19 -DNCNN_VULKAN=ON .. |
| 15 | make -j4 |
| 16 | make install |
| 17 | popd |
| 18 | |
| 19 | ##### android aarch64 |
| 20 | mkdir -p build-android-aarch64 |
| 21 | pushd build-android-aarch64 |
| 22 | cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-21 -DNCNN_VULKAN=ON .. |
| 23 | make -j4 |
| 24 | make install |
| 25 | popd |
| 26 | |
| 27 | ##### android x86 |
| 28 | mkdir -p build-android-x86 |
| 29 | pushd build-android-x86 |
| 30 | cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI="x86" -DANDROID_PLATFORM=android-19 -DNCNN_VULKAN=ON .. |
| 31 | make -j4 |
| 32 | make install |
| 33 | popd |
| 34 | |
| 35 | ##### android x86_64 |
| 36 | mkdir -p build-android-x86_64 |
| 37 | pushd build-android-x86_64 |
| 38 | cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-21 -DNCNN_VULKAN=ON .. |
| 39 | make -j4 |
| 40 | make install |
| 41 | popd |
| 42 | |
| 43 | ##### linux of hisiv300 (forgot the chip name) toolchain with neon and openmp |
| 44 | mkdir -p build-hisiv300-linux |
| 45 | pushd build-hisiv300-linux |
| 46 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/hisiv300.toolchain.cmake .. |
| 47 | make -j4 |
| 48 | make install |
| 49 | popd |
| 50 | |
| 51 | ##### linux of hisiv500 (Hi3516CV200 and Hi3519V101) toolchain with neon and openmp |
| 52 | mkdir -p build-hisiv500-linux |
| 53 | pushd build-hisiv500-linux |
| 54 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/hisiv500.toolchain.cmake .. |
| 55 | make -j4 |
| 56 | make install |
| 57 | popd |
| 58 | |
| 59 | ##### linux of hisiv600 (Hi3559V100) toolchain with neon and no openmp (due to only one cpu, close openmp) |
| 60 | mkdir -p build-hisiv600-linux |
| 61 | pushd build-hisiv600-linux |
| 62 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/hisiv600.toolchain.cmake .. |
| 63 | make -j4 |
| 64 | make install |
| 65 | popd |
| 66 | |
| 67 | ##### linux of himix100 (Hi3559a) toolchain with neon and openmp |
| 68 | mkdir -p build-himix100-linux |
| 69 | pushd build-himix100-linux |
| 70 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/himix100.toolchain.cmake .. |
| 71 | make -j4 |
| 72 | make install |
| 73 | popd |
| 74 | |
| 75 | ##### linux of arm-linux-gnueabi toolchain |
| 76 | mkdir -p build-arm-linux-gnueabi |
| 77 | pushd build-arm-linux-gnueabi |
| 78 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/arm-linux-gnueabi.toolchain.cmake .. |
| 79 | make -j4 |
| 80 | make install |
| 81 | popd |
| 82 | |
| 83 | ##### linux of arm-linux-gnueabihf toolchain |
| 84 | mkdir -p build-arm-linux-gnueabihf |
| 85 | pushd build-arm-linux-gnueabihf |
| 86 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/arm-linux-gnueabihf.toolchain.cmake .. |
| 87 | make -j4 |
| 88 | make install |
| 89 | popd |
| 90 | |
| 91 | ##### linux of v831 toolchain with neon and openmp |
| 92 | mkdir -p build-v831-linux |
| 93 | pushd build-v831-linux |
| 94 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/v831.toolchain.cmake .. |
| 95 | make -j4 |
| 96 | make install |
| 97 | popd |
| 98 | |
| 99 | ##### linux for aarch64-linux-gnu toolchain |
| 100 | mkdir -p build-aarch64-linux-gnu |
| 101 | pushd build-aarch64-linux-gnu |
| 102 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/aarch64-linux-gnu.toolchain.cmake .. |
| 103 | make -j4 |
| 104 | make install |
| 105 | popd |
| 106 | |
| 107 | ##### linux host system with gcc/g++ |
| 108 | mkdir -p build-host-gcc-linux |
| 109 | pushd build-host-gcc-linux |
| 110 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/host.gcc.toolchain.cmake .. |
| 111 | make -j4 |
| 112 | make install |
| 113 | popd |
| 114 | |
| 115 | ##### MacOS |
| 116 | mkdir -p build-mac |
| 117 | pushd build-mac |
| 118 | cmake -DNCNN_OPENMP=OFF \ |
| 119 | -DNCNN_BENCHMARK=ON \ |
| 120 | .. |
| 121 | make -j8 |
| 122 | make install |
| 123 | popd |