Skip to content

Instantly share code, notes, and snippets.

@artynet
Last active February 25, 2019 09:24
Show Gist options
  • Save artynet/ddc230eb8712f21075d8e59f9f099fdd to your computer and use it in GitHub Desktop.
Save artynet/ddc230eb8712f21075d8e59f9f099fdd to your computer and use it in GitHub Desktop.
Build CUrl as a single static EXE
#!/bin/bash -x
### Build CURL as static binary ###
./configure --prefix=$HOME/.local \
--with-libmetalink \
--with-nghttp2 \
--disable-shared \
--enable-static \
--with-libssh2 \
--with-gssapi \
--with-libidn2
# To then make the curl tool linked with everything static, we do this:
make -j2
rm src/curl
make LDFLAGS=-all-static
# for ubuntu x64
# LDFLAGS="-all-static -L/usr/lib/x86_64-linux-gnu" make
# make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment