2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=http
://www.busybox.net
/downloads \
16 http
://distfiles.gentoo.org
/distfiles
/
17 PKG_MD5SUM
:=c7fe7533b7fc4018b0b49a05ee0ee601
19 include $(INCLUDE_DIR
)/package.mk
22 STAMP_CONFIGURED
:=$(strip $(STAMP_CONFIGURED
))_
$(shell grep
'^CONFIG_BUSYBOX_' $(TOPDIR
)/.config | md5s
)
26 init-
$(CONFIG_BUSYBOX_CONFIG_HTTPD
) += httpd
27 init-
$(CONFIG_BUSYBOX_CONFIG_CROND
) += cron
28 init-
$(CONFIG_BUSYBOX_CONFIG_TELNETD
) += telnet
30 define Package
/busybox
33 MAINTAINER
:=Nicolas Thill
<nico@openwrt.org
>
34 TITLE
:=Core utilities for embedded Linux
35 URL
:=http
://busybox.net
/
39 define Package
/busybox
/description
40 The Swiss Army Knife of embedded Linux.
41 It slices
, it dices
, it makes Julian Fries.
44 define Package
/busybox
/config
45 source
"$(SOURCE)/Config.in"
48 define Build
/Configure
49 rm -f
$(PKG_BUILD_DIR
)/.configured
*
50 grep
'CONFIG_BUSYBOX_' $(TOPDIR
)/.config | sed
-e
"s,\\(# \)\\?CONFIG_BUSYBOX_\\(.*\\),\\1\\2,g" > $(PKG_BUILD_DIR
)/.config
51 yes
'' |
$(MAKE
) -C
$(PKG_BUILD_DIR
) \
53 CROSS_COMPILE
="$(TARGET_CROSS)" \
59 ifdef CONFIG_GCC_VERSION_LLVM
60 TARGET_CFLAGS
+= -fnested-functions
63 ifdef CONFIG_GCC_VERSION_4_5_0
64 TARGET_CFLAGS
+= -fno-tree-pta
68 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
70 CROSS_COMPILE
="$(TARGET_CROSS)" \
72 EXTRA_CFLAGS
="$(TARGET_CFLAGS)" \
76 rm -rf
$(PKG_INSTALL_DIR
)
77 $(FIND
) $(PKG_BUILD_DIR
) -lname
"*busybox" -exec
rm \
{\
} \
;
78 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
80 CROSS_COMPILE
="$(TARGET_CROSS)" \
81 EXTRA_CFLAGS
="$(TARGET_CFLAGS)" \
83 CONFIG_PREFIX
="$(PKG_INSTALL_DIR)" \
87 define Package
/busybox
/install
88 $(INSTALL_DIR
) $(1)/etc
/init.d
89 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)/
90 for tmp in
$(init-y
); do \
91 $(INSTALL_BIN
) .
/files
/$$$$tmp $(1)/etc
/init.d
/$$$$tmp; \
96 $(eval
$(call BuildPackage
,busybox
))