Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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_DEPENDS:= base-files
  11. PKG_BUILDDEP+= base-files
  12. PKG_URL:= http://www.busybox.net
  13. PKG_SITES:= http://www.busybox.net/downloads/
  14. include $(TOPDIR)/mk/package.mk
  15. $(eval $(call PKG_template,BUSYBOX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  16. CONFIG_STYLE:= manual
  17. BUILD_STYLE:= manual
  18. INSTALL_STYLE:= manual
  19. ${TOPDIR}/.busyboxcfg: ${TOPDIR}/.config
  20. grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \
  21. ${TOPDIR}/.busyboxcfg
  22. ${WRKBUILD}/.config: ${TOPDIR}/.busyboxcfg
  23. cp $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config
  24. $(SED) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config
  25. do-configure: $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config
  26. ifeq ($(ADK_NATIVE),y)
  27. yes '' | \
  28. $(MAKE) V=1 \
  29. IPKG_ARCH="$(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="$(ARCH)" \
  35. ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig $(MAKE_TRACE)
  36. endif
  37. do-build: $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config
  38. ifeq ($(ADK_NATIVE),y)
  39. $(MAKE) V=1 \
  40. IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox
  41. else
  42. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  43. IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox
  44. endif
  45. do-install: $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config
  46. ifeq ($(ADK_NATIVE),y)
  47. $(MAKE) V=1 \
  48. IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install $(MAKE_TRACE)
  49. else
  50. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  51. IPKG_ARCH="$(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. fake: $(TOPDIR)/.busyboxcfg do-configure do-install
  59. include ${TOPDIR}/mk/pkg-bottom.mk