Makefile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.21.1
  6. PKG_RELEASE:= 4
  7. PKG_MD5SUM:= 795394f83903b5eec6567d51eebb417e
  8. PKG_DESCR:= core utilities for embedded systems
  9. PKG_SECTION:= base
  10. PKG_URL:= http://www.busybox.net/
  11. PKG_SITES:= http://www.busybox.net/downloads/
  12. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
  13. PKG_SUBPKGS:= BUSYBOX UDHCPD
  14. PKGSD_UDHCPD:= uDHCPD meta package
  15. PKGSC_UDHCPD:= net
  16. include $(TOPDIR)/mk/package.mk
  17. $(eval $(call PKG_template,BUSYBOX,busybox,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  18. $(eval $(call PKG_template,UDHCPD,udhcpd,${PKG_VERSION}-${PKG_RELEASE},busybox,${PKGSD_UDHCPD},${PKGSC_UDHCPD}))
  19. # This is how to extract the Config.in files from a _built_ busybox source tree:
  20. #|for c in $(find build_viprinux_arm_glibc/w-busybox-1.18.1-4/busybox-1.18.1/ -name Config.in); do
  21. #| c=$(sed s,build_viprinux_arm_glibc/w-busybox-1.18.1-4/busybox-1.18.1/,, <<< $c)
  22. #| mkdir -p package/busybox/config_new/$(dirname $c)
  23. #| cp build_viprinux_arm_glibc/w-busybox-1.18.1-4/busybox-1.18.1/$c package/busybox/config_new/$c
  24. #|done
  25. CONFIG_STYLE:= manual
  26. BUILD_STYLE:= manual
  27. INSTALL_STYLE:= manual
  28. BB_MAKE_FLAGS:= V=1 IPKG_ARCH="${CPU_ARCH}" ARCH="${ARCH}" GCC_HONOUR_COPTS=s \
  29. HOSTCC="${CC_FOR_BUILD}" HOSTCFLAGS="$(CFLAGS_FOR_BUILD)" \
  30. CROSS_COMPILE="$(TARGET_CROSS)" EXTRA_LDFLAGS='-static-libgcc' \
  31. -C ${WRKBUILD}
  32. do-configure:
  33. # get all symbols from top level config
  34. grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \
  35. ${WRKBUILD}/.config
  36. # remove all disabled symbols
  37. for i in $$(grep "BUSYBOX_DISABLE" $(TOPDIR)/.config);do \
  38. test -s "$$i" || continue; \
  39. grep -v $${i#BUSYBOX_DISABLE} ${WRKBUILD}/.config > \
  40. ${WRKBUILD}/.config.tmp; \
  41. cp ${WRKBUILD}/.config.tmp ${WRKBUILD}/.config; \
  42. done
  43. $(SED) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config
  44. yes '' | $(MAKE) ${BB_MAKE_FLAGS} oldconfig $(MAKE_TRACE)
  45. do-build:
  46. $(MAKE) ${BB_MAKE_FLAGS} busybox
  47. do-install:
  48. $(MAKE) ${BB_MAKE_FLAGS} install $(MAKE_TRACE)
  49. $(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
  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. udhcpd-install:
  58. ${INSTALL_DIR} ${IDIR_UDHCPD}/etc/
  59. ${INSTALL_DATA} ./files/udhcpd.conf ${IDIR_UDHCPD}/etc/
  60. include ${TOPDIR}/mk/pkg-bottom.mk