2016-04-14 23:59:08 +02:00
|
|
|
# $NetBSD: Makefile.common,v 1.14 2016/04/14 21:59:08 dholland Exp $
|
2014-10-05 18:41:05 +02:00
|
|
|
#
|
|
|
|
# used by lang/smlnj/Makefile
|
2003-03-21 23:54:38 +01:00
|
|
|
|
2015-01-04 09:57:36 +01:00
|
|
|
# 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.
|
2015-01-05 12:03:22 +01:00
|
|
|
ONLY_FOR_PLATFORM+= *-*-alpha *-*-hppa *-*-i386 \
|
2015-01-04 09:57:36 +01:00
|
|
|
*-*-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
|
2003-03-21 23:54:38 +01:00
|
|
|
|
2015-04-22 09:41:38 +02:00
|
|
|
# there are 32-on-64 hacks for amd64 on linux and netbsd
|
|
|
|
ONLY_FOR_PLATFORM+= Linux-*-x86_64 NetBSD-*-x86_64
|
|
|
|
|
2003-03-21 23:54:38 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
# Possible values of BOX and OS must be kept in sync with the
|
|
|
|
# currently ported platforms.
|
|
|
|
|
2009-12-15 07:35:29 +01:00
|
|
|
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD"
|
2003-03-21 23:54:38 +01:00
|
|
|
OS= bsd
|
2009-12-15 07:35:29 +01:00
|
|
|
.elif ${OPSYS} == "SunOS" || ${OPSYS} == "Linux"
|
|
|
|
OS= ${LOWER_OPSYS}
|
2003-03-21 23:54:38 +01:00
|
|
|
.endif
|
|
|
|
|
2008-04-13 00:42:57 +02:00
|
|
|
PLIST_VARS+= nlffi # not available on all platforms
|
2003-07-02 01:10:32 +02:00
|
|
|
|
2016-04-14 23:59:08 +02:00
|
|
|
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
|
2003-03-21 23:54:38 +01:00
|
|
|
BOX= x86
|
2008-04-13 00:42:57 +02:00
|
|
|
PLIST.nlffi= yes
|
2003-07-02 01:10:32 +02:00
|
|
|
.elif ${MACHINE_ARCH} == "powerpc"
|
|
|
|
BOX= ppc
|
2003-03-21 23:54:38 +01:00
|
|
|
.elif ${MACHINE_ARCH} == "sparc"
|
|
|
|
BOX= ${MACHINE_ARCH}
|
2008-04-13 00:42:57 +02:00
|
|
|
PLIST.nlffi= yes
|
2006-10-19 21:47:34 +02:00
|
|
|
.else
|
|
|
|
# for "make fetch", default to i386 instead of trying to download
|
|
|
|
# a non-existing file
|
|
|
|
BOX= x86
|
2008-04-13 00:42:57 +02:00
|
|
|
PLIST.nlffi= yes
|
2003-03-21 23:54:38 +01:00
|
|
|
.endif
|
|
|
|
|
2005-12-08 10:14:50 +01:00
|
|
|
PLIST_SUBST+= BOX=${BOX:Q} OS=${OS:Q} NLFFI=${NLFFI}
|