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
commitdf4e8ebbef9d666147de9820cc8d08ac031c60bf (patch)
tree5e449df964686e2fb0522e43831d1e1ade56023e /util-src/GNUmakefile
parentc4d543f80622efd5bb58254c9e4d4e09f3a03b97 (diff)
downloadprosody-df4e8ebbef9d666147de9820cc8d08ac031c60bf.tar.gz
prosody-df4e8ebbef9d666147de9820cc8d08ac031c60bf.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)