-
Notifications
You must be signed in to change notification settings - Fork 830
How to build
sudo apt-get install build-essential
sudo yum groupinstall 'Development Tools'
brew install gcc
pkg install lang/gcc49
ln -s /usr/local/bin/g++49 /usr/local/g++
install cygwin + gcc
or msys2+mingw-w32/mingw-w64
.
It cant be done in a single command, so you have to use google for help.
git clone https://github.com/wangyu-/UDPspeeder.git
cd UDPspeeder
make
make mac
make freebsd
make cygwin
make mingw
Currently, only targets for linux cross build are provided. If you want to cross build for windows/mac/bsd, you have to take a look at the makefile and help yourself.
find it on downloads.openwrt.org according to your openwrt version and cpu model.
for example, my tplink wdr4310 runs chaos_calmer 15.05,its with ar71xx cpu,download the following package.
http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2
unzip it to any dir,such as :/home/wangyu/OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2
cd into staging_dir ,toolchain-xxxxx ,bin .find the soft link with g++ suffix. in my case ,its mips-openwrt-linux-g++ ,check for its full path:
/home/wangyu/Desktop/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-g++
modify first line of makefile to:
cc_cross=/home/wangyu/Desktop/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-g++
run make cross
,the just generated speederv2_cross
is the binary,compile done. copy it to your router to run.
make cross
generates non-static binary. If you have any problem on running it,try to compile a static binary by using make cross2
or make cross3
.If your toolchain supports static compiling, usually one of them will succeed. The generated file is still named speederv2_cross
.