diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Makefile.in | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/init/Makefile.in b/init/Makefile.in index ef5eb1c58..a48ead446 100644 --- a/init/Makefile.in +++ b/init/Makefile.in | |||
@@ -4,9 +4,13 @@ | |||
4 | # | 4 | # |
5 | # Licensed under the GPL v2, see the file LICENSE in this tarball. | 5 | # Licensed under the GPL v2, see the file LICENSE in this tarball. |
6 | 6 | ||
7 | srcdir:=$(top_srcdir)/init | 7 | INIT_AR:=init.a |
8 | objdir:=$(top_builddir)/init | 8 | ifndef $(INIT_DIR) |
9 | INIT_DIR:=$(top_builddir)/init/ | ||
10 | endif | ||
11 | srcdir=$(top_srcdir)/init | ||
9 | 12 | ||
13 | INIT-y:= | ||
10 | INIT-$(CONFIG_HALT) += halt.o | 14 | INIT-$(CONFIG_HALT) += halt.o |
11 | INIT-$(CONFIG_INIT) += init.o | 15 | INIT-$(CONFIG_INIT) += init.o |
12 | INIT-$(CONFIG_MESG) += mesg.o | 16 | INIT-$(CONFIG_MESG) += mesg.o |
@@ -23,14 +27,17 @@ endif | |||
23 | 27 | ||
24 | INIT-$(CONFIG_INIT_SHARED) += init_shared.o | 28 | INIT-$(CONFIG_INIT_SHARED) += init_shared.o |
25 | 29 | ||
30 | ifneq ($(strip $(INIT-y)),) | ||
31 | libraries-y+=$(INIT_DIR)$(INIT_AR) | ||
32 | endif | ||
33 | |||
26 | INIT_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(INIT-y)) | 34 | INIT_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(INIT-y)) |
27 | INIT_SRC-a:=$(wildcard $(srcdir)/*.c) | 35 | INIT_SRC-a:=$(wildcard $(srcdir)/*.c) |
28 | APPLET_SRC-y+=$(INIT_SRC-y) | 36 | APPLET_SRC-y+=$(INIT_SRC-y) |
29 | APPLET_SRC-a+=$(INIT_SRC-a) | 37 | APPLET_SRC-a+=$(INIT_SRC-a) |
30 | 38 | ||
31 | init_OBJ:= $(patsubst %,$(objdir)/%,$(INIT-y)) | 39 | $(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y)) |
32 | 40 | $(do_ar) | |
33 | $(init_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
34 | $(objdir)/init.a: $(init_OBJ) | ||
35 | libraries-y:=$(libraries-y) $(objdir)/init.a | ||
36 | 41 | ||
42 | $(INIT_DIR)%.o: $(srcdir)/%.c | ||
43 | $(compile.c) | ||