diff options
Diffstat (limited to 'coreutils/Makefile.in')
-rw-r--r-- | coreutils/Makefile.in | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/coreutils/Makefile.in b/coreutils/Makefile.in index 73581f2..2ab256c 100644 --- a/coreutils/Makefile.in +++ b/coreutils/Makefile.in @@ -4,9 +4,13 @@ # # Licensed under the GPL v2, see the file LICENSE in this tarball. -srcdir:=$(top_srcdir)/coreutils -objdir:=$(top_builddir)/coreutils +COREUTILS_AR:=coreutils.a +ifndef $(COREUTILS_DIR) +COREUTILS_DIR:=$(top_builddir)/coreutils/ +endif +srcdir=$(top_srcdir)/coreutils +COREUTILS-y:= COREUTILS-$(CONFIG_BASENAME) += basename.o COREUTILS-$(CONFIG_CAL) += cal.o COREUTILS-$(CONFIG_CAT) += cat.o @@ -79,14 +83,17 @@ COREUTILS-$(CONFIG_YES) += yes.o COREUTILS-y:=$(sort $(COREUTILS-y)) +ifneq ($(strip $(COREUTILS-y)),) +libraries-y+=$(COREUTILS_DIR)$(COREUTILS_AR) +endif + COREUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(COREUTILS-y)) COREUTILS_SRC-a:=$(wildcard $(srcdir)/*.c) APPLET_SRC-y+=$(COREUTILS_SRC-y) APPLET_SRC-a+=$(COREUTILS_SRC-a) -coreutils_OBJ:= $(patsubst %,$(objdir)/%,$(COREUTILS-y)) - -$(coreutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c -$(objdir)/coreutils.a: $(coreutils_OBJ) -libraries-y:=$(libraries-y) $(objdir)/coreutils.a +$(COREUTILS_DIR)$(COREUTILS_AR): $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y)) + $(do_ar) +$(COREUTILS_DIR)%.o: $(srcdir)/%.c + $(compile.c) |