Makefile 2.5 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:= busybox
  5. PKG_VERSION:= 1.17.2
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 7360b7138b899ee7fc885791c740c3c3
  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. SUB_INSTALLS-y:=
  20. SUB_INSTALLS-m:=
  21. SUB_INSTALLS-${ADK_PACKAGE_UDHCPD}+= udhcpd-install
  22. CONFIG_STYLE:= manual
  23. BUILD_STYLE:= manual
  24. INSTALL_STYLE:= manual
  25. do-configure:
  26. grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \
  27. ${WRKBUILD}/.config
  28. $(SED) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config
  29. ifeq ($(ADK_NATIVE),y)
  30. yes '' | \
  31. $(MAKE) V=1 \
  32. IPKG_ARCH="$(CPU_ARCH)" \
  33. ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig $(MAKE_TRACE)
  34. else
  35. yes '' | \
  36. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  37. EXTRA_CFLAGS="$(TARGET_CFLAGS)" IPKG_ARCH="$(CPU_ARCH)" \
  38. ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig $(MAKE_TRACE)
  39. endif
  40. do-build:
  41. ifeq ($(ADK_NATIVE),y)
  42. $(MAKE) V=1 \
  43. IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox
  44. else
  45. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  46. IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox
  47. endif
  48. do-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  49. ifeq ($(ADK_NATIVE),y)
  50. $(MAKE) V=1 \
  51. IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install $(MAKE_TRACE)
  52. else
  53. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  54. IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install $(MAKE_TRACE)
  55. endif
  56. $(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
  57. ifeq ($(ADK_DEBUG),y)
  58. ${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \
  59. $(IDIR_BUSYBOX)/bin/busybox
  60. endif
  61. ifneq ($(strip ${ADK_PACKAGE_CFGFS}),)
  62. cd ${IDIR_BUSYBOX}/sbin && rm -f halt poweroff reboot
  63. endif
  64. udhcpd-install:
  65. ${INSTALL_DIR} ${IDIR_UDHCPD}/etc/
  66. ${INSTALL_DATA} ./files/udhcpd.conf ${IDIR_UDHCPD}/etc/
  67. include ${TOPDIR}/mk/pkg-bottom.mk