binutils: update to 2.43.1
[openadk.git] / package / busybox / Makefile
blob78b76ead590ef0b207a993de606de4e437e8310e
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR)/rules.mk
6 PKG_NAME:= busybox
7 PKG_VERSION:= 1.36.1
8 PKG_RELEASE:= 1
9 PKG_HASH:= b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314
10 PKG_DESCR:= core utilities for embedded systems
11 PKG_SECTION:= base/apps
12 PKG_URL:= http://www.busybox.net/
13 PKG_SITES:= https://www.busybox.net/downloads/
15 DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
17 include $(ADK_TOPDIR)/mk/package.mk
19 $(eval $(call PKG_template,BUSYBOX,busybox,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
21 # disable lto
22 TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
24 CONFIG_STYLE:= manual
25 BUILD_STYLE:= manual
26 INSTALL_STYLE:= manual
28 BB_MAKE_FLAGS:= V=1 \
29 ARCH="${ADK_TARGET_ARCH}" \
30 IPKG_ARCH="${ADK_TARGET_CPU_ARCH}" \
31 HOSTCC="${CC_FOR_BUILD}" \
32 HOSTCFLAGS="$(CFLAGS_FOR_BUILD)" \
33 CROSS_COMPILE="$(TARGET_CROSS)" \
34 SKIP_STRIP=y
36 do-configure:
37 # get all symbols from top level config
38 grep "^BUSYBOX_\|# BUSYBOX" $(ADK_TOPDIR)/.config|grep -v BUSYBOX_DISABLE|sed -e 's/BUSYBOX_/CONFIG_/' > \
39 ${WRKBUILD}/.config
40 # convert all disabled symbols
41 for i in $$(grep ^BUSYBOX_DISABLE $(ADK_TOPDIR)/.config);do \
42 sym=$${i#BUSYBOX_DISABLE_}; \
43 symbol=$$(echo $$sym|sed -e "s#=y##"); \
44 case $$symbol in \
45 GREP) \
46 printf "# CONFIG_GREP is not set\n" >> ${WRKBUILD}/.config; \
47 printf "# CONFIG_EGREP is not set\n" >> ${WRKBUILD}/.config; \
48 printf "# CONFIG_FGREP is not set\n" >> ${WRKBUILD}/.config; \
49 ;; \
50 KMOD) \
51 printf "# CONFIG_MODINFO is not set\n" >> ${WRKBUILD}/.config; \
52 printf "# CONFIG_MODPROBE_SMALL is not set\n" >> ${WRKBUILD}/.config; \
53 printf "# CONFIG_INSMOD is not set\n" >> ${WRKBUILD}/.config; \
54 printf "# CONFIG_RMMOD is not set\n" >> ${WRKBUILD}/.config; \
55 printf "# CONFIG_LSMOD is not set\n" >> ${WRKBUILD}/.config; \
56 printf "# CONFIG_MODPROBE is not set\n" >> ${WRKBUILD}/.config; \
57 printf "# CONFIG_DEPMOD is not set\n" >> ${WRKBUILD}/.config; \
58 ;; \
59 *) \
60 printf "# CONFIG_$${symbol} is not set\n" >> ${WRKBUILD}/.config; \
61 ;; \
62 esac \
63 done
64 $(SED) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config
66 do-build:
67 PATH='$(HOST_PATH)' $(MAKE) ${BB_MAKE_FLAGS} -C ${WRKBUILD} busybox
69 do-install:
70 PATH='$(HOST_PATH)' $(MAKE) ${BB_MAKE_FLAGS} -C ${WRKBUILD} install $(MAKE_TRACE)
71 $(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
72 ifeq ($(BUSYBOX_IFUP),y)
73 $(INSTALL_DIR) $(IDIR_BUSYBOX)/etc/init.d
74 ifeq ($(ADK_RUNTIME_WAIT_FOR_ETHERNET),y)
75 $(INSTALL_BIN) ./files/network.wait $(IDIR_BUSYBOX)/etc/init.d/network
76 else
77 $(INSTALL_BIN) ./files/network $(IDIR_BUSYBOX)/etc/init.d/network
78 endif
79 endif
80 ifeq ($(ADK_DEBUG),y)
81 ${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \
82 $(IDIR_BUSYBOX)/bin/busybox
83 endif
84 ifneq ($(strip ${ADK_PACKAGE_CFGFS}),)
85 cd ${IDIR_BUSYBOX}/sbin && rm -f halt poweroff reboot
86 endif
88 include ${ADK_TOPDIR}/mk/pkg-bottom.mk