2 # Licensed under LGPL v2.1, see the file COPYING.LIB in this tarball for details.
5 .SUFFIXES: .c .S .o .os .oS .so .a .s .i
9 .PHONY: dummy $(PHONY) subdirs \
10 all check test $(clean_targets) \
11 config dist menuconfig oldconfig release \
14 # order is important, the stripping uses STRIP_FLAGS for lib-so, but not for lib-a
15 ifeq ($(HAVE_SHARED),y)
16 .LIBPATTERNS: "lib%.so"
17 libs: $(lib-so-y) $(lib-a-y)
18 $(lib-so-y): | $(interp)
20 .LIBPATTERNS: "lib%.a"
21 ifeq ($(UCLIBC_FORMAT_SHARED_FLAT),y)
25 $(lib-a-y): | $(top_builddir)lib
29 shared_objs = $(libc-y:.o=.os) $(libc-shared-y) $(libc-nonshared-y) \
30 $(libcrypt-so-y) $(libdl-so-y) \
31 $(libintl-so-y) $(libm-so-y) $(libnsl-so-y) \
32 $(libpthread-so-y) $(libpthread-nonshared-y) $(libthread_db-so-y) \
33 $(libresolv-so-y) $(librt-so-y) \
35 $(libutil-so-y) $(libubacktrace-so-y)
37 ar_objs = $(libc-y) $(libc-static-y) $(libcrypt-a-y) \
38 $(libdl-a-y) $(libintl-a-y) $(libm-a-y) $(libnsl-a-y) \
39 $(libpthread-a-y) $(libthread_db-a-y) \
40 $(libresolv-a-y) $(librt-a-y) $(libutil-a-y) $(libubacktrace-a-y)
42 ar_objs := $(ar_objs:.o=.os)
44 flat_objs = $(lib-gdb-y)
46 ifeq ($(HAVE_SHARED),y)
47 all_objs: $(sort $(shared_objs) $(ar_objs))
51 $(shared_objs) $(ar_objs): | $(sub_headers)
53 define objects_with_syms
54 $(foreach o,$(2),$(if $(shell $(NM) $(1) $(o) | grep .),$(o)))
57 headers-y: $(headers-y)
60 MAKEFLAGS += --no-print-directory
63 $(shell $(CONFIG_SHELL) $(top_srcdir)/extra/scripts/relative_path.sh $(@D) .)
65 ifneq ($(findstring s,$(MAKEFLAGS)),)
66 export MAKE_IS_SILENT := y
71 export MAKE_IS_SILENT := n
73 ifneq ($(V)$(VERBOSE),)
75 DISP := bri# brief, like pur but with defines
88 show_objs = $(subst $(top_builddir),,$(subst ../,,$@))
93 $(subst $(comma), ,$(subst -Wl$(comma),,$(filter -Wl%,$(1))))
96 pur_disp_compile.c = echo " "CC $(show_objs)
97 pur_disp_compile.i = echo " "CPP $(show_objs)
98 pur_disp_compile.s = echo " "CC-S $(show_objs)
99 pur_disp_compile.u = echo " "CC $(show_objs)
100 pur_disp_compile.S = echo " "AS $(show_objs)
101 pur_disp_compile.m = $(pur_disp_compile.c)
102 pur_disp_compile.mi= echo " "CPP-m $(show_objs)
103 pur_disp_compile-m = echo " "CC-m $(show_objs)
104 pur_disp_hcompile.u= echo " "HOSTCC $(show_objs)
105 pur_disp_hcompile.o= echo " "HOSTCC-o $(show_objs)
106 pur_disp_strip = echo " "STRIP $(STRIP_FLAGS) $@
107 pur_disp_t_strip = echo " "STRIP $(STRIP_FLAGS) $@
108 pur_disp_ar = echo " "AR $(ARFLAGS) $@
109 pur_disp_ld = echo " "LD $(1)
110 pur_disp_ln = echo " "LN $(show_objs)
111 pur_disp_mkdir = echo " "MKDIR $(show_objs)
112 pur_disp_gen = echo " "GEN $(show_objs)
113 pur_disp_install = echo " "INSTALL $(1)
114 pur_disp_unifdef = echo " "UNIFDEF $(show_objs)
115 pur_disp_rm = echo " "CLEAN $(subst CLEAN_,,$(patsubst HEADERCLEAN_%,include \(%\),$@))
117 sil_disp_compile.c = true
118 sil_disp_compile.i = true
119 sil_disp_compile.s = true
120 sil_disp_compile.u = true
121 sil_disp_compile.S = true
122 sil_disp_compile.m = true
123 sil_disp_compile.mi= true
124 sil_disp_compile-m = true
125 sil_disp_hcompile.u= true
126 sil_disp_hcompile.o= true
127 sil_disp_strip = true
128 sil_disp_t_strip = true
132 sil_disp_mkdir = true
134 sil_disp_install = true
135 sil_disp_unifdef = true
138 bri_disp_compile.c = $(pur_disp_compile.c) $(call show_defs,$(cmd_compile.c))
139 bri_disp_compile.i = $(pur_disp_compile.i) $(call show_defs,$(cmd_compile.i))
140 bri_disp_compile.s = $(pur_disp_compile.s) $(call show_defs,$(cmd_compile.s))
141 bri_disp_compile.u = $(pur_disp_compile.u) $(call show_defs,$(cmd_compile.u))
142 bri_disp_compile.S = $(pur_disp_compile.S) $(call show_defs,$(cmd_compile.S))
143 bri_disp_compile.m = $(pur_disp_compile.m) $(call show_defs,$(cmd_compile.m))
144 bri_disp_compile.mi = $(pur_disp_compile.mi) $(call show_defs,$(cmd_compile.mi))
145 bri_disp_compile-m = $(pur_disp_compile-m) $(call show_defs,$(cmd_compile-m))
146 bri_disp_hcompile.u = $(pur_disp_hcompile.u) $(call show_defs,$(cmd_hcompile.u))
147 bri_disp_hcompile.o = $(pur_disp_hcompile.o) $(call show_defs,$(cmd_hcompile.o))
148 bri_disp_strip = $(pur_disp_strip)
149 bri_disp_t_strip = $(pur_disp_t_strip)
150 bri_disp_ar = $(pur_disp_ar)
151 bri_disp_ld = $(pur_disp_ld) $(call show_ldflags,$(cmd_ld))
152 bri_disp_ln = $(pur_disp_ln)
153 bri_disp_mkdir = $(pur_disp_mkdir)
154 bri_disp_gen = $(pur_disp_gen)
155 bri_disp_install = $(pur_disp_install)
156 bri_disp_unifdef = $(pur_disp_unifdef)
157 bri_disp_rm = $(pur_disp_rm)
159 esc=$(subst ','\'',$(1))
161 ver_disp_compile.c = echo '$(call esc,$(cmd_compile.c))'
162 ver_disp_compile.i = echo '$(call esc,$(cmd_compile.i))'
163 ver_disp_compile.s = echo '$(call esc,$(cmd_compile.s))'
164 ver_disp_compile.u = echo '$(call esc,$(cmd_compile.u))'
165 ver_disp_compile.S = echo '$(call esc,$(cmd_compile.S))'
166 ver_disp_compile.m = echo '$(call esc,$(cmd_compile.m))'
167 ver_disp_compile.mi= echo '$(call esc,$(cmd_compile.mi))'
168 ver_disp_compile-m = echo '$(call esc,$(cmd_compile-m))'
169 ver_disp_hcompile.u= echo '$(call esc,$(cmd_hcompile.u))'
170 ver_disp_hcompile.o= echo '$(call esc,$(cmd_hcompile.o))'
171 ver_disp_strip = echo '$(call esc,$(cmd_strip))'
172 ver_disp_t_strip = echo '$(call esc,$(cmd_t_strip))'
173 ver_disp_ar = echo '$(call esc,$(cmd_ar))'
179 ver_disp_unifdef = echo '$(call esc,$(cmd_unifdef))'
182 disp_compile.c = $($(DISP)_disp_compile.c)
183 disp_compile.i = $($(DISP)_disp_compile.i)
184 disp_compile.s = $($(DISP)_disp_compile.s)
185 disp_compile.u = $($(DISP)_disp_compile.u)
186 disp_compile.S = $($(DISP)_disp_compile.S)
187 disp_compile.m = $($(DISP)_disp_compile.m)
188 disp_compile.mi= $($(DISP)_disp_compile.mi)
189 disp_compile-m = $($(DISP)_disp_compile-m)
190 disp_hcompile.u= $($(DISP)_disp_hcompile.u)
191 disp_hcompile.o= $($(DISP)_disp_hcompile.o)
192 disp_strip = $($(DISP)_disp_strip)
193 disp_t_strip = $($(DISP)_disp_t_strip)
194 disp_ar = $($(DISP)_disp_ar)
195 disp_ld = $($(DISP)_disp_ld)
196 disp_ln = $($(DISP)_disp_ln)
197 disp_mkdir = $($(DISP)_disp_mkdir)
198 disp_gen = $($(DISP)_disp_gen)
199 disp_install = $($(DISP)_disp_install)
200 disp_unifdef = $($(DISP)_disp_unifdef)
201 disp_rm = $($(DISP)_disp_rm)
203 any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^)
205 # ../foo/bar/baz.ext -> foo_bar_baz.ext
206 variablify = $(subst /,_,$(subst $(top_builddir),,$(1)))
207 # strip the top_builddir off everything to make the *string* idempotent for -C
208 dirify = $(subst $(top_builddir),,$(patsubst -L$(top_builddir)%,-L%,$(patsubst -I$(top_builddir)%,-I%,$(1))))
210 # True if not identical. Neither order nor whitespace nor identical flags
213 $(strip $(filter-out $(call dirify,$(cmd_$(call variablify,$(1)))), \
214 $(call dirify,$(cmd_$(call variablify,$(@))))) \
215 $(filter-out $(call dirify,$(cmd_$(call variablify,$(@)))), \
216 $(call dirify,$(cmd_$(call variablify,$(1))))))
218 # Rebuild if any prerequisite, the used CC or flags changed.
219 # Previously used flags are stored in the corresponding .%.dep files
221 $(if $(strip $(compare_flags) $(any-prereq)), \
225 echo 'cmd_$(call variablify,$@) := $(call dirify,$(cmd_$(call variablify,$1)))' >> $(dir $@).$(notdir $@).dep)
227 # collect flags of domulti prereqs
228 #collect_multi_flags = $(CFLAGS-$(notdir $(d))) $(CFLAGS-$(notdir $(patsubst %/,%,$(dir $(d)))))
229 collect_multi_flags = $(CFLAGS-$(notdir $(patsubst %/,%,$(dir $(d)))))
231 CFLAGS_gen.dep = -MT $@ -MD -MP -MF $(dir $@).$(notdir $@).dep
233 cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) \
234 $(CFLAGS-$(suffix $@)) \
235 $(filter-out $(CFLAGS-OMIT-$(notdir $<)),$(CFLAGS-$(notdir $(<D)))) \
236 $(CFLAGS-$(subst $(top_srcdir),,$(dir $<))) \
237 $(CFLAGS-$(notdir $<)) \
238 $(CFLAGS-$(notdir $@)) \
240 cmd_compile.i = $(cmd_compile.c:-c=-E -dD) $(UCLIBC_EXTRA_CPPFLAGS)
241 cmd_compile.s = $(cmd_compile.c:-c=-S)
242 cmd_compile.u = $(CC) $^ $(DEPS-$(notdir $@)) -o $@ $(CFLAGS) $(CFLAGS-$(notdir $(^D))) $(CFLAGS-$(notdir $@)) $(CFLAGS_gen.dep)
243 cmd_compile.S = $(filter-out -std=gnu99, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@))
244 cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
245 cmd_compile.mi= $(cmd_compile.m:-c=-E -dD) $(UCLIBC_EXTRA_CPPFLAGS)
247 cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@)) $(sort $(foreach d,$(^:$(top_srcdir)=),$(collect_multi_flags)))
248 cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^
249 cmd_t_strip = $(STRIPTOOL) $(STRIP_FLAGS) $@
250 cmd_ar = $(AR) $(ARFLAGS) $@ $(call objects_with_syms,,$^)
277 compile.c = @$(call maybe_exec,compile.c)
278 compile.i = $(call maybe_exec,compile.i)
279 compile.s = $(call maybe_exec,compile.s)
280 compile.S = @$(call maybe_exec,compile.S)
281 compile.m = @$(call maybe_exec,compile.m)
282 compile.mi= $(call maybe_exec,compile.mi)
283 compile-m = @$(disp_compile-m) ; $(cmd_compile-m) && $(cmd_t_strip)
284 do_strip = @$(disp_strip) ; $(cmd_strip)
285 do_t_strip= @$(disp_t_strip) ; $(cmd_t_strip)
286 do_unifdef= @$(disp_unifdef) ; $(cmd_unifdef)
287 hcompile.u= @$(disp_hcompile.u); $(cmd_hcompile.u)
288 hcompile.o= @$(disp_hcompile.o); $(cmd_hcompile.o)
291 @$(disp_ar) ; $(cmd_ar)
295 @$(disp_compile.u) ; $(cmd_compile.u)
298 cmd_hcompile.u = $(HOSTCC) $(filter-out $(PHONY),$^) $(DEPS-$(notdir $@)) -o $@ $(BUILD_LDFLAGS) $(BUILD_LDFLAGS-$(notdir $(^D))) $(BUILD_LDFLAGS-$(notdir $@)) $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@))
299 cmd_hcompile.o = $(HOSTCC) $(filter-out $(PHONY),$<) $(DEPS-$(notdir $@)) -c -o $@ $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@))
303 $(Q)$(CC) -nostdlib -nostartfiles -shared -Wl,-z,combreloc \
304 -Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \
305 -Wl,--verbose 2>&1 | LC_ALL=C \
306 sed -e '/^=========/,/^=========/!d;/^=========/d' \
307 -e 's/\. = .* + SIZEOF_HEADERS;/& $(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds
311 $(Q)$(RM) $@ $@.$(2) $(dir $@)$(1)
313 $(Q)$(CC) $(LDFLAGS-$(notdir $@)) $(LDFLAGS-y-$(@F)) \
314 -Wl,-soname=$(notdir $@).$(2) \
315 $(CFLAG_-nostdlib) -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) \
316 -Wl,--whole-archive $(firstword $^) -Wl,--no-whole-archive \
317 $(LIBS-$(notdir $@)) $(LIBGCC) $(END_FILE-$(notdir $@))
318 $(Q)$(LN) -sf $(1) $@.$(2)
319 $(Q)$(LN) -sf $(1) $@
322 # CRT files needed by link-flat.so
323 LINK_FLAT_CRTS := $(top_builddir)lib/Scrt1.o $(top_builddir)lib/crti.o \
324 $(top_builddir)lib/crtn.o
326 # Create a shared flat library from the archive named by the first dependency.
327 # $@ names the shared library's .gdb file, not the flat file itself.
328 # (This is because the .gdb suffix makes the ELF file more distinctive
329 # than the suffixless flat file.)
331 # Argument 1 is the shared library file -- i.e. $(@:.gdb=) -- and argument 2
332 # is the shared library identifier. If it wasn't for $(disp_ld), we could
333 # avoid passing $(@:.gdb=) as an argument and use $(@:.gdb=) instead of $(1).
335 # This is so far only used for libc, for which we want to link the entire
336 # libgcc into the shared object.
340 $(Q)$(CC) $(LDFLAGS-$(notdir $@)) $(CFLAG_-nostdlib) -o $(1) \
341 -Wl,-elf2flt -Wl,-shared-lib-id,$(2) $(top_builddir)lib/Scrt1.o \
342 $(top_builddir)/lib/crti.o -Wl,--whole-archive $(firstword $^) \
343 $(LIBGCC) -Wl,--no-whole-archive $(LIBS-$(notdir $@)) $(LIBGCC) \
344 $(top_builddir)/lib/crtn.o
348 $(Q)$(RM) $@ $@.$(2) $(dir $@)$(1)
351 $(Q)$(CC) $(LDFLAGS-$(notdir $@)) -Wl,-soname=$(notdir $@).$(2) \
352 $(CFLAG_-nostdlib) -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) \
354 $(LIBS-$(notdir $@)) $(LIBGCC) $(END_FILE-$(notdir $@))
355 $(Q)$(LN) -sf $(1) $@.$(2)
356 $(Q)$(LN) -sf $(1) $@
359 CFLAGS-.os+=$(PICFLAG)
360 CFLAGS-.oS+=$(PICFLAG) -DSHARED
362 $(top_builddir)%.o: $(top_srcdir)%.c FORCE ; $(compile.c)
363 $(top_builddir)%.os: $(top_srcdir)%.c FORCE | pregen; $(compile.c)
364 $(top_builddir)%.oS: $(top_srcdir)%.c FORCE | pregen; $(compile.c)
365 $(top_builddir)%.o: $(top_srcdir)%.S FORCE ; $(compile.S)
366 $(top_builddir)%.os: $(top_srcdir)%.S FORCE | pregen; $(compile.S)
367 $(top_builddir)%.oS: $(top_srcdir)%.S FORCE | pregen; $(compile.S)
368 $(top_builddir)%.o: $(top_srcdir)%.s FORCE ; $(compile.S)
369 $(top_builddir)%.os: $(top_srcdir)%.s FORCE ; $(compile.S)
370 $(top_builddir)%.oS: $(top_srcdir)%.s FORCE | pregen; $(compile.S)
371 $(top_builddir)%.i: $(top_srcdir)%.c FORCE | pregen; $(compile.i)
372 $(top_builddir)%.i: $(top_srcdir)%.S FORCE | pregen; $(compile.i)
373 $(top_builddir)%.s: $(top_srcdir)%.c FORCE | pregen; $(compile.s)
374 $(top_builddir)%.s: $(top_srcdir)%.S FORCE | pregen; $(compile.s)
375 $(top_builddir)%.dep:
377 $(top_builddir)lib/interp.c: | $(top_builddir)lib
378 $(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@.tmp
379 $(Q)echo "#include <features.h>" >> $@.tmp
380 $(Q)echo "const char __dl_ldso__[] attribute_hidden __attribute__ ((weak)) __attribute__ ((section " \
381 "(\".interp\"))) =\""$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UCLIBC_LDSO)"\";" >> $@.tmp
382 $(Q)$(SED) -i -e 's://:/:g' $@.tmp
385 $(interp): $(top_builddir)lib/interp.c | $(sub_headers)
387 $(Q)$(STRIPTOOL) -x -R .note -R .comment $@
390 $(Q)cd $(top_builddir); $(MAKE) lib/$(patsubst %.$(ABI_VERSION),%,$(notdir $@))
392 $(Q)cd $(top_builddir); $(MAKE) lib/$(patsubst %.$(ABI_VERSION),%,$(notdir $@))
396 ifeq ($(HAVE_SHARED)$(UCLIBC_FORMAT_SHARED_FLAT),y)
397 CRTS=$(top_builddir)lib/$(CRT).o $(top_builddir)lib/S$(CRT).o
399 CRTS=$(top_builddir)lib/$(CRT).o
402 ASFLAGS-$(CRT).o := -DL_$(CRT)
403 ASFLAGS-S$(CRT).o := $(PIEFLAG) -DL_S$(CRT)
404 $(CRTS): $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(CRT).S
406 $(Q)$(STRIPTOOL) -x -R .note -R .comment $@
408 ifeq ($(UCLIBC_CTOR_DTOR),y)
409 CTOR_TARGETS=$(top_builddir)lib/crti.o $(top_builddir)lib/crtn.o
414 ifeq ($(UCLIBC_FORMAT_FDPIC_ELF),y)
415 CRTRELOC=$(top_builddir)lib/crtreloc.o
416 $(CRTRELOC): $(top_builddir)lib/%.o : $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/%.c
420 ifneq ($(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/initfini.c),)
421 CFLAGS-initfini.s := -S -g0 $(PICFLAG) -fno-inline-functions -finhibit-size-directive
422 $(top_builddir)lib/initfini.s: $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/initfini.c | $(top_builddir)lib
425 $(top_builddir)lib/defs.h: $(top_builddir)lib/initfini.s | $(top_builddir)lib
426 $(Q)sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
427 gawk -f $(top_srcdir)extra/scripts/defs.awk > $@.tmp
430 $(top_builddir)lib/crti.S: $(top_builddir)lib/initfini.s $(top_builddir)lib/defs.h
431 $(Q)sed -n -e '1,/@HEADER_ENDS/p' \
432 -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
433 -e '/@TRAILER_BEGINS/,$$p' $< > $@
435 $(top_builddir)lib/crtn.S: $(top_builddir)lib/initfini.s
436 $(Q)sed -n -e '1,/@HEADER_ENDS/p' \
437 -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
438 -e '/@TRAILER_BEGINS/,$$p' $< > $@
440 $(CTOR_TARGETS): $(top_builddir)lib/%.o : $(top_builddir)lib/%.S
441 $(compile.S) $(PICFLAG) $(SSP_DISABLE_FLAGS)
443 $(CTOR_TARGETS): $(top_builddir)lib/%.o : $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/%.S
444 $(compile.S) $(PICFLAG) $(SSP_DISABLE_FLAGS)
447 #ifeq ($(TARGET_ARCH),nios)
448 #CRTS_COMPAT := $(top_builddir)lib/crt0.o
450 # ln -fs crt1.o $(top_builddir)lib/crt0.o
455 startfiles = $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC)
456 $(crt-y): $(startfiles)
457 $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC): | headers
458 $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC) $(LINK_FLAT_CRTS) $(SHARED_START_FILES) $(SHARED_END_FILES) : | $(top_builddir)lib
460 $(top_builddir)lib/$(NONSHARED_LIBNAME): $(libc-nonshared-y)
464 $(top_builddir)lib/libpthread_nonshared.a: $(libpthread-nonshared-y)
468 files.dep := $(libc-a-y) $(libc-so-y) $(libc-nonshared-y) \
469 $(libm-a-y) $(libm-so-y) \
470 $(libpthread-a-y) $(libpthread-so-y) $(libpthread-nonshared-y) \
471 $(libthread_db-a-y) $(libthread_db-so-y) $(libpthread-generated-y) \
472 $(START_FILE-libpthread.so) $(END_FILE-libpthread.so) \
473 $(PTHREAD_INITFINI:.c=.s) \
474 $(librt-a-y) $(librt-so-y) $(libresolv-a-y) $(libresolv-so-y) \
475 $(libcrypt-a-y) $(libcrypt-so-y) $(libutil-a-y) $(libutil-so-y) \
476 $(libnsl-a-y) $(libnsl-so-y) $(ldso-y) $(libdl-a-y) $(libdl-so-y) \
477 $(libubacktrace-a-y) $(libubacktrace-so-y)
479 $(patsubst %.s,%.s.dep,$(filter %.s,$(files.dep))) \
480 $(patsubst %.o,%.o.dep,$(filter %.o,$(files.dep))) \
481 $(patsubst %.os,%.os.dep,$(filter %.os,$(files.dep))) \
482 $(patsubst %.oS,%.oS.dep,$(filter %.oS,$(files.dep)))
483 # Oh, and prepend a dot to the basename so i don't have to change my habit of
484 # calling 'size thefile.o*'
485 .depends.dep := $(foreach f,$(.depends.dep),$(dir $(f)).$(notdir $(f)))
486 .depends.dep := $(wildcard $(.depends.dep))
490 clean: objclean-y headers_clean-y
491 realclean: clean menuconfig-clean-y
492 $(Q)$(RM) $(.depends.dep)
494 objclean-y: $(objclean-y)
495 headers_clean-y: $(headers_clean-y)
497 ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
498 ifneq ($(strip $(.depends.dep)),)
500 -include $(.depends.dep)