diff --git a/Makefile b/Makefile index ffc65a7..b843257 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,9 @@ CFLAGS ?= -std=c11 -O2 -Wall -fstack-protector-strong FLAGS := $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) FLAGS += -DPACKAGE_NAME=\"$(NAME)\" -DPACKAGE_VERSION=\"$(VERSION)\" +FLAGS += -Ilibsodium-stable/src/libsodium/include +FLAGS += -Llibsodium-stable/src/libsodium/.libs + SRC := argz/argz.c mud/mud.c $(wildcard src/*.c) .PHONY: $(NAME) diff --git a/sodium.sh b/sodium.sh new file mode 100755 index 0000000..7d7e191 --- /dev/null +++ b/sodium.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +file=LATEST.tar.gz +url=https://download.libsodium.org/libsodium/releases + +[ -f "$file" ] || wget -q "$url/$file" -O "$file" +[ -f "$file" ] || curl -SsfLO "$url/$file" +[ -f "$file" ] || { + echo "Couldn't download $url/$file" + exit 1 +} + +rm -rf libsodium-stable +tar zxf "$file" +cd libsodium-stable || exit 1 + +./configure --enable-minimal --disable-dependency-tracking --enable-static --disable-shared +make -j