summaryrefslogtreecommitdiff
path: root/lang/smlnj/Makefile.common
blob: 00c9cdf94a92eeca6867916aab60b31660efa6dd (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
# $NetBSD: Makefile.common,v 1.10 2014/10/05 16:41:07 wiz Exp $
#
# used by lang/smlnj/Makefile
# used by lang/twelf/Makefile

# smlnj also supports hppa, sparc, ppc, mlrisc & alpha
# pkg support for those platforms, and say, solaris-x86
# is left as an (easy) exercise for the reader.
ONLY_FOR_PLATFORM=	NetBSD-*-i386 NetBSD-*-sparc NetBSD-*-powerpc \
			FreeBSD-*-i386 Linux-*-i386 SunOS-*-sparc

.include "../../mk/bsd.prefs.mk"

# Possible values of BOX and OS must be kept in sync with the
# currently ported platforms.

.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD"
OS=		bsd
.elif ${OPSYS} == "SunOS" || ${OPSYS} == "Linux"
OS=		${LOWER_OPSYS}
.endif

PLIST_VARS+=	nlffi		# not available on all platforms

.if ${MACHINE_ARCH} == "i386"
BOX=		x86
PLIST.nlffi=	yes
.elif ${MACHINE_ARCH} == "powerpc"
BOX=		ppc
.elif ${MACHINE_ARCH} == "sparc"
BOX=		${MACHINE_ARCH}
PLIST.nlffi=	yes
.else
# for "make fetch", default to i386 instead of trying to download
# a non-existing file
BOX=		x86
PLIST.nlffi=	yes
.endif

PLIST_SUBST+=	BOX=${BOX:Q} OS=${OS:Q} NLFFI=${NLFFI}