Comparison

util-src/GNUmakefile @ 8592:bd4f8a2b72c7

Rename Makefile -> GNUmakefile to reflect dependency on GNU Make
author Kim Alvefur <zash@zash.se>
date Tue, 31 Oct 2017 17:28:23 +0100
parent 7615:util-src/Makefile@940603e99032
child 9162:8ad1fe9d26d4
comparison
equal deleted inserted replaced
8591:0c322389f994 8592:bd4f8a2b72c7
1
2 include ../config.unix
3
4 CFLAGS+=-I$(LUA_INCDIR)
5
6 INSTALL_DATA=install -m644
7 TARGET?=../util/
8
9 ALL=encodings.so hashes.so net.so pposix.so signal.so table.so ringbuffer.so
10
11 ifdef RANDOM
12 ALL+=crand.so
13 endif
14
15 .PHONY: all install clean
16 .SUFFIXES: .c .o .so
17
18 all: $(ALL)
19
20 install: $(ALL)
21 $(INSTALL_DATA) $? $(TARGET)
22
23 clean:
24 rm -f $(ALL) $(patsubst %.so,%.o,$(ALL))
25
26 encodings.so: LDLIBS+=$(IDNA_LIBS)
27
28 hashes.so: LDLIBS+=$(OPENSSL_LIBS)
29
30 crand.o: CFLAGS+=-DWITH_$(RANDOM)
31 crand.so: LDLIBS+=$(RANDOM_LIBS)
32
33 %.so: %.o
34 $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)