Software /
code /
prosody
Comparison
util-src/makefile @ 8593:c4222e36333c
Add makefiles compatible with BSD make
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 11 Mar 2018 06:01:19 +0100 |
child | 9165:2aaa9f3bb950 |
comparison
equal
deleted
inserted
replaced
8592:bd4f8a2b72c7 | 8593:c4222e36333c |
---|---|
1 include ../config.unix | |
2 | |
3 CFLAGS+=-I$(LUA_INCDIR) | |
4 | |
5 INSTALL_DATA=install -m644 | |
6 TARGET?=../util/ | |
7 | |
8 ALL=encodings.so hashes.so net.so pposix.so signal.so table.so ringbuffer.so | |
9 | |
10 .ifdef $(RANDOM) | |
11 ALL+=crand.so | |
12 .endif | |
13 | |
14 .PHONY: all install clean | |
15 .SUFFIXES: .c .o .so | |
16 | |
17 all: $(ALL) | |
18 | |
19 install: $(ALL) | |
20 $(INSTALL_DATA) $(ALL) $(TARGET) | |
21 | |
22 clean: | |
23 rm -f $(ALL) $(patsubst %.so,%.o,$(ALL)) | |
24 | |
25 encodings.so: encodings.o | |
26 $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS) $(IDNA_LIBS) | |
27 | |
28 hashes.so: hashes.o | |
29 $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS) $(OPENSSL_LIBS) | |
30 | |
31 crand.o: crand.c | |
32 $(CC) $(CFLAGS) -DWITH_$(RANDOM) -c -o $@ $< | |
33 | |
34 crand.so: crand.o | |
35 $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS) $(RANDOM_LIBS) | |
36 | |
37 %.so: %.o | |
38 $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS) | |
39 | |
40 .c.o: | |
41 $(CC) $(CFLAGS) -c -o $@ $< | |
42 | |
43 .o.so: | |
44 $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS) |