summaryrefslogtreecommitdiff
path: root/lang/smlnj/Makefile.common
blob: 7bb60c56bd7e690fec3cc5ab641eb98c3ddc4350 (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
# $NetBSD: Makefile.common,v 1.14 2016/04/14 21:59:08 dholland Exp $
#
# used by lang/smlnj/Makefile

# smlnj supports i386, hppa, sparc, ppc, mlrisc & alpha
# but this package only handles i386, ppc, and sparc.
# Extending this is left as an (easy) exercise for the reader.
ONLY_FOR_PLATFORM+=	*-*-alpha *-*-hppa *-*-i386 \
			*-*-mlrisc *-*-sparc *-*-powerpc
BROKEN_ON_PLATFORM=	*-*-alpha *-*-hppa *-*-mlrisc

# This package also only supports netbsd, freebsd, linux, and solaris.
# Making it work on other OSes shouldn't be all that hard.
BROKEN_EXCEPT_ON_PLATFORM+=	NetBSD-*-* FreeBSD-*-* Linux-*-* SunOS-*-*

# Furthermore, some OS/machine combinations aren't handled and might
# need hacking to work if enabled.
BROKEN_ON_PLATFORM+=	FreeBSD-*-sparc FreeBSD-*-powerpc
BROKEN_ON_PLATFORM+=	Linux-*-sparc Linux-*-powerpc
BROKEN_ON_PLATFORM+=	SunOS-*-i386 SunOS-*-powerpc

# there are 32-on-64 hacks for amd64 on linux and netbsd
ONLY_FOR_PLATFORM+=	Linux-*-x86_64 NetBSD-*-x86_64

.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" || ${MACHINE_ARCH} == "x86_64"
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}