Makefile 1.8 KB

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