diff options
author | Kim Alvefur <zash@zash.se> | 2016-02-22 18:44:43 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-02-22 18:44:43 +0100 |
commit | ed8199402ff2a84e57f256818ebc2c505c2ac41d (patch) | |
tree | 212768ff3b1d64b64c32583515751108b54d7b31 /util-src/Makefile | |
parent | 11ebf4f1dc56644712e12e451e9b37c472c69238 (diff) | |
download | prosody-ed8199402ff2a84e57f256818ebc2c505c2ac41d.tar.gz prosody-ed8199402ff2a84e57f256818ebc2c505c2ac41d.zip |
util.crand: C binding to one of OpenSSL, Linux getrandom() or OpenBSD arc4random() CSPRNG
Diffstat (limited to 'util-src/Makefile')
-rw-r--r-- | util-src/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/util-src/Makefile b/util-src/Makefile index 85b190b9..9c6c377c 100644 --- a/util-src/Makefile +++ b/util-src/Makefile @@ -8,6 +8,10 @@ TARGET?=../util/ ALL=encodings.so hashes.so net.so pposix.so signal.so table.so ringbuffer.so +ifdef RANDOM +ALL+=crand.so +endif + .PHONY: all install clean .SUFFIXES: .c .o .so @@ -17,11 +21,14 @@ install: $(ALL) $(INSTALL_DATA) $^ $(TARGET) clean: - rm -f $(ALL) + rm -f $(ALL) $(patsubst %.so,%.o,$(ALL)) encodings.so: LDLIBS+=$(IDNA_LIBS) hashes.so: LDLIBS+=$(OPENSSL_LIBS) +crand.o: CFLAGS+=-DWITH_$(RANDOM) +crand.so: LDLIBS+=$(RANDOM_LIBS) + %.so: %.o $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) |