aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/GNUmakefile
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-10-31 17:28:23 +0100
committerKim Alvefur <zash@zash.se>2017-10-31 17:28:23 +0100
commite156c05ad42fdf522a3421ff98e5eb961ac6df41 (patch)
tree5e449df964686e2fb0522e43831d1e1ade56023e /util-src/GNUmakefile
parent14b65a9175c53c637d03966c9172a9c5b96c5da4 (diff)
downloadprosody-e156c05ad42fdf522a3421ff98e5eb961ac6df41.tar.gz
prosody-e156c05ad42fdf522a3421ff98e5eb961ac6df41.zip
Rename Makefile -> GNUmakefile to reflect dependency on GNU Make
Diffstat (limited to 'util-src/GNUmakefile')
-rw-r--r--util-src/GNUmakefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/util-src/GNUmakefile b/util-src/GNUmakefile
new file mode 100644
index 00000000..4b8540c5
--- /dev/null
+++ b/util-src/GNUmakefile
@@ -0,0 +1,34 @@
+
+include ../config.unix
+
+CFLAGS+=-I$(LUA_INCDIR)
+
+INSTALL_DATA=install -m644
+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
+
+all: $(ALL)
+
+install: $(ALL)
+ $(INSTALL_DATA) $? $(TARGET)
+
+clean:
+ 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)