source: branches/backfire/package/busybox/Makefile @ 23962

Last change on this file since 23962 was 23962, checked in by jow, 6 years ago

[backfire] merge r23959-r23961

  • Property svn:copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
File size: 2.2 KB
Line 
1#
2# Copyright (C) 2006-2009 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.15.3
12PKG_RELEASE:=2
13PKG_FLAGS:=essential
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_SOURCE_URL:=http://www.busybox.net/downloads \
17                http://distfiles.gentoo.org/distfiles/
18PKG_MD5SUM:=6059ac9456de6fb18dc8ee4cd0ec9240
19
20include $(INCLUDE_DIR)/package.mk
21
22ifeq ($(DUMP),)
23  STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep '^CONFIG_BUSYBOX_' $(TOPDIR)/.config | md5s)
24endif
25
26init-y :=
27init-$(CONFIG_BUSYBOX_CONFIG_HTTPD) += httpd
28init-$(CONFIG_BUSYBOX_CONFIG_CROND) += cron
29init-$(CONFIG_BUSYBOX_CONFIG_TELNETD) += telnet
30
31define Package/busybox
32  SECTION:=base
33  CATEGORY:=Base system
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
63define Build/Compile
64        $(MAKE) -C $(PKG_BUILD_DIR) \
65                CC="$(TARGET_CC)" \
66                CROSS_COMPILE="$(TARGET_CROSS)" \
67                KBUILD_HAVE_NLS=no \
68                EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
69                ARCH="$(ARCH)" \
70                SKIP_STRIP=y \
71                all
72        rm -rf $(PKG_INSTALL_DIR)
73        $(FIND) $(PKG_BUILD_DIR) -lname "*busybox" -exec rm \{\} \;
74        $(MAKE) -C $(PKG_BUILD_DIR) \
75                CC="$(TARGET_CC)" \
76                CROSS_COMPILE="$(TARGET_CROSS)" \
77                EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
78                ARCH="$(ARCH)" \
79                CONFIG_PREFIX="$(PKG_INSTALL_DIR)" \
80                install
81endef
82
83define Package/busybox/install
84        $(INSTALL_DIR) $(1)/etc/init.d
85        $(CP) $(PKG_INSTALL_DIR)/* $(1)/
86        for tmp in $(init-y); do \
87                $(INSTALL_BIN) ./files/$$$$tmp $(1)/etc/init.d/$$$$tmp; \
88        done
89        -rm -rf $(1)/lib64
90endef
91
92$(eval $(call BuildPackage,busybox))
Note: See TracBrowser for help on using the repository browser.