Skip to content

Instantly share code, notes, and snippets.

@xDShot
Created November 23, 2019 09:01
Show Gist options
  • Save xDShot/7f103e68ed8e28f4e9fed88c70daf474 to your computer and use it in GitHub Desktop.
Save xDShot/7f103e68ed8e28f4e9fed88c70daf474 to your computer and use it in GitHub Desktop.
Cross compile darkplaces on Linux for WIndows 64bit with mingw
export CFLAGS="-march=znver1 -O2 -pipe -fno-plt" # makefile doesn't really care
export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
export CC=x86_64-w64-mingw32-gcc
export WINDRES=x86_64-w64-mingw32-windres
export STRIP=x86_64-w64-mingw32-strip
export SDL_CONFIG=x86_64-w64-mingw32-sdl2-config
export DP_MAKE_TARGET=mingw
make $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment