# Build Scripts

Scripts to build software libraries for various systems.

Libraries for Windows are built for static linking, for simple single-file EXE distribution.

Libraries for Web are built for static linking, as Emscripten does not yet support shared libraries.

# 1 Source Code

code.mathr.co.uk/build-scripts

git clone https://code.mathr.co.uk/build-scripts.git

# 2 Prerequisites

Tested on Debian Bookworm x86_64.

  • mingw-w64, wine, with i386 multiarch (for x86_64 and i686 builds for Windows, pre-installed in /usr/)

  • llvm-mingw (for aarch64 and armv7 builds for Windows, pre-installed in ${HOME}/opt/llvm-mingw/, with its bin in the PATH environment variable after /usr/bin)

  • emsdk (for emscripten builds for Web, installed automatically in ${HOME}/opt/src/emsdk)

  • a complete build of everything needs about 6GB of disk space

# 3 Usage

  • ./BUILD.sh download "lib ..." will download the source code for the libraries to ${HOME}/opt/src.

  • ./BUILD.sh arch "lib ..." will build the specified libraries for the specified architecture storing the results in ${HOME}/opt/windows/... and ${HOME}/opt/emscripten/...

Both commands default to all libraries if not specified.

# 4 Architectures:

  • x86_64-w64-mingw32 - Windows Intel 64bit
  • i686-w64-mingw32 - Windows Intel 32bit
  • aarch64-w64-mingw32 - Windows ARM 64bit
  • armv7-w64-mingw32 - Windows ARM 32bit
  • emscripten - Web (WASM, Javascript and HTML etc)

# 5 Libraries

These build scripts are kept up to date. More may be added.

  • clew - latest - git clone/update
  • deflate - 1.19
  • emsdk - latest - git clone/update
  • flite - latest - git clone/update
  • fftw3 - 3.3.10
  • glew - 2.2.0 - copies glew.c to include/GL, for compilation with -DGLEW_STATIC
  • glfw - 3.3.8 - not emscripten (suggest using sdl2 instead)
  • glm - 0.9.9.8
  • gmp - 6.3.0
  • imath - 3.1.9
  • mpc - 1.3.1 - depends on mpfr (and thus gmp)
  • mpfr - 4.2.1 - depends on gmp
  • mpreal - 3.7.0 - depends on mpfr (and thus gmp) - also known as mpfrc++
  • openexr3 - 3.2.1 - depends on imath and deflate
  • png - 1.6.40 - depends on zlib
  • sdl2 - 2.28.4 - emscripten has a built in version
  • toml11 - latest - git clone/update
  • zlib - 1.3

# 5.1 Old Libraries

These build scripts are no longer updated, but may still work if you need them.

  • openexr2 - 2.5.8 - depends on zlib, has a built in version of imath

# 6 Android

See:

code.mathr.co.uk/android-build-scripts

git clone https://code.mathr.co.uk/android-build-scripts.git