Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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:= 1
  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. do-configure:
  15. grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \
  16. ${WRKBUILD}/.config
  17. $(SED) 's@IDIR@${WRKINST}' ${WRKBUILD}/.config
  18. ifeq ($(ADK_NATIVE),y)
  19. yes '' | \
  20. $(MAKE) V=1 \
  21. IPKG_ARCH="$(ARCH)" \
  22. ARCH="$(ARCH)" -C $(WRKBUILD) oldconfig
  23. else
  24. yes '' | \
  25. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  26. EXTRA_CFLAGS="$(TARGET_CFLAGS)" IPKG_ARCH="$(ARCH)" \
  27. ARCH="$(ARCH)" -C $(WRKBUILD) oldconfig
  28. endif
  29. do-build:
  30. ifeq ($(ADK_NATIVE),y)
  31. $(MAKE) V=1 \
  32. IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) busybox
  33. else
  34. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  35. IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) busybox
  36. endif
  37. do-install: ${TOPDIR}/.config
  38. ifeq ($(ADK_NATIVE),y)
  39. $(MAKE) V=1 \
  40. IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) install
  41. else
  42. $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
  43. IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) install
  44. endif
  45. ifeq ($(DEBUG),1)
  46. ${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \
  47. $(IDIR_BUSYBOX)/bin/busybox
  48. endif
  49. $(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
  50. include ${TOPDIR}/mk/pkg-bottom.mk