1
0

Makefile 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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:= 6
  7. PKG_MD5SUM:= 795394f83903b5eec6567d51eebb417e
  8. PKG_DESCR:= core utilities for embedded systems
  9. PKG_SECTION:= core
  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. PKG_SUBPKGS:= BUSYBOX UDHCPD
  15. PKGSD_UDHCPD:= uDHCPD meta package
  16. PKGSC_UDHCPD:= net
  17. include $(TOPDIR)/mk/package.mk
  18. $(eval $(call PKG_template,BUSYBOX,busybox,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  19. $(eval $(call PKG_template,UDHCPD,udhcpd,${PKG_VERSION}-${PKG_RELEASE},busybox,${PKGSD_UDHCPD},${PKGSC_UDHCPD}))
  20. # This is how to extract the Config.in files from a _built_ busybox source tree:
  21. #|for c in $(find build_viprinux_arm_glibc/w-busybox-1.18.1-4/busybox-1.18.1/ -name Config.in); do
  22. #| c=$(sed s,build_viprinux_arm_glibc/w-busybox-1.18.1-4/busybox-1.18.1/,, <<< $c)
  23. #| mkdir -p package/busybox/config_new/$(dirname $c)
  24. #| cp build_viprinux_arm_glibc/w-busybox-1.18.1-4/busybox-1.18.1/$c package/busybox/config_new/$c
  25. #|done
  26. CONFIG_STYLE:= manual
  27. BUILD_STYLE:= manual
  28. INSTALL_STYLE:= manual
  29. BB_MAKE_FLAGS:= V=1 IPKG_ARCH="${CPU_ARCH}" ARCH="${ARCH}" GCC_HONOUR_COPTS=s \
  30. HOSTCC="${CC_FOR_BUILD}" HOSTCFLAGS="$(CFLAGS_FOR_BUILD)" \
  31. CROSS_COMPILE="$(TARGET_CROSS)" EXTRA_LDFLAGS='-static-libgcc' \
  32. -C ${WRKBUILD}
  33. do-configure:
  34. # get all symbols from top level config
  35. grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \
  36. ${WRKBUILD}/.config
  37. # remove all disabled symbols
  38. for i in $$(grep "BUSYBOX_DISABLE" $(TOPDIR)/.config);do \
  39. test -s "$$i" || continue; \
  40. grep -v $${i#BUSYBOX_DISABLE} ${WRKBUILD}/.config > \
  41. ${WRKBUILD}/.config.tmp; \
  42. cp ${WRKBUILD}/.config.tmp ${WRKBUILD}/.config; \
  43. done
  44. $(SED) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config
  45. yes '' | $(MAKE) ${BB_MAKE_FLAGS} oldconfig $(MAKE_TRACE)
  46. do-build:
  47. $(MAKE) ${BB_MAKE_FLAGS} busybox
  48. do-install:
  49. $(MAKE) ${BB_MAKE_FLAGS} install $(MAKE_TRACE)
  50. $(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
  51. ifeq ($(BUSYBOX_IFUPDOWN),y)
  52. $(INSTALL_DIR) $(IDIR_BUSYBOX)/etc/init.d
  53. $(INSTALL_BIN) ./files/network $(IDIR_BUSYBOX)/etc/init.d
  54. endif
  55. ifeq ($(ADK_DEBUG),y)
  56. ${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \
  57. $(IDIR_BUSYBOX)/bin/busybox
  58. endif
  59. ifneq ($(strip ${ADK_PACKAGE_CFGFS}),)
  60. cd ${IDIR_BUSYBOX}/sbin && rm -f halt poweroff reboot
  61. endif
  62. udhcpd-install:
  63. ${INSTALL_DIR} ${IDIR_UDHCPD}/etc/
  64. ${INSTALL_DATA} ./files/udhcpd.conf ${IDIR_UDHCPD}/etc/
  65. include ${TOPDIR}/mk/pkg-bottom.mk