Makefile 2.6 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.18.1
  6. PKG_RELEASE:= 4
  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="$(CC_FOR_BUILD)" HOSTCFLAGS="$(CFLAGS_FOR_BUILD)" -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="$(CC_FOR_BUILD)" HOSTCFLAGS="$(CFLAGS_FOR_BUILD)" -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="$(CC_FOR_BUILD)" HOSTCFLAGS="$(CFLAGS_FOR_BUILD)" \
  41. -C $(WRKBUILD) busybox
  42. else
  43. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  44. IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(CC_FOR_BUILD)" HOSTCFLAGS="$(CFLAGS_FOR_BUILD)" \
  45. -C $(WRKBUILD) busybox
  46. endif
  47. do-install:
  48. ifeq ($(ADK_NATIVE),y)
  49. $(MAKE) V=1 \
  50. IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(CC_FOR_BUILD)" HOSTCFLAGS="$(CFLAGS_FOR_BUILD)" \
  51. -C $(WRKBUILD) install $(MAKE_TRACE)
  52. else
  53. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  54. IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(CC_FOR_BUILD)" HOSTCFLAGS="$(CFLAGS_FOR_BUILD)" \
  55. -C $(WRKBUILD) install $(MAKE_TRACE)
  56. endif
  57. $(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
  58. ifeq ($(ADK_DEBUG),y)
  59. ${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \
  60. $(IDIR_BUSYBOX)/bin/busybox
  61. endif
  62. ifneq ($(strip ${ADK_PACKAGE_CFGFS}),)
  63. cd ${IDIR_BUSYBOX}/sbin && rm -f halt poweroff reboot
  64. endif
  65. udhcpd-install:
  66. ${INSTALL_DIR} ${IDIR_UDHCPD}/etc/
  67. ${INSTALL_DATA} ./files/udhcpd.conf ${IDIR_UDHCPD}/etc/
  68. include ${TOPDIR}/mk/pkg-bottom.mk