diff options
-rw-r--r-- | x11/lesstif/buildlink.mk | 72 | ||||
-rw-r--r-- | x11/lesstif12/buildlink.mk | 79 |
2 files changed, 151 insertions, 0 deletions
diff --git a/x11/lesstif/buildlink.mk b/x11/lesstif/buildlink.mk new file mode 100644 index 00000000000..147193a6b71 --- /dev/null +++ b/x11/lesstif/buildlink.mk @@ -0,0 +1,72 @@ +# $NetBSD: buildlink.mk,v 1.1 2001/06/30 21:09:29 jlam Exp $ +# +# This Makefile fragment is included by packages that use lesstif. +# +# To use this Makefile fragment, simply: +# +# (1) Optionally define BUILDLINK_DEPENDS.lesstif to the dependency pattern +# for the version of lesstif desired. +# (2) Include this Makefile fragment in the package Makefile, +# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header +# search path, and +# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search +# path. + +.if !defined(LESSTIF_BUILDLINK_MK) +LESSTIF_BUILDLINK_MK= # defined + +BUILDLINK_DEPENDS.lesstif?= lesstif>=0.91.4 + +.include "../../mk/bsd.prefs.mk" + +# On Solaris, assume that /usr/dt contains a valid Motif 2.0-compatible +# installation. +# +.if ${OPSYS} == "SunOS" +_NEED_LESSTIF= NO +.else +.if exists(${X11BASE}/include/Xm/Xm.h) +_IS_LESSTIF!= ${EGREP} -c LESSTIF ${X11BASE}/include/Xm/Xm.h || ${TRUE} +.if ${_IS_LESSTIF} == "0" +_NEED_LESSTIF= NO +.else +_NEED_LESSTIF= YES +.endif +.else +_NEED_LESSTIF= YES +.endif +.endif + +.if ${_NEED_LESSTIF} == "YES" +MOTIFBASE?= ${X11PREFIX} +DEPENDS+= ${BUILDLINK_DEPENDS.lesstif}:../../x11/lesstif +.else +.if ${OPSYS} == "SunOS" +MOTIFBASE?= /usr/dt +.else +MOTIFBASE?= ${X11BASE} +.endif +.endif + +BUILDLINK_PREFIX.lesstif= ${X11PREFIX} +BUILDLINK_FILES.lesstif= include/Mrm/* +BUILDLINK_FILES.lesstif+= include/Xm/* +BUILDLINK_FILES.lesstif+= include/uil/* +BUILDLINK_FILES.lesstif+= lib/libMrm.* +BUILDLINK_FILES.lesstif+= lib/libUil.* +BUILDLINK_FILES.lesstif+= lib/libXm.* + +BUILDLINK_TARGETS.lesstif= lesstif-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.lesstif} + +USE_X11= # defined +MAKE_ENV+= MOTIFLIB="${MOTIFILIB}" +LDFLAGS+= -Wl,-R${MOTIFBASE}/lib +MOTIFLIB?= -Wl,-R${MOTIFBASE}/lib -Wl,-R${X11BASE}/lib -L${BUILDLINK_DIR}/lib -L${X11BASE}/lib -lXm -lXp + +pre-configure: ${BUILDLINK_TARGETS.lesstif} +lesstif-buildlink: _BUILDLINK_USE + +.include "../../mk/bsd.buildlink.mk" + +.endif # LESSTIF_BUILDLINK_MK diff --git a/x11/lesstif12/buildlink.mk b/x11/lesstif12/buildlink.mk new file mode 100644 index 00000000000..d3381e09347 --- /dev/null +++ b/x11/lesstif12/buildlink.mk @@ -0,0 +1,79 @@ +# $NetBSD: buildlink.mk,v 1.1 2001/06/30 21:09:29 jlam Exp $ +# +# This Makefile fragment is included by packages that use lesstif12. +# +# To use this Makefile fragment, simply: +# +# (1) Optionally define BUILDLINK_DEPENDS.lesstif12 to the dependency pattern +# for the version of lesstif12 desired. +# (2) Include this Makefile fragment in the package Makefile, +# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header +# search path, and +# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search +# path. + +.if !defined(LESSTIF12_BUILDLINK_MK) +LESSTIF12_BUILDLINK_MK= # defined + +BUILDLINK_DEPENDS.lesstif12?= lesstif12>=0.91.4 + +.include "../../mk/bsd.prefs.mk" + +# On Solaris, assume that /usr/dt contains a valid Motif 1.2-compatible +# installation. Otherwise, check to see if <Xm/Gadget.h> is installed. +# If it is, then this is a Motif 2.0-compatible installation, so we need +# lesstif12. +# +.if ${OPSYS} == "SunOS" +_NEED_LESSTIF12= NO +.else +.if exists(${X11BASE}/include/Xm/Xm.h) +.if exists(${X11BASE}/include/Xm/Gadget.h) +_NEED_LESSTIF12= YES +.else +_IS_LESSTIF!= ${EGREP} -c LESSTIF ${X11BASE}/include/Xm/Xm.h || ${TRUE} +.if ${_IS_LESSTIF} == "0" +_NEED_LESSTIF12= NO +.else +_NEED_LESSTIF12= YES +.endif +.endif +.else +_NEED_LESSTIF12= YES +.endif +.endif + +.if ${_NEED_LESSTIF12} == "YES" +MOTIFBASE?= ${X11PREFIX}/LessTif/Motif1.2 +DEPENDS+= ${BUILDLINK_DEPENDS.lesstif12}:../../x11/lesstif12 +.else +.if ${OPSYS} == "SunOS" +MOTIFBASE?= /usr/dt +.else +MOTIFBASE?= ${X11BASE} +.endif +.endif + +BUILDLINK_PREFIX.lesstif12= ${MOTIFBASE} +BUILDLINK_FILES.lesstif12= include/Mrm/* +BUILDLINK_FILES.lesstif12+= include/Xm/* +BUILDLINK_FILES.lesstif12+= include/Xm/* +BUILDLINK_FILES.lesstif12+= include/uil/* +BUILDLINK_FILES.lesstif12+= lib/libMrm.* +BUILDLINK_FILES.lesstif12+= lib/libUil.* +BUILDLINK_FILES.lesstif12+= lib/libXm.* + +BUILDLINK_TARGETS.lesstif12= lesstif12-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.lesstif12} + +USE_X11= # defined +MAKE_ENV+= MOTIFLIB="${MOTIFILIB}" +LDFLAGS+= -Wl,-R${MOTIFBASE}/lib +MOTIFLIB?= -Wl,-R${MOTIFBASE}/lib -Wl,-R${X11BASE}/lib -L${BUILDLINK_DIR}/lib -L${X11BASE}/lib -lXm -lXp + +pre-configure: ${BUILDLINK_TARGETS.lesstif12} +lesstif12-buildlink: _BUILDLINK_USE + +.include "../../mk/bsd.buildlink.mk" + +.endif # LESSTIF12_BUILDLINK_MK |