update Wed Jan 20 06:37:00 PST 2010
[pkgsrc.git] / emulators / compat15 / emulator.mk
1 # $NetBSD: emulator.mk,v 1.1 2007/08/21 22:49:13 jlam Exp $
2 #
3 # This file is included by netbsd-compat.mk in the emulator framework.
4 #
5 # Variables set by this file:
6 #
7 # EMUL_DISTRO
8 #       The NetBSD distribution used to provide the files.
9 #
10 # EMUL_EXEC_FMT
11 #       The executable format of the emulated operating system.
12 #
13 # EMULSUBDIR
14 #       Path relative to ${PREFIX} where the files and directories are
15 #       located, e.g. emul/aout.
16 #
17 # DEPENDS_${EMUL_DISTRO}.*
18 #       A table that maps "modules" to NetBSD package dependencies.
19 #
20
21 EMUL_DISTRO=            netbsd-1.5
22
23 # arm, m68k and vax switched from a.out to ELF post-1.5.
24 # ns32k never switched from a.out.
25 #
26 .if (${EMUL_ARCH} == "arm") || (${EMUL_ARCH} == "m68k") || \
27     (${EMUL_ARCH} == "ns32k") || (${EMUL_ARCH} == "vax")
28 EMUL_EXEC_FMT=          a.out
29 .else
30 EMUL_EXEC_FMT=          ELF
31 .endif
32
33 .if (${NATIVE_EXEC_FMT} == "ELF") && (${EMUL_EXEC_FMT} == "a.out")
34 EMULSUBDIR=             emul/aout
35 OPSYS_EMULDIR=          ${_OPSYS_EMULDIR.aout}
36 .else
37 EMULSUBDIR=             emul/netbsd
38 OPSYS_EMULDIR=          ${_OPSYS_EMULDIR.netbsd}
39 .endif
40
41 # For COMPAT_NETBSD32, we always need the dependency to supply 32-bit
42 # shared libaries for NetBSD-1.5.
43 #
44 .if ((${EMUL_ARCH} == "i386") && (${MACHINE_ARCH} == "x86_64")) || \
45     ((${EMUL_ARCH} == "sparc") && (${MACHINE_ARCH} == "sparc64"))
46 EMULSUBDIR=             emul/netbsd32
47 OPSYS_EMULDIR=          ${_OPSYS_EMULDIR.netbsd32}
48
49 DEPENDS_netbsd-1.5.base?=       netbsd32_compat15>=1.5:../../emulators/netbsd32_compat15
50 #
51 # We need to depend on the compat15 package to supply missing shared
52 # libraries only on NetBSD>1.5.
53 #
54 .elif empty(OS_VERSION:M0.[0-9]*) && empty(OS_VERSION:M1.[0-4]*) && \
55       empty(OS_VERSION:M1.5) && empty(OS_VERSION:M1.5.*)
56 DEPENDS_netbsd-1.5.base?=       compat15>=1.5:../../emulators/compat15
57 .endif