source: trunk/package/busybox/Makefile @ 22659

Last change on this file since 22659 was 22659, checked in by acoul, 6 years ago

package/busybox: update to busybox-1.7.1, include upstream patches

  • Property svn:copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
File size: 2.3 KB
Line 
1#
2# Copyright (C) 2006-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=busybox
11PKG_VERSION:=1.17.1
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=http://www.busybox.net/downloads \
16                http://distfiles.gentoo.org/distfiles/
17PKG_MD5SUM:=c7fe7533b7fc4018b0b49a05ee0ee601
18
19include $(INCLUDE_DIR)/package.mk
20
21ifeq ($(DUMP),)
22  STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep '^CONFIG_BUSYBOX_' $(TOPDIR)/.config | md5s)
23endif
24
25init-y :=
26init-$(CONFIG_BUSYBOX_CONFIG_HTTPD) += httpd
27init-$(CONFIG_BUSYBOX_CONFIG_CROND) += cron
28init-$(CONFIG_BUSYBOX_CONFIG_TELNETD) += telnet
29
30define Package/busybox
31  SECTION:=base
32  CATEGORY:=Base system
33  MAINTAINER:=Nicolas Thill <nico@openwrt.org>
34  TITLE:=Core utilities for embedded Linux
35  URL:=http://busybox.net/
36  MENU:=1
37endef
38
39define Package/busybox/description
40 The Swiss Army Knife of embedded Linux.
41 It slices, it dices, it makes Julian Fries.
42endef
43
44define Package/busybox/config
45        source "$(SOURCE)/Config.in"
46endef
47
48define 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) \
52                CC="$(TARGET_CC)" \
53                CROSS_COMPILE="$(TARGET_CROSS)" \
54                KBUILD_HAVE_NLS=no \
55                ARCH="$(ARCH)" \
56                oldconfig
57endef
58
59ifdef CONFIG_GCC_VERSION_LLVM
60  TARGET_CFLAGS += -fnested-functions
61endif
62
63ifdef CONFIG_GCC_VERSION_4_5_0
64  TARGET_CFLAGS += -fno-tree-pta
65endif
66
67define Build/Compile
68        $(MAKE) -C $(PKG_BUILD_DIR) \
69                CC="$(TARGET_CC)" \
70                CROSS_COMPILE="$(TARGET_CROSS)" \
71                KBUILD_HAVE_NLS=no \
72                EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
73                ARCH="$(ARCH)" \
74                SKIP_STRIP=y \
75                all
76        rm -rf $(PKG_INSTALL_DIR)
77        $(FIND) $(PKG_BUILD_DIR) -lname "*busybox" -exec rm \{\} \;
78        $(MAKE) -C $(PKG_BUILD_DIR) \
79                CC="$(TARGET_CC)" \
80                CROSS_COMPILE="$(TARGET_CROSS)" \
81                EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
82                ARCH="$(ARCH)" \
83                CONFIG_PREFIX="$(PKG_INSTALL_DIR)" \
84                install
85endef
86
87define 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; \
92        done
93        -rm -rf $(1)/lib64
94endef
95
96$(eval $(call BuildPackage,busybox))
Note: See TracBrowser for help on using the repository browser.