aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/Makefile
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-02-22 18:46:59 +0100
committerKim Alvefur <zash@zash.se>2016-02-22 18:46:59 +0100
commit9dd235d53bbb77efa67543e0057d093789ca2ddd (patch)
tree15d7151c2609ac821e0dd08e27f67795300b090d /util-src/Makefile
parentcccb4ab09be9573c02e0d2684e062363cd7eb068 (diff)
parented8199402ff2a84e57f256818ebc2c505c2ac41d (diff)
downloadprosody-9dd235d53bbb77efa67543e0057d093789ca2ddd.tar.gz
prosody-9dd235d53bbb77efa67543e0057d093789ca2ddd.zip
Merge 0.10->trunk
Diffstat (limited to 'util-src/Makefile')
-rw-r--r--util-src/Makefile9
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)