Add static linking option

main
cel 5 years ago
parent e1e1c56a06
commit d606935df4

@ -1,5 +1,4 @@
BIN = sbotc
LDLIBS = -lsodium
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
@ -7,6 +6,12 @@ MANDIR = $(PREFIX)/share/man
CFLAGS = -Wall -Werror -Wextra
ifdef STATIC
LDLIBS = -l:libsodium.a
else
LDLIBS = -lsodium
endif
all: $(BIN)
$(BIN): $(BIN).c base64.c jsmn.c

@ -13,6 +13,10 @@ make
sudo make install
```
## Compile options
To build a binary statically linked with libsodium, use `make STATIC=1`
## Usage
```sh

Loading…
Cancel
Save