Makefile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. PKG_NAME:= qemu
  5. PKG_VERSION:= 2.0.0
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 2790f44fd76da5de5024b4aafeb594c2
  8. PKG_DESCR:= cpu and system emulator
  9. PKG_SECTION:= sys/misc
  10. PKG_DEPENDS:= zlib glib
  11. PKG_BUILDDEP:= gettext-tiny
  12. PKG_BUILDDEP+= zlib glib
  13. HOST_BUILDDEP:= glib-host
  14. PKG_URL:= http://wwww.qemu.org/
  15. PKG_SITES:= http://wiki.qemu.org/download/
  16. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
  17. PKG_ARCH_DEPENDS:= x86 x86_64
  18. include $(ADK_TOPDIR)/mk/host.mk
  19. include $(ADK_TOPDIR)/mk/package.mk
  20. $(eval $(call HOST_template,QEMU,qemu,$(PKG_VERSION)-${PKG_RELEASE}))
  21. $(eval $(call PKG_template,QEMU,qemu,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  22. HOST_CFLAGS+= -DNATIVE
  23. ifeq ($(ADK_TARGET_LIB_MUSL),y)
  24. TARGET_CFLAGS+= -DF_EXLCK=4 -DF_SHLCK=8 -D__SIGRTMIN=32 -D__SIGRTMAX=\(NSIG-1\)
  25. endif
  26. ifeq ($(ADK_TARGET_USE_SSP),y)
  27. CONFIGURE_ARGS+= --enable-stack-protector
  28. else
  29. CONFIGURE_ARGS+= --disable-stack-protector
  30. endif
  31. ifeq ($(ADK_TARGET_USE_PIE),y)
  32. CONFIGURE_ARGS+= --enable-pie
  33. else
  34. CONFIGURE_ARGS+= --disable-pie
  35. endif
  36. CONFIG_STYLE:= minimal
  37. CONFIGURE_ARGS+= --host-cc=$(HOST_CC) \
  38. --cross-prefix=$(GNU_TARGET_NAME)- \
  39. --prefix=/usr \
  40. --sysconfdir=/etc \
  41. --enable-kvm \
  42. --audio-drv-list=alsa \
  43. --disable-libssh2 \
  44. --disable-gtk \
  45. --disable-vnc \
  46. --disable-spice \
  47. --disable-libnfs \
  48. --disable-docs \
  49. --disable-sdl \
  50. --disable-strip \
  51. --bindir=/usr/bin
  52. HOST_STYLE:= manual
  53. HOST_CONFIGURE_ARGS+= --host-cc=$(HOST_CC) \
  54. --prefix=${STAGING_HOST_DIR}/usr \
  55. --disable-stack-protector \
  56. --disable-pie \
  57. --disable-docs \
  58. --disable-werror \
  59. --disable-system \
  60. --disable-sdl
  61. host-configure:
  62. cd ${WRKBUILD}; rm -f config.{cache,status}; \
  63. env ${HOST_CONFIGURE_ENV} \
  64. ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
  65. ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
  66. host-build:
  67. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  68. ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
  69. qemu-hostinstall:
  70. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  71. ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
  72. qemu-install:
  73. $(INSTALL_DIR) $(IDIR_QEMU)/usr/share/qemu
  74. $(INSTALL_DIR) $(IDIR_QEMU)/usr/bin
  75. $(INSTALL_BIN) $(WRKINST)/usr/bin/qemu* \
  76. $(IDIR_QEMU)/usr/bin
  77. $(CP) $(WRKINST)/usr/share/qemu/* \
  78. $(IDIR_QEMU)/usr/share/qemu
  79. include ${ADK_TOPDIR}/mk/host-bottom.mk
  80. include ${ADK_TOPDIR}/mk/pkg-bottom.mk