#!/bin/bash

export CROSS_COMPILE=arm-openwrt-linux-muslgnueabi-
export CC=${CROSS_COMPILE}gcc
which -a "${CC}" >/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
	export OPENWRT_DIR=/home/jqye/work/openwrt_lora
	export CFLAGS="-Wall -march=armv7-a -mfpu=neon-vfpv4"
	export STAGING_DIR="${OPENWRT_DIR}/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl-1.1.16_eabi"
	export PATH="${OPENWRT_DIR}/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-5.4.0_musl-1.1.16_eabi/bin:${PATH}"
	unset OPENWRT_DIR
fi
