Makefile 2.5 KB

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