build_fpga.sh 724 字节
Newer Older
Y
Yan Chunwei 已提交
1 2 3 4 5
#!/bin/bash

build_dir=build_fpga
mkdir -p ${build_dir}

T
tienfeek 已提交
6 7 8 9 10 11 12
root_dir=$(pwd)
build_dir=${build_dir}
# in build directory
# 1. Prepare gen_code file
GEN_CODE_PATH_PREFIX=${build_dir}/lite/gen_code
mkdir -p ${GEN_CODE_PATH_PREFIX}
touch ${GEN_CODE_PATH_PREFIX}/__generated_code__.cc
Y
Yan Chunwei 已提交
13

T
tienfeek 已提交
14
cd ${build_dir}
Y
Yan Chunwei 已提交
15 16 17 18 19 20 21 22 23 24
cmake .. \
        -DWITH_GPU=OFF \
        -DWITH_MKL=OFF \
        -DWITH_LITE=ON \
        -DLITE_WITH_CUDA=OFF \
        -DLITE_WITH_X86=OFF \
        -DLITE_WITH_ARM=ON \
        -DLITE_WITH_FPGA=ON \
        -DLITE_WITH_OPENMP=ON \
        -DLITE_WITH_LIGHT_WEIGHT_FRAMEWORK=ON \
25
        -DWITH_TESTING=OFF \
T
tienfeek 已提交
26 27 28
        -DARM_TARGET_OS=armlinux \
        -DLITE_BUILD_EXTRA=ON \
        -DLITE_WITH_PROFILE=OFF
Y
Yan Chunwei 已提交
29

T
tienfeek 已提交
30
make -j42
Y
Yan Chunwei 已提交
31
cd -