jcs's openbsd hax
openbsd
1# $OpenBSD: Makefile,v 1.4 2020/10/26 15:57:03 deraadt Exp $
2
3LIB= agentx
4
5SRCS= ax.c agentx.c agentx_log.c
6HDRS= agentx.h
7MAN= agentx.3
8
9CFLAGS+= -Wall
10CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes
11CFLAGS+= -Wmissing-declarations
12CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual
13CFLAGS+= -Wsign-compare
14
15CLEANFILES= ${VERSION_SCRIPT}
16
17VERSION_SCRIPT= Symbols.map
18SYMBOL_LIST= ${.CURDIR}/Symbols.list
19
20includes:
21 @cd ${.CURDIR}; for i in $(HDRS); do \
22 j="cmp -s $$i ${DESTDIR}/usr/include/$$i || \
23 ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \
24 -m 444 $$i ${DESTDIR}/usr/include"; \
25 echo $$j; \
26 eval "$$j"; \
27 done
28
29${VERSION_SCRIPT}: ${SYMBOL_LIST}
30 { printf '{\n\tglobal:\n'; \
31 sed '/^[._a-zA-Z]/s/$$/;/; s/^/ /' ${SYMBOL_LIST}; \
32 printf '\n\tlocal:\n\t\t*;\n};\n'; } >$@.tmp && mv $@.tmp $@
33
34.include <bsd.lib.mk>