Makefile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 $(ADK_TOPDIR)/rules.mk
  4. PKG_NAME:= busybox
  5. PKG_VERSION:= 1.22.1
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= 337d1a15ab1cb1d4ed423168b1eb7d7e
  8. PKG_DESCR:= core utilities for embedded systems
  9. PKG_SECTION:= base/apps
  10. PKG_BUILDDEP:= bzip2-host
  11. PKG_URL:= http://www.busybox.net/
  12. PKG_SITES:= http://www.busybox.net/downloads/
  13. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
  14. include $(ADK_TOPDIR)/mk/package.mk
  15. $(eval $(call PKG_template,BUSYBOX,busybox,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  16. CONFIG_STYLE:= manual
  17. BUILD_STYLE:= manual
  18. INSTALL_STYLE:= manual
  19. BB_MAKE_FLAGS:= V=1 \
  20. ARCH="${ADK_TARGET_ARCH}" \
  21. IPKG_ARCH="${ADK_TARGET_CPU_ARCH}" \
  22. HOSTCC="${CC_FOR_BUILD}" \
  23. HOSTCFLAGS="$(CFLAGS_FOR_BUILD)" \
  24. CROSS_COMPILE="$(TARGET_CROSS)"
  25. do-configure:
  26. # get all symbols from top level config
  27. grep BUSYBOX_ $(ADK_TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \
  28. ${WRKBUILD}/.config
  29. # remove all disabled symbols
  30. for i in $$(grep "BUSYBOX_DISABLE" $(ADK_TOPDIR)/.config);do \
  31. test -s "$$i" || continue; \
  32. grep -v $${i#BUSYBOX_DISABLE} ${WRKBUILD}/.config > \
  33. ${WRKBUILD}/.config.tmp; \
  34. cp ${WRKBUILD}/.config.tmp ${WRKBUILD}/.config; \
  35. done
  36. ifeq ($(ADK_TARGET_UCLINUX),y)
  37. echo 'BUSYBOX_NOMMU=y' >> ${WRKBUILD}/.config
  38. endif
  39. $(SED) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config
  40. yes '' | PATH='$(HOST_PATH)' $(MAKE) ${BB_MAKE_FLAGS} -C ${WRKBUILD} oldconfig $(MAKE_TRACE)
  41. do-build:
  42. PATH='$(HOST_PATH)' $(MAKE) ${BB_MAKE_FLAGS} -C ${WRKBUILD} busybox
  43. do-install:
  44. PATH='$(HOST_PATH)' $(MAKE) ${BB_MAKE_FLAGS} -C ${WRKBUILD} install $(MAKE_TRACE)
  45. $(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
  46. ifeq ($(BUSYBOX_IFUPDOWN),y)
  47. $(INSTALL_DIR) $(IDIR_BUSYBOX)/etc/init.d
  48. $(INSTALL_BIN) ./files/network $(IDIR_BUSYBOX)/etc/init.d
  49. endif
  50. ifeq ($(ADK_DEBUG),y)
  51. ${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \
  52. $(IDIR_BUSYBOX)/bin/busybox
  53. endif
  54. ifneq ($(strip ${ADK_PACKAGE_CFGFS}),)
  55. cd ${IDIR_BUSYBOX}/sbin && rm -f halt poweroff reboot
  56. endif
  57. include ${ADK_TOPDIR}/mk/pkg-bottom.mk