Remove building with NOCRYPTO option
[minix.git] / external / bsd / kyua-cli / Makefile.inc
blob37eefb8b48ac91a9db7b59701ea18e6541c651be
1 # $NetBSD: Makefile.inc,v 1.4 2014/07/05 19:22:41 dholland Exp $
3 .include <bsd.own.mk>
5 TOPDIR=         ${NETBSDSRCDIR}/external/bsd/kyua-cli
6 SRCDIR=         ${TOPDIR}/dist
8 # Name of the private libraries (without their lib prefix) to depend on.
9 KYUA_LIBS?=
11 # Layout of installed files.
12 KYUA_BINDIR=            /usr/bin
13 KYUA_CONFDIR=           /etc/kyua
14 KYUA_DOCDIR=            /usr/share/doc/reference/ref1/kyua/kyua-cli
15 KYUA_EXAMPLESDIR=       /usr/share/examples/kyua-cli
16 KYUA_MISCDIR=           /usr/share/kyua-cli/misc
17 KYUA_STOREDIR=          /usr/share/kyua-cli/store
18 KYUA_TESTERSDIR=        /usr/libexec
19 KYUA_TESTSDIR=          ${TESTSBASE}
21 KYUA_TARNAME!=  grep 'define PACKAGE_TARNAME' ${TOPDIR}/config.h \
22                 | cut -d '"' -f 2
23 cookie-tarname: cookie-tarname-2
24         @cmp -s cookie-tarname cookie-tarname-2 \
25             || cp cookie-tarname-2 cookie-tarname
26 cookie-tarname-2: .PHONY
27         @echo "${KYUA_TARNAME}" >cookie-tarname-2
28 CLEANFILES+=    cookie-tarname cookie-tarname-2
29         
30 KYUA_VERSION!=  grep 'define VERSION' ${TOPDIR}/config.h | cut -d '"' -f 2
31 cookie-version: cookie-version-2
32         @cmp -s cookie-version cookie-version-2 \
33             || cp cookie-version-2 cookie-version
34 cookie-version-2: .PHONY
35         @echo "${KYUA_VERSION}" >cookie-version-2
36 CLEANFILES+=    cookie-version cookie-version-2
38 CPPFLAGS+=      -DHAVE_CONFIG_H
40 # Not all source files need these settings, but it's just easier to
41 # set them in all cases.
42 CPPFLAGS+=      -DKYUA_CONFDIR=\"${KYUA_CONFDIR}\"
43 CPPFLAGS+=      -DKYUA_DOCDIR=\"${KYUA_DOCDIR}\"
44 CPPFLAGS+=      -DKYUA_EXAMPLESDIR=\"${KYUA_EXAMPLESDIR}\"
45 CPPFLAGS+=      -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\"
46 CPPFLAGS+=      -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\"
47 CPPFLAGS+=      -DKYUA_TESTERSDIR=\"${KYUA_TESTERSDIR}\"
48 CPPFLAGS+=      -DKYUA_TESTSDIR=\"${KYUA_TESTSDIR}\"
50 CPPFLAGS+=      -I${TOPDIR}             # For config.h.
51 CPPFLAGS+=      -I${TOPDIR}/lib         # For utils/defs.hpp.
52 CPPFLAGS+=      -I${SRCDIR}
54 .for lib in ${KYUA_LIBS}
55 LIBOBJDIR_${lib}!=      cd ${TOPDIR}/lib/${lib}; ${PRINTOBJDIR}
56 LDADD+=                 ${LIBOBJDIR_${lib}}/lib${lib}.a
57 DPADD+=                 ${LIBOBJDIR_${lib}}/lib${lib}.a
58 .endfor
60 .if !empty(KYUA_LIBS:Mutils)
61 LDADD+=         -llutok -lsqlite3
62 DPADD+=         ${LIBLUTOK} ${LIBSQLITE}
63 .endif
65 .if defined(__MINIX)
66 LDADD+=         -llua
67 DPADD+=         ${LIBLUA}
68 .endif # defined(__MINIX)
70 MANPAGE_DEPS = cookie-tarname cookie-version
71 BUILD_MANPAGE = \
72         sed -e 's,__CONFDIR__,${KYUA_CONFDIR},g' \
73             -e 's,__DOCDIR__,${KYUA_DOCDIR},g' \
74             -e 's,__EGDIR__,${KYUA_EXAMPLESDIR},g' \
75             -e 's,__MISCDIR__,${KYUA_MISCDIR},g' \
76             -e 's,__PACKAGE__,${KYUA_TARNAME},g' \
77             -e 's,__STOREDIR__,${KYUA_STOREDIR},g' \
78             -e 's,__TESTERSDIR__,${KYUA_TESTERSDIR},g' \
79             -e 's,__TESTSDIR__,${KYUA_TESTSDIR},g' \
80             -e 's,__VERSION__,${KYUA_VERSION},g' \
81             <${SRCDIR}/doc/$${name}.in >$${name}.tmp; \
82         mv $${name}.tmp $${name}