summaryrefslogtreecommitdiff
path: root/devel/cdk/buildlink.mk
diff options
context:
space:
mode:
Diffstat (limited to 'devel/cdk/buildlink.mk')
-rw-r--r--devel/cdk/buildlink.mk45
1 files changed, 45 insertions, 0 deletions
diff --git a/devel/cdk/buildlink.mk b/devel/cdk/buildlink.mk
new file mode 100644
index 00000000000..f5ac17e3101
--- /dev/null
+++ b/devel/cdk/buildlink.mk
@@ -0,0 +1,45 @@
+# $NetBSD: buildlink.mk,v 1.1 2002/02/07 15:26:36 jlam Exp $
+#
+# This Makefile fragment is included by packages that use cdk.
+#
+# To use this Makefile fragment, simply:
+#
+# (1) Optionally define USE_CDK to force use of cdk.
+# (2) Optionally define BUILDLINK_DEPENDS.cdk to the dependency pattern
+# for the version of cdk desired.
+
+.if !defined(CDK_BUILDLINK_MK)
+CDK_BUILDLINK_MK= # defined
+
+.include "../../mk/bsd.buildlink.mk"
+
+BUILDLINK_DEPENDS.cdk?= cdk>=4.9.6
+
+.if defined(USE_CDK)
+_NEED_CDK= YES
+.elif exists(/usr/include/cdk/cdk.h)
+_NEED_CDK= NO
+.else
+_NEED_CDK= YES
+.endif
+
+.if ${_NEED_CDK} == "YES"
+EVAL_PREFIX+= BUILDLINK_PREFIX.cdk=cdk
+BUILDLINK_PREFIX.cdk_DEFAULT= ${LOCALBASE}
+DEPENDS+= ${BUILDLINK_DEPENDS.cdk}:../../devel/cdk
+.else
+BUILDLINK_PREFIX.cdk= /usr
+.endif
+
+BUILDLINK_FILES.cdk= include/cdk/*.h
+BUILDLINK_FILES.cdk+= lib/libcdk.*
+
+.include "../../devel/ncurses/buildlink.mk"
+
+BUILDLINK_TARGETS.cdk+= cdk-buildlink
+BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.cdk}
+
+pre-configure: ${BUILDLINK_TARGETS.cdk}
+cdk-buildlink: _BUILDLINK_USE
+
+.endif # CDK_BUILDLINK_MK