Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 $(TOPDIR)/rules.mk
  4. PKG_NAME:= qemu
  5. PKG_VERSION:= 1.7.1
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= 9541063d999cf9659ed7fdce71314f31
  8. PKG_DESCR:= cpu and system emulator
  9. PKG_SECTION:= misc
  10. PKG_DEPENDS:= zlib glib
  11. PKG_BUILDDEP:= gettext-tiny libiconv-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 $(TOPDIR)/mk/host.mk
  19. include $(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. 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_STATIC),y)
  26. TARGET_CFLAGS+= -static
  27. TARGET_LDFLAGS+= -static
  28. endif
  29. CONFIG_STYLE:= minimal
  30. CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \
  31. --cross-prefix=$(GNU_TARGET_NAME)- \
  32. --prefix=/usr \
  33. --sysconfdir=/etc \
  34. --enable-kvm \
  35. --disable-docs \
  36. --disable-sdl \
  37. --bindir=/usr/bin
  38. CFLAGS_FOR_BUILD+= -DNATIVE
  39. HOST_STYLE:= manual
  40. HOST_CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \
  41. --prefix=${STAGING_HOST_DIR}/usr \
  42. --disable-docs \
  43. --disable-werror \
  44. --disable-system \
  45. --disable-sdl
  46. host-configure:
  47. cd ${WRKBUILD}; rm -f config.{cache,status}; \
  48. env ${HOST_CONFIGURE_ENV} \
  49. ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
  50. ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
  51. host-build:
  52. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  53. ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
  54. qemu-hostinstall:
  55. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  56. ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
  57. qemu-install:
  58. $(INSTALL_DIR) $(IDIR_QEMU)/usr/share/qemu
  59. $(INSTALL_DIR) $(IDIR_QEMU)/usr/bin
  60. $(INSTALL_BIN) $(WRKINST)/usr/bin/qemu* \
  61. $(IDIR_QEMU)/usr/bin
  62. $(CP) $(WRKINST)/usr/share/qemu/* \
  63. $(IDIR_QEMU)/usr/share/qemu
  64. include ${TOPDIR}/mk/host-bottom.mk
  65. include ${TOPDIR}/mk/pkg-bottom.mk