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 ($(CONFIG_HALT), y)
23 ifeq ($(CONFIG_INIT), y)
26 ifeq ($(CONFIG_POWEROFF), y)
29 ifeq ($(CONFIG_REBOOT), y)
38 ifeq ($(CONFIG_INIT_SHARED), y)
39 INIT-$(CONFIG_INIT_SHARED) += init_shared.o
42 libraries-y+=$(INIT_DIR)$(INIT_AR)
44 $(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y))
45 $(AR) $(ARFLAGS) $@ $(patsubst %,$(INIT_DIR)%, $(INIT-y))
47 $(INIT_DIR)%.o: $(srcdir)/%.c
48 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<