====== Building Spot ======
This is to build statically linked yet compact binaries for Spot tools for Linux, Windows and OSX.
===== Static binaries for Linux ====
./configure --disable-shared --disable-python --disable-devel --enable-optimizations --prefix ~/spot.linux
make LDFLAGS=-all-static
make install-strip
===== Static binaries for Windows using MinGW toolchain =====
MinGW GCC misses implementation for threads (at least for MinGW GCC v9.3.0). This results in error when building ''spot/bricks/brick-shmem'' which uses ''std::thread''. A workaround:
- Copy header files from [[https://github.com/meganz/mingw-std-threads|mingw-std-threads]] into ''spot/bricks/''
* Only these two header files are needed: ''mingw.invoke.h'' and ''mingw.thread.h''
* Local copy: {{/spot/mingw-std-threads-1.0.0.tar.gz}}
- In ''spot/bricks/brick-shmem'' replace ''%%#include %%'' by ''%%#include "mingw.thread.h"%%''
./configure --disable-shared --disable-python --disable-devel --enable-optimizations --host x86_64-w64-mingw32 --prefix ~/spot.windows
make LDFLAGS=-all-static
make install-strip
===== Static binaries for OSX ====
./configure --disable-shared --disable-python --disable-devel --enable-optimizations --prefix ~/spot.osx
make LDFLAGS="-all-static -static-libstdc++ -static-libgcc"
make install-strip