참고: https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md
리눅스 빌드와 별개의 폴더를 만들어야함. HOST 설정때문에 리눅스 빌드가 안나옴
cd && \
git clone https://github.com/bitcoin/bitcoin.git && \
\
sudo apt install \
build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git g++-mingw-w64-x86-64 && \
sudo update-alternatives --set \
x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix && \
\
cd bitcoin/depends && \
make HOST=x86_64-w64-mingw32 -j$(grep -c ^processor /proc/cpuinfo) && \
cd .. && \
\
make clean &&
./autogen.sh && \
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure && \
make -j$(grep -c ^processor /proc/cpuinfo) && \
find src -name "*.exe" -exec x86_64-w64-mingw32-strip {} + && \
find src -name "*.exe"
cd && \
git clone https://github.com/bitcoin/bitcoin.git && \
\
sudo apt-get install g++-mingw-w64-i686 mingw-w64-i686-dev && \
sudo update-alternatives --config i686-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix. && \
\
PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g') # strip out problematic Windows %PATH% imported var && \
\
cd depends && \
make HOST=i686-w64-mingw32 && \
\
cd .. && \
./autogen.sh # not required when building from tarball && \
CONFIG_SITE=$PWD/depends/i686-w64-mingw32/share/config.site ./configure --prefix=/ && \
make -j4 && \
\
find src -name "*.exe" -exec i686-w64-mingw32-strip {} + && \
find src -name "*.exe"
find src -name "*.exe" -exec cp {} ../ \;