2 # Copyright (C) 2006-2012 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
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_URL
:=http
://www.busybox.net
/downloads \
17 http
://distfiles.gentoo.org
/distfiles
/
18 PKG_MD5SUM
:=9c0cae5a0379228e7b55e5b29528df8e
20 PKG_BUILD_DEPENDS
:=BUSYBOX_CONFIG_FEATURE_HAVE_RPC
:librpc
23 include $(INCLUDE_DIR
)/package.mk
26 STAMP_CONFIGURED
:=$(strip $(STAMP_CONFIGURED
))_
$(shell $(SH_FUNC
) grep
'^CONFIG_BUSYBOX_' $(TOPDIR
)/.config | md5s
)
29 ifneq ($(findstring c
,$(OPENWRT_VERBOSE
)),)
30 BB_MAKE_VERBOSE
:= V
=1
36 init-
$(CONFIG_BUSYBOX_CONFIG_HTTPD
) += httpd
37 init-
$(CONFIG_BUSYBOX_CONFIG_CROND
) += cron
38 init-
$(CONFIG_BUSYBOX_CONFIG_TELNETD
) += telnet
40 define Package
/busybox
43 MAINTAINER
:=Nicolas Thill
<nico@openwrt.org
>
44 TITLE
:=Core utilities for embedded Linux
45 URL
:=http
://busybox.net
/
46 DEPENDS
:=+BUSYBOX_CONFIG_FEATURE_HAVE_RPC
:librpc
50 define Package
/busybox
/description
51 The Swiss Army Knife of embedded Linux.
52 It slices
, it dices
, it makes Julian Fries.
55 define Package
/busybox
/config
56 source
"$(SOURCE)/Config.in"
59 define Build
/Configure
60 rm -f
$(PKG_BUILD_DIR
)/.configured
*
61 grep
'CONFIG_BUSYBOX_' $(TOPDIR
)/.config | sed
-e
"s,\\(# \)\\?CONFIG_BUSYBOX_\\(.*\\),\\1\\2,g" > $(PKG_BUILD_DIR
)/.config
62 yes
'' |
$(MAKE
) -C
$(PKG_BUILD_DIR
) \
64 CROSS_COMPILE
="$(TARGET_CROSS)" \
71 ifdef CONFIG_GCC_VERSION_LLVM
72 TARGET_CFLAGS
+= -fnested-functions
76 ifdef CONFIG_BUSYBOX_CONFIG_FEATURE_HAVE_RPC
77 TARGET_CFLAGS
+= -I
$(STAGING_DIR
)/usr
/include
78 export LDFLAGS
=$(TARGET_LDFLAGS
)
83 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
85 CROSS_COMPILE
="$(TARGET_CROSS)" \
87 EXTRA_CFLAGS
="$(TARGET_CFLAGS)" \
93 rm -rf
$(PKG_INSTALL_DIR
)
94 $(FIND
) $(PKG_BUILD_DIR
) -lname
"*busybox" -exec
rm \
{\
} \
;
95 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
97 CROSS_COMPILE
="$(TARGET_CROSS)" \
98 EXTRA_CFLAGS
="$(TARGET_CFLAGS)" \
100 CONFIG_PREFIX
="$(PKG_INSTALL_DIR)" \
106 define Package
/busybox
/install
107 $(INSTALL_DIR
) $(1)/etc
/init.d
108 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)/
109 for tmp in
$(init-y
); do \
110 $(INSTALL_BIN
) .
/files
/$$$$tmp $(1)/etc
/init.d
/$$$$tmp; \
115 $(eval
$(call BuildPackage
,busybox
))