pass ARCH down to uClibc
[buildroot.git] / package / sysvinit / sysvinit.mk
blob37337229990bfe41a46827bb8b31707869c98ce6
1 #############################################################
3 # sysvinit
5 #############################################################
6 SYSVINIT_VERSION:=2.86
7 SYSVINIT_SOURCE:=sysvinit-$(SYSVINIT_VERSION).tar.gz
8 SYSVINIT_SITE:=ftp://ftp.cistron.nl/pub/people/miquels/software
9 SYSVINIT_DIR:=$(BUILD_DIR)/sysvinit-$(SYSVINIT_VERSION)
10 SYSVINIT_CAT:=$(ZCAT)
11 SYSVINIT_BINARY:=src/init
12 SYSVINIT_TARGET_BINARY:=sbin/init
14 $(DL_DIR)/$(SYSVINIT_SOURCE):
15 $(WGET) -P $(DL_DIR) $(SYSVINIT_SITE)/$(SYSVINIT_SOURCE)
17 sysvinit-unpacked: $(SYSVINIT_DIR)/.unpacked
18 $(SYSVINIT_DIR)/.unpacked: $(DL_DIR)/$(SYSVINIT_SOURCE)
19 $(SYSVINIT_CAT) $(DL_DIR)/$(SYSVINIT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
20 toolchain/patch-kernel.sh $(SYSVINIT_DIR) package/sysvinit/ sysvinit-\*.patch
21 touch $@
23 $(SYSVINIT_DIR)/$(SYSVINIT_BINARY): $(SYSVINIT_DIR)/.unpacked
24 CFLAGS="$(TARGET_CFLAGS)" $(MAKE) CC=$(TARGET_CC) -C $(SYSVINIT_DIR)/src
26 $(TARGET_DIR)/$(SYSVINIT_TARGET_BINARY): $(SYSVINIT_DIR)/$(SYSVINIT_BINARY)
27 for x in halt init shutdown; do \
28 install -D $(SYSVINIT_DIR)/src/$$x $(TARGET_DIR)/sbin/$$x || exit 1; \
29 done
31 sysvinit: ncurses $(TARGET_DIR)/$(SYSVINIT_TARGET_BINARY)
33 sysvinit-source: $(DL_DIR)/$(SYSVINIT_SOURCE)
35 sysvinit-clean:
36 for x in halt init shutdown; do \
37 rm -f $(TARGET_DIR)/sbin/$$x || exit 1; \
38 done
39 -$(MAKE) -C $(SYSVINIT_DIR) clean
41 sysvinit-dirclean:
42 rm -rf $(SYSVINIT_DIR)
43 #############################################################
45 # Toplevel Makefile options
47 #############################################################
48 ifeq ($(BR2_PACKAGE_SYSVINIT),y)
49 TARGETS+=sysvinit
50 endif