add INSTALL_BIN, INSTALL_DIR, INSTALL_DATA variables
[openwrt/openwrt.git] / package / busybox / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=busybox
12 PKG_VERSION:=1.2.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://www.busybox.net/downloads
17 PKG_MD5SUM:=362b3dc0f2023ddfda901dc1f1a74391
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/busybox
25 SECTION:=base
26 CATEGORY:=Base system
27 TITLE:=Core utilities for embedded Linux
28 URL:=http://busybox.net/
29 MENU:=1
30 endef
31
32 define Package/busybox/description
33 The Swiss Army Knife of embedded Linux.
34 It slices, it dices, it makes Julian Fries.
35 endef
36
37 define Package/busybox/config
38 menu "Configuration"
39 depends on PACKAGE_busybox
40 source "$(SOURCE)/config/Config.in"
41 endmenu
42 endef
43
44 define Build/Configure
45 $(SCRIPT_DIR)/gen_busybox_config.pl $(TOPDIR)/.config > $(PKG_BUILD_DIR)/.config
46 yes '' | $(MAKE) -C $(PKG_BUILD_DIR) \
47 CC="$(TARGET_CC)" \
48 CROSS="$(TARGET_CROSS)" \
49 oldconfig
50 endef
51
52 define Build/Compile
53 $(MAKE) -C $(PKG_BUILD_DIR) \
54 CC="$(TARGET_CC)" \
55 CROSS="$(TARGET_CROSS)" \
56 EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
57 IPKG_ARCH="$(ARCH)" \
58 all
59 endef
60
61 define Package/busybox/install
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 CC="$(TARGET_CC)" \
64 CROSS="$(TARGET_CROSS)" \
65 EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
66 IPKG_ARCH="$(ARCH)" \
67 PREFIX="$(1)" \
68 install
69 -rm -rf $(1)/lib64
70 endef
71
72 $(eval $(call BuildPackage,busybox))