X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=init%2FMakefile.in;h=a48ead446be5af5bc3b1270cc8c265f45908bc69;hb=5d8843e451c01d8abfe6b5be772637310e9e581e;hp=5b3d9eaf0ff79cc65bf2150be4dc4d8be77c6ef1;hpb=0d4ee68be56a0a43770756d43c0c6e8d98b106f1;p=oweals%2Fbusybox.git diff --git a/init/Makefile.in b/init/Makefile.in index 5b3d9eaf0..a48ead446 100644 --- a/init/Makefile.in +++ b/init/Makefile.in @@ -14,36 +14,30 @@ INIT-y:= INIT-$(CONFIG_HALT) += halt.o INIT-$(CONFIG_INIT) += init.o INIT-$(CONFIG_MESG) += mesg.o -INIT-$(CONFIG_POWEROFF) += poweroff.o -INIT-$(CONFIG_REBOOT) += reboot.o -ifeq ($(CONFIG_HALT), y) +ifeq ($(strip $(CONFIG_HALT)),y) CONFIG_INIT_SHARED=y else -ifeq ($(CONFIG_INIT), y) -CONFIG_INIT_SHARED=y -else -ifeq ($(CONFIG_POWEROFF), y) -CONFIG_INIT_SHARED=y -else -ifeq ($(CONFIG_REBOOT), y) +ifeq ($(strip $(CONFIG_INIT)),y) CONFIG_INIT_SHARED=y else CONFIG_INIT_SHARED=n endif endif -endif -endif -ifeq ($(CONFIG_INIT_SHARED), y) INIT-$(CONFIG_INIT_SHARED) += init_shared.o -endif +ifneq ($(strip $(INIT-y)),) libraries-y+=$(INIT_DIR)$(INIT_AR) +endif + +INIT_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(INIT-y)) +INIT_SRC-a:=$(wildcard $(srcdir)/*.c) +APPLET_SRC-y+=$(INIT_SRC-y) +APPLET_SRC-a+=$(INIT_SRC-a) $(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y)) - $(AR) $(ARFLAGS) $@ $(patsubst %,$(INIT_DIR)%, $(INIT-y)) + $(do_ar) $(INIT_DIR)%.o: $(srcdir)/%.c - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< - + $(compile.c)