Root/package/goldfish-qemu/Makefile

1#
2# Copyright (C) 2006-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=goldfish-qemu
11PKG_REV:=2b8ea29e2bd12f876a4d06647e6077bf72de567e
12PKG_VERSION:=20090429
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=git://android.git.kernel.org/platform/external/qemu
17PKG_SOURCE_PROTO:=git
18PKG_SOURCE_VERSION:=$(PKG_REV)
19PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20PKG_TARGETS:=bin
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/goldfish-qemu
25  SECTION:=emulator
26  CATEGORY:=Emulators
27  DEPENDS:=@TARGET_goldfish
28  TITLE:=A modified version of the Google Android Emulator
29  URL:=http://www.android.com/
30endef
31
32LIBSDL_PATCHED:=sdl-1.2.12-android-20080919
33
34define Download/libsdl-patched
35  FILE:=$(LIBSDL_PATCHED).tar.gz
36  URL:=http://android.git.kernel.org/pub
37  MD5SUM:=22df8cbb2ecb811938eba8410e861650
38endef
39$(eval $(call Download,libsdl-patched))
40
41Build/Exports=
42
43define Build/Prepare
44    $(call Build/Prepare/Default)
45    zcat $(DL_DIR)/$(LIBSDL_PATCHED).tar.gz | tar x -C $(PKG_BUILD_DIR)
46endef
47
48define Build/Configure
49    [ -x $(PKG_BUILD_DIR)/libsdl/bin/sdl-config ] || ( \
50        cd $(PKG_BUILD_DIR)/$(LIBSDL_PATCHED); \
51        ./android-configure --prefix=$(PKG_BUILD_DIR)/libsdl; \
52        make all install; \
53    )
54endef
55
56define Build/Compile
57    (cd $(PKG_BUILD_DIR); \
58        [ -f $(PKG_BUILD_DIR)/objs/config.make ] || \
59            ./android-configure.sh --sdl-config=$(PKG_BUILD_DIR)/libsdl/bin/sdl-config \
60    )
61    $(MAKE) -C $(PKG_BUILD_DIR)
62endef
63
64define Package/goldfish-qemu/install
65    $(INSTALL_DIR) $(1)
66    $(CP) $(PKG_BUILD_DIR)/objs/emulator $(1)/
67    $(CP) ./skins $(1)/
68endef
69
70$(eval $(call BuildPackage,goldfish-qemu))
71

Archive Download this file



interactive