summaryrefslogtreecommitdiffstats
path: root/package/qemu/qemu.mk
blob: de72e045b6f1734334d9a5562b1bfd17c4cc3d61 (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
77
78
79
80
81
82
#############################################################
#
# qemu
#
#############################################################

QEMU_VERSION = 1.2.0
QEMU_SOURCE = qemu-$(QEMU_VERSION).tar.bz2
QEMU_SITE = http://wiki.qemu.org/download

#       BR ARCH         qemu
#       -------         ----
#       arm             arm
#       armeb           armeb
#       avr32           not supported
#       bfin            not supported
#       i386            i386
#       i486            i386
#       i586            i386
#       i686            i386
#       x86_64          x86_64
#       m68k            m68k
#       microblaze      microblaze
#       mips            mips
#       mipsel          mipsel
#       mips64          ?
#       mips64el        ?
#       powerpc         ppc
#       sh2             not supported
#       sh2a            not supported
#       sh3             not supported
#       sh3eb           not supported
#       sh4             sh4
#       sh4eb           sh4eb
#       sh4a            ?
#       sh4aeb          ?
#       sh64            not supported
#       sparc           sparc

QEMU_ARCH = $(ARCH)
ifeq ($(QEMU_ARCH),i486)
    QEMU_ARCH = i386
endif
ifeq ($(QEMU_ARCH),i586)
    QEMU_ARCH = i386
endif
ifeq ($(QEMU_ARCH),i686)
    QEMU_ARCH = i386
endif
ifeq ($(QEMU_ARCH),powerpc)
    QEMU_ARCH = ppc
endif
HOST_QEMU_TARGETS=$(QEMU_ARCH)-linux-user

define HOST_QEMU_CONFIGURE_CMDS
	(cd $(@D); ./configure                          \
		--target-list="$(HOST_QEMU_TARGETS)"    \
		--prefix="$(HOST_DIR)/usr"              \
		--interp-prefix=$(STAGING_DIR)          \
		--cc="$(HOSTCC)"                        \
		--host-cc="$(HOSTCC)"                   \
		--extra-cflags="$(HOST_CFLAGS)"         \
		--extra-ldflags="$(HOST_LDFLAGS)"       \
	)
endef

define HOST_QEMU_BUILD_CMDS
	$(MAKE) -C $(@D) all
endef

define HOST_QEMU_INSTALL_CMDS
	$(MAKE) -C $(@D) install
endef

define HOST_QEMU_CLEAN_CMDS
	$(MAKE) -C $(@D) clean
endef

$(eval $(host-generic-package))

# variable used by other packages
QEMU_USER = $(HOST_DIR)/usr/bin/qemu-$(QEMU_ARCH)