Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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:= busybox
  5. PKG_VERSION:= 1.18.1
  6. PKG_RELEASE:= 3
  7. PKG_MD5SUM:= f15fe752d8b7012aa5e59f83b88ccb1c
  8. PKG_DESCR:= Core utilities for embedded systems
  9. PKG_SECTION:= base
  10. PKG_URL:= http://www.busybox.net/
  11. PKG_SITES:= http://www.busybox.net/downloads/
  12. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
  13. PKG_SUBPKGS:= BUSYBOX UDHCPD
  14. PKGSD_UDHCPD:= uDHCPD meta package
  15. PKGSC_UDHCPD:= net
  16. include $(TOPDIR)/mk/package.mk
  17. $(eval $(call PKG_template,BUSYBOX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  18. $(eval $(call PKG_template,UDHCPD,udhcpd,${PKG_VERSION}-${PKG_RELEASE},busybox,${PKGSD_UDHCPD},${PKGSC_UDHCPD}))
  19. CONFIG_STYLE:= manual
  20. BUILD_STYLE:= manual
  21. INSTALL_STYLE:= manual
  22. do-configure:
  23. grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \
  24. ${WRKBUILD}/.config
  25. $(SED) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config
  26. ifeq ($(ADK_NATIVE),y)
  27. yes '' | \
  28. $(MAKE) V=1 \
  29. IPKG_ARCH="$(CPU_ARCH)" \
  30. ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig $(MAKE_TRACE)
  31. else
  32. yes '' | \
  33. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  34. EXTRA_CFLAGS="$(TARGET_CFLAGS)" IPKG_ARCH="$(CPU_ARCH)" \
  35. ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig $(MAKE_TRACE)
  36. endif
  37. do-build:
  38. ifeq ($(ADK_NATIVE),y)
  39. $(MAKE) V=1 \
  40. IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox
  41. else
  42. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  43. IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox
  44. endif
  45. do-install:
  46. ifeq ($(ADK_NATIVE),y)
  47. $(MAKE) V=1 \
  48. IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install $(MAKE_TRACE)
  49. else
  50. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  51. IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install $(MAKE_TRACE)
  52. endif
  53. $(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
  54. ifeq ($(ADK_DEBUG),y)
  55. ${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \
  56. $(IDIR_BUSYBOX)/bin/busybox
  57. endif
  58. ifneq ($(strip ${ADK_PACKAGE_CFGFS}),)
  59. cd ${IDIR_BUSYBOX}/sbin && rm -f halt poweroff reboot
  60. endif
  61. udhcpd-install:
  62. ${INSTALL_DIR} ${IDIR_UDHCPD}/etc/
  63. ${INSTALL_DATA} ./files/udhcpd.conf ${IDIR_UDHCPD}/etc/
  64. include ${TOPDIR}/mk/pkg-bottom.mk