summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorBernd Schmidt <bernds_cb1@t-online.de>2008-06-01 16:44:52 +0000
committerBernd Schmidt <bernds_cb1@t-online.de>2008-06-01 16:44:52 +0000
commit809dbec58fd772bfa9f7d75f8afdc13b3c4542af (patch)
treef1348984e5de58a884d05553f2d504a5d7a5ee08 /Makerules
parente41fbf6daa3ddcb1891a66cc96d15c3ab30d462f (diff)
Use $(<D) rather than $(^D), as the latter now contains an element
corresponding to FORCE, which causes some CFLAGS to be lost. Include all objects in the dependency calculation, not just the ones in libc.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makerules b/Makerules
index a668f4c41..ea0f74f6e 100644
--- a/Makerules
+++ b/Makerules
@@ -124,7 +124,7 @@ maybe_exec = $(if $(strip $(compare_flags) $(any-prereq)), \
CFLAGS_gen.dep = -MT $@ -MD -MF $(dir $@).$(notdir $@).dep
-cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(filter-out $(CFLAGS-OMIT-$(notdir $<)),$(CFLAGS-$(notdir $(^D)))) $(CFLAGS-$(subst $(top_srcdir),,$(dir $<))) $(CFLAGS-$(notdir $<)) $(CFLAGS-$(notdir $@)) $(CFLAGS_gen.dep)
+cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(filter-out $(CFLAGS-OMIT-$(notdir $<)),$(CFLAGS-$(notdir $(<D)))) $(CFLAGS-$(subst $(top_srcdir),,$(dir $<))) $(CFLAGS-$(notdir $<)) $(CFLAGS-$(notdir $@)) $(CFLAGS_gen.dep)
cmd_compile.i = $(cmd_compile.c:-c=-E -dD)
cmd_compile.s = $(cmd_compile.c:-c=-S)
cmd_compile.u = $(CC) $^ $(DEPS-$(notdir $@)) -o $@ $(CFLAGS) $(CFLAGS-$(notdir $(^D))) $(CFLAGS-$(notdir $@)) $(CFLAGS_gen.dep)
@@ -320,10 +320,15 @@ $(top_builddir)lib/libpthread_nonshared.a: $(libpthread-nonshared-y)
$(do_strip)
$(do_ar)
+files.dep := $(libc-a-y) $(libc-so-y) $(libc-nonshared-y) $(libm-a-y) $(libm-so-y)
+files.dep += $(libpthread-a-y) $(libpthread-so-y) $(libutil-a-y) $(libutil-so-y)
+files.dep += $(librt-a-y) $(librt-so-y) $(libresolv-a-y) $(libresolv-so-y)
+files.dep += $(libcrypt-a-y) $(libcrypt-so-y) $(libdl-a-y) $(libdl-so-y)
+files.dep += $(libnsl-a-y) $(libnsl-so-y) $(ldso-y)
.depends.dep := \
- $(patsubst %.o,%.o.dep,$(filter %.o,$(libc-a-y) $(libc-so-y))) \
- $(patsubst %.os,%.os.dep,$(filter %.os,$(libc-a-y) $(libc-so-y))) \
- $(patsubst %.oS,%.oS.dep,$(filter %.oS,$(libc-a-y) $(libc-so-y)))
+ $(patsubst %.o,%.o.dep,$(filter %.o,$(files.dep))) \
+ $(patsubst %.os,%.os.dep,$(filter %.os,$(files.dep))) \
+ $(patsubst %.oS,%.oS.dep,$(filter %.oS,$(files.dep)))
# Oh, and prepend a dot to the basename so i don't have to change my habit of
# calling 'size thefile.o*'
.depends.dep := $(foreach f,$(.depends.dep),$(dir $(f)).$(notdir $(f)))