blob: 28429b126d4cf95e033ec92e30f61fc7b355d363 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# $NetBSD: buildlink.mk,v 1.4 2001/07/02 21:11:46 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
.include "../../mk/bsd.buildlink.mk"
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="${MOTIFLIB}"
LDFLAGS+= -Wl,-R${MOTIFBASE}/lib
.if defined(USE_BUILDLINK_X11)
MOTIFLIB?= -Wl,-R${MOTIFBASE}/lib -Wl,-R${X11BASE}/lib -L${BUILDLINK_DIR}/lib -lXm -lXp
.else
MOTIFLIB?= -Wl,-R${MOTIFBASE}/lib -Wl,-R${X11BASE}/lib -L${BUILDLINK_DIR}/lib -L${X11BASE}/lib -lXm -lXp
.endif
pre-configure: ${BUILDLINK_TARGETS.lesstif}
lesstif-buildlink: _BUILDLINK_USE
.endif # LESSTIF_BUILDLINK_MK
|