Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=goldfish-qemu
  9. PKG_REV:=2b8ea29e2bd12f876a4d06647e6077bf72de567e
  10. PKG_VERSION:=20090429
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=git://android.git.kernel.org/platform/external/qemu
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_VERSION:=$(PKG_REV)
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_TARGETS:=bin
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/goldfish-qemu
  20. SECTION:=emulator
  21. CATEGORY:=Emulators
  22. DEPENDS:=@TARGET_goldfish
  23. TITLE:=A modified version of the Google Android Emulator
  24. URL:=http://www.android.com/
  25. endef
  26. LIBSDL_PATCHED:=sdl-1.2.12-android-20080919
  27. define Download/libsdl-patched
  28. FILE:=$(LIBSDL_PATCHED).tar.gz
  29. URL:=http://android.git.kernel.org/pub
  30. MD5SUM:=22df8cbb2ecb811938eba8410e861650
  31. endef
  32. $(eval $(call Download,libsdl-patched))
  33. Build/Exports=
  34. define Build/Prepare
  35. $(call Build/Prepare/Default)
  36. zcat $(DL_DIR)/$(LIBSDL_PATCHED).tar.gz | tar x -C $(PKG_BUILD_DIR)
  37. endef
  38. define Build/Configure
  39. [ -x $(PKG_BUILD_DIR)/libsdl/bin/sdl-config ] || ( \
  40. cd $(PKG_BUILD_DIR)/$(LIBSDL_PATCHED); \
  41. ./android-configure --prefix=$(PKG_BUILD_DIR)/libsdl; \
  42. make all install; \
  43. )
  44. endef
  45. define Build/Compile
  46. (cd $(PKG_BUILD_DIR); \
  47. [ -f $(PKG_BUILD_DIR)/objs/config.make ] || \
  48. ./android-configure.sh --sdl-config=$(PKG_BUILD_DIR)/libsdl/bin/sdl-config \
  49. )
  50. $(MAKE) -C $(PKG_BUILD_DIR)
  51. endef
  52. define Package/goldfish-qemu/install
  53. $(INSTALL_DIR) $(1)
  54. $(CP) $(PKG_BUILD_DIR)/objs/emulator $(1)/
  55. $(CP) ./skins $(1)/
  56. endef
  57. $(eval $(call BuildPackage,goldfish-qemu))