jffs2 patches
[openwrt.git] / obsolete-buildroot / make / busybox.mk
1 #############################################################
2 #
3 # busybox
4 #
5 #############################################################
6
7 ifneq ($(strip $(USE_BUSYBOX_SNAPSHOT)),)
8 # Be aware that this changes daily....
9 BUSYBOX_DIR:=$(BUILD_DIR)/busybox
10 BUSYBOX_SOURCE:=busybox-$(strip $(USE_BUSYBOX_SNAPSHOT)).tar.bz2
11 BUSYBOX_SITE:=http://www.busybox.net/downloads/snapshots
12 else
13 BUSYBOX_DIR:=$(BUILD_DIR)/busybox-1.00-pre8
14 BUSYBOX_SOURCE:=busybox-1.00-pre8.tar.bz2
15 BUSYBOX_SITE:=http://www.busybox.net/downloads
16 endif
17 BUSYBOX_UNZIP=bzcat
18 BUSYBOX_CONFIG:=$(SOURCE_DIR)/busybox.config
19
20 $(DL_DIR)/$(BUSYBOX_SOURCE):
21 $(WGET) -P $(DL_DIR) $(BUSYBOX_SITE)/$(BUSYBOX_SOURCE)
22
23 busybox-source: $(DL_DIR)/$(BUSYBOX_SOURCE) $(BUSYBOX_CONFIG)
24
25 $(BUSYBOX_DIR)/.configured: $(DL_DIR)/$(BUSYBOX_SOURCE) $(BUSYBOX_CONFIG)
26 $(BUSYBOX_UNZIP) $(DL_DIR)/$(BUSYBOX_SOURCE) | tar -C $(BUILD_DIR) -xvf -
27 # Allow busybox patches.
28 $(SOURCE_DIR)/patch-kernel.sh $(BUSYBOX_DIR) $(SOURCE_DIR) busybox-*.patch
29 cp $(BUSYBOX_CONFIG) $(BUSYBOX_DIR)/.config
30 $(SED) "s,^CROSS.*,CROSS=$(TARGET_CROSS)\n\
31 PREFIX=$(TARGET_DIR),;" $(BUSYBOX_DIR)/Rules.mak
32 ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
33 $(SED) "s/^.*CONFIG_LFS.*/CONFIG_LFS=y/;" $(BUSYBOX_DIR)/.config
34 else
35 $(SED) "s/^.*CONFIG_LFS.*/CONFIG_LFS=n/;" $(BUSYBOX_DIR)/.config
36 endif
37 $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" -C $(BUSYBOX_DIR) oldconfig
38 touch $(BUSYBOX_DIR)/.configured
39
40 busybox-unpack: $(BUSYBOX_DIR)/.configured
41
42 $(BUSYBOX_DIR)/busybox: $(BUSYBOX_DIR)/.configured
43 $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" \
44 EXTRA_CFLAGS="$(TARGET_CFLAGS) -fomit-frame-pointer" -C $(BUSYBOX_DIR)
45
46 $(TARGET_DIR)/bin/busybox: $(BUSYBOX_DIR)/busybox
47 $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" \
48 EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(BUSYBOX_DIR) install
49 # Just in case
50 -chmod a+x $(TARGET_DIR)/usr/share/udhcpc/default.script
51
52 busybox: uclibc $(TARGET_DIR)/bin/busybox
53
54 busybox-clean:
55 rm -f $(TARGET_DIR)/bin/busybox
56 -$(MAKE) -C $(BUSYBOX_DIR) clean
57
58 busybox-dirclean:
59 rm -rf $(BUSYBOX_DIR)
This page took 0.040404 seconds and 5 git commands to generate.