Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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.15.2
  6. PKG_RELEASE:= 3
  7. PKG_MD5SUM:= 495e320537f0772125f2db3c098e437c
  8. PKG_DESCR:= Core utilities for embedded Linux systems
  9. PKG_SECTION:= base
  10. PKG_URL:= http://www.busybox.net
  11. PKG_SITES:= http://www.busybox.net/downloads/
  12. include $(TOPDIR)/mk/package.mk
  13. $(eval $(call PKG_template,BUSYBOX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  14. CONFIG_STYLE:= manual
  15. BUILD_STYLE:= manual
  16. INSTALL_STYLE:= manual
  17. ${TOPDIR}/.busyboxcfg: ${TOPDIR}/.config
  18. grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \
  19. ${TOPDIR}/.busyboxcfg
  20. ${WRKBUILD}/.config: ${TOPDIR}/.busyboxcfg
  21. cp $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config
  22. $(SED) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config
  23. do-configure: $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config
  24. ifeq ($(ADK_NATIVE),y)
  25. yes '' | \
  26. $(MAKE) V=1 \
  27. IPKG_ARCH="$(ARCH)" \
  28. ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig $(MAKE_TRACE)
  29. else
  30. yes '' | \
  31. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  32. EXTRA_CFLAGS="$(TARGET_CFLAGS)" IPKG_ARCH="$(ARCH)" \
  33. ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig $(MAKE_TRACE)
  34. endif
  35. do-build: $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config
  36. ifeq ($(ADK_NATIVE),y)
  37. $(MAKE) V=1 \
  38. IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox
  39. else
  40. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  41. IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox
  42. endif
  43. do-install: $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config
  44. ifeq ($(ADK_NATIVE),y)
  45. $(MAKE) V=1 \
  46. IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install $(MAKE_TRACE)
  47. else
  48. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  49. IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install $(MAKE_TRACE)
  50. endif
  51. $(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
  52. ifeq ($(ADK_DEBUG),y)
  53. ${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \
  54. $(IDIR_BUSYBOX)/bin/busybox
  55. endif
  56. fake: $(TOPDIR)/.busyboxcfg do-configure do-install
  57. include ${TOPDIR}/mk/pkg-bottom.mk