3 # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
5 # Licensed under the GPL v2, see the file LICENSE in this tarball.
9 INIT_DIR:=$(top_builddir)/init/
11 srcdir=$(top_srcdir)/init
14 INIT-$(CONFIG_HALT) += halt.o
15 INIT-$(CONFIG_INIT) += init.o
16 INIT-$(CONFIG_MESG) += mesg.o
17 INIT-$(CONFIG_POWEROFF) += poweroff.o
18 INIT-$(CONFIG_REBOOT) += reboot.o
20 ifeq ($(strip $(CONFIG_HALT)),y)
23 ifeq ($(strip $(CONFIG_INIT)),y)
26 ifeq ($(strip $(CONFIG_POWEROFF)),y)
29 ifeq ($(strip $(CONFIG_REBOOT)),y)
38 ifeq ($(strip $(CONFIG_INIT_SHARED)),y)
39 INIT-$(CONFIG_INIT_SHARED) += init_shared.o
42 libraries-y+=$(INIT_DIR)$(INIT_AR)
44 INIT_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(INIT-y))
45 INIT_SRC-a:=$(wildcard $(srcdir)/*.c)
46 APPLET_SRC-y+=$(INIT_SRC-y)
47 APPLET_SRC-a+=$(INIT_SRC-a)
49 $(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y))
52 $(INIT_DIR)%.o: $(srcdir)/%.c