make getpeername() return the original socket address which before it was intercepted
[hband-tools.git] / preload / autossl / Makefile
blobb69dbf9fbcfcb55675ae4a3c29427e7cff08a16b
2 autossl.so: autossl.c
3 gcc $(CCFLAGS) $< -D_GNU_SOURCE -ldl -lbsd -shared -fPIC -o $@
4 chmod -x $@
6 install: /usr/tool/autossl /usr/tool/autossl-conn /usr/lib/tool/preload/autossl.so manpages
7 .PHONY: install
9 autossl autossl-conn autossl.pod autossl.so.pod:
10 @true
12 /usr/tool/autossl: autossl
13 install $< $@
15 /usr/tool/autossl-conn: autossl-conn
16 install $< $@
18 /usr/lib/tool/preload/autossl.so: autossl.so | /usr/lib/tool/preload
19 install $< $@
21 /usr/lib/tool/preload:
22 mkdir -p $@
24 manpages: /usr/share/man/man1/autossl.1.xz /usr/share/man/man8/autossl.so.8.xz
25 /etc/cron.daily/man-db
26 .PHONY: manpages
28 /usr/share/man/man1/autossl.1.xz: autossl.pod
29 pod2man --name=autossl --section 1 --utf8 $< | xz > $@.tmp && \
30 mv $@.tmp $@
32 /usr/share/man/man8/autossl.so.8.xz: autossl.so.pod
33 pod2man --name=autossl.so --section 8 --utf8 $< | xz > $@.tmp && \
34 mv $@.tmp $@
36 define rid
37 @[ ! -e $(1) ] || rm -v $(1)
38 endef
40 uninstall:
41 $(call rid,/usr/tool/autossl)
42 $(call rid,/usr/tool/autossl-conn)
43 $(call rid,/usr/lib/tool/preload/autossl.so)
44 $(call rid,/usr/share/man/man1/autossl.1.xz.tmp)
45 $(call rid,/usr/share/man/man1/autossl.1.xz)
46 $(call rid,/usr/share/man/man8/autossl.so.8.xz.tmp)
47 $(call rid,/usr/share/man/man8/autossl.so.8.xz)
48 .PHONY: uninstall