From e156c05ad42fdf522a3421ff98e5eb961ac6df41 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 31 Oct 2017 17:28:23 +0100 Subject: Rename Makefile -> GNUmakefile to reflect dependency on GNU Make --- util-src/GNUmakefile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 util-src/GNUmakefile (limited to 'util-src/GNUmakefile') 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) -- cgit v1.2.3