3 # Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
5 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 #--------------------------------------------------------------
9 # You shouldn't need to mess with anything beyond this point...
10 #--------------------------------------------------------------
11 include $(top_srcdir)Rules.mak
12 sub_headers := headers
14 ifeq ($(HAVE_DOT_CONFIG),y)
19 # In this section, we need .config
20 -include $(top_builddir).config.cmd
22 else # ifeq ($(HAVE_DOT_CONFIG),y)
27 @echo "Need to make a config file first, run: make menuconfig"
30 endif # ifeq ($(HAVE_DOT_CONFIG),y)
32 include $(top_srcdir)ldso/Makefile.in
33 include $(top_srcdir)libcrypt/Makefile.in
34 include $(top_srcdir)libintl/Makefile.in
35 include $(top_srcdir)libm/Makefile.in
36 include $(top_srcdir)libnsl/Makefile.in
37 include $(top_srcdir)libresolv/Makefile.in
38 include $(top_srcdir)libutil/Makefile.in
39 include $(top_srcdir)libpthread/Makefile.in
40 include $(top_srcdir)librt/Makefile.in
41 include $(top_srcdir)libubacktrace/Makefile.in
42 include $(top_srcdir)extra/locale/Makefile.in
44 # last included to catch all the objects added by others (locales/threads)
45 include $(top_srcdir)libc/Makefile.in
47 conf := $(top_builddir)extra/config/conf
48 mconf := $(top_builddir)extra/config/mconf
50 ifeq ($(HAVE_DOT_CONFIG),y)
51 # If the .config changes then we have to make sure that our includes are
52 # updated properly. This would normally work by saying that the headers
53 # have uClibc_config.h as prerequisite but since we _symlink_ the headers
54 # and do not (?) want to rely on 'make -L' we better update them right here,
55 # on spot to save us from alot of hazzle.
56 $(top_builddir)include/bits/uClibc_config.h: $(conf) $(KCONFIG_CONFIG) $(top_srcdir)extra/scripts/conf-header.sh | $(top_builddir)include/bits $(top_builddir)include/config
58 $(Q)$< -s $(top_srcdir)extra/Configs/Config.in
59 $(Q)$(top_srcdir)extra/scripts/conf-header.sh $(KCONFIG_CONFIG) > $@
62 # The above doesn't work for threads, though. Just using check-symlinks for now.
63 # XXX: FIXME: this is ugly
66 $(top_builddir)include/config/linuxthreads/old.h $(top_builddir)include/config/linuxthreads/new.h:
69 # For the moment, we have to keep re-running this target
70 # because the fix includes scripts rely on pre-processers
71 # in order to generate the headers correctly :(. That
72 # means we can't use the $(HOSTCC) in order to get the
74 ifeq ($(ARCH_USE_MMU),y)
75 export header_extra_args =
77 export header_extra_args = -n
79 HEADERS_BITS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/bits/*.h))
80 ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y)
81 HEADERS_BITS_COMMON_NO_LEGACY := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common-generic/bits/*.h))
82 HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_COMMON_NO_LEGACY),$(HEADERS_BITS_COMMON))
83 ALL_HEADERS_BITS_COMMON_NO_LEGACY := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_COMMON_NO_LEGACY))
86 HEADERS_BITS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h))
87 HEADERS_BITS_SUBARCH :=
88 ifneq ($(TARGET_SUBARCH),)
89 HEADERS_BITS_SUBARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h))
91 ifneq ($(HEADERS_BITS_PTHREAD),)
92 HEADERS_BITS_ARCH := $(filter-out $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_ARCH))
93 HEADERS_BITS_SUBARCH:= $(filter-out $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_SUBARCH))
95 HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH) $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_COMMON))
97 HEADERS_SYS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/sys/*.h))
98 HEADERS_SYS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h))
99 HEADERS_SYS_COMMON := $(filter-out $(HEADERS_SYS_ARCH),$(HEADERS_SYS_COMMON))
101 ALL_HEADERS_COMMON := $(top_builddir)include/fpu_control.h \
102 $(top_builddir)include/jmpbuf-offsets.h \
103 $(top_builddir)include/jmpbuf-unwind.h \
104 $(top_builddir)include/dl-osinfo.h \
105 $(top_builddir)include/hp-timing.h \
106 $(top_builddir)include/not-cancel.h
107 ALL_HEADERS_BITS_COMMON := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_COMMON))
108 ALL_HEADERS_BITS_ARCH := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_ARCH))
109 ifneq ($(TARGET_SUBARCH),)
110 ALL_HEADERS_BITS_SUBARCH := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_SUBARCH))
112 ALL_HEADERS_BITS_SUBARCH :=
114 ALL_HEADERS_SYS_COMMON := $(addprefix $(top_builddir)include/sys/,$(HEADERS_SYS_COMMON))
115 ALL_HEADERS_SYS_ARCH := $(addprefix $(top_builddir)include/sys/,$(HEADERS_SYS_ARCH))
117 target-headers-sysdep := \
118 $(ALL_HEADERS_COMMON) \
119 $(ALL_HEADERS_BITS_COMMON) \
120 $(ALL_HEADERS_BITS_ARCH) \
121 $(ALL_HEADERS_BITS_SUBARCH) \
122 $(ALL_HEADERS_SYS_COMMON) \
123 $(ALL_HEADERS_SYS_ARCH) \
124 $(ALL_HEADERS_BITS_PTHREAD)
126 ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y)
127 target-headers-sysdep += $(ALL_HEADERS_BITS_COMMON_NO_LEGACY)
130 $(top_builddir)include/fpu_control.h $(top_builddir)include/jmpbuf-offsets.h $(top_builddir)include/jmpbuf-unwind.h:
132 $(Q)[ -r $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) ] && \
133 $(LN) -fs $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ || \
134 $(LN) -fs $(call rel_srcdir)libc/sysdeps/linux/common/$(@F) $@
136 $(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h $(top_builddir)include/not-cancel.h:
137 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/$(@F) $@
139 $(ALL_HEADERS_BITS_COMMON):
140 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/bits/$(@F) $@
142 $(ALL_HEADERS_BITS_ARCH):
143 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(@F) $@
145 ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y)
146 $(ALL_HEADERS_BITS_COMMON_NO_LEGACY):
147 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common-generic/bits/$(@F) $@
150 ifneq ($(TARGET_SUBARCH),)
151 $(ALL_HEADERS_BITS_SUBARCH):
152 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$(@F) $@
155 ifneq ($(strip $(ALL_HEADERS_SYS_COMMON)),)
156 $(ALL_HEADERS_SYS_COMMON):
157 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/sys/$(@F) $@
160 ifneq ($(strip $(ALL_HEADERS_SYS_ARCH)),)
161 $(ALL_HEADERS_SYS_ARCH):
162 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/$(@F) $@
165 $(target-headers-sysdep) $(pregen-headers-y): | $(top_builddir)include/bits $(top_builddir)include/sys
168 $(do_rm) $(ALL_HEADERS_COMMON)
169 headers_clean-y += HEADERCLEAN_common
171 # The headers. Arch specific headers are specified via ARCH_HEADERS in
172 # libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch which appends those via
173 # libc/sysdeps/linux/Makefile.commonarch to headers-y
174 headers-y += $(target-headers-sysdep)
176 headers: $(top_builddir)include/bits/uClibc_config.h | subdirs
177 subdirs: $(addprefix $(top_builddir),$(subdirs))
178 pregen-headers: $(top_builddir)include/bits/sysnum.h $(pregen-headers-y)
179 pregen: headers pregen-headers
180 $(Q)$(if $(UCLIBC_HAS_LOCALE),$(MAKE) -C extra/locale locale_headers)
182 $(top_builddir)include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh | $(top_builddir)include/bits
185 tmp=`mktemp $(top_builddir)include/bits/sysnum.h.XXXXXX 2>/dev/null || true`; \
186 [ -z "$$tmp" ] && tmp='$(top_builddir)include/bits/sysnum.h.new'; \
187 KERNEL_HEADERS="${KERNEL_HEADERS}" CC="$(CC) $(CPU_CFLAGS)" $(SHELL) $< > $$tmp; \
188 if cmp $(top_builddir)include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
191 mv -f $$tmp $(top_builddir)include/bits/sysnum.h; \
193 @# Ugly linux specific hack..
194 $(Q)if grep -q __NR_ $@; then true; else \
196 echo "ERROR: Could not generate syscalls."; \
197 echo "Make sure that you have proper kernel headers."; \
198 echo "Your .config in KERNEL_HEADERS=\"\" was set to:"; \
199 echo "${KERNEL_HEADERS}"; \
203 .PHONY: $(LOCAL_INSTALL_PATH)
204 $(LOCAL_INSTALL_PATH):
205 $(Q)$(MAKE) PREFIX=$(shell pwd)/$(LOCAL_INSTALL_PATH) RUNTIME_PREFIX=/ \
210 install: install_runtime install_dev
213 RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)$(MULTILIB_DIR) $(RUNTIME_PREFIX)$(MULTILIB_DIR))
217 $(top_builddir)extra/scripts/unifdef: |$(top_builddir)extra/scripts
218 $(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c
221 # Installs header files.
222 # a "y" here means the feature is enabled and so we should *not* rm it.
223 # if the option expands to nothing though, we can punt the headers.
233 bits/uClibc_arch_features.h \
234 bits/kernel_sigaction.h \
236 bits/kernel_types.h \
240 bits/syscalls-common.h \
241 bits/uClibc_fpmax.h \
242 bits/uClibc_mutex.h \
243 bits/uClibc_pthread.h \
244 bits/uClibc_uintmaxtostr.h \
245 bits/uClibc_uwchar.h \
246 bits/uClibc_va_copy.h \
247 bits/sigcontextinfo.h \
253 ifeq ($(UCLIBC_STRICT_HEADERS),y)
254 HEADERS_RM- += sgtty.h
256 HEADERS_RM-$(HAVE_SHARED) += dlfcn.h bits/dlfcn.h
257 HEADERS_RM-$(PTHREADS_DEBUG_SUPPORT) += thread_db.h
258 HEADERS_RM-$(UCLIBC_HAS_BSD_ERR) += err.h
259 HEADERS_RM-$(UCLIBC_HAS_CRYPT) += crypt.h
260 HEADERS_RM-$(UCLIBC_HAS_EPOLL) += sys/epoll.h
261 HEADERS_RM-$(UCLIBC_HAS_FENV) += fenv.h bits/fenv.h bits/fenvinline.h
262 HEADERS_RM-$(UCLIBC_HAS_FLOATS) += complex.h fpu_control.h ieee754.h \
266 HEADERS_RM-$(findstring y,$(UCLIBC_HAS_FTW)$(UCLIBC_HAS_NFTW)) += ftw.h
267 HEADERS_RM-$(UCLIBC_HAS_FTS) += fts.h
268 HEADERS_RM-$(UCLIBC_HAS_GETTEXT_AWARENESS) += libintl.h
269 HEADERS_RM-$(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF) += printf.h
270 HEADERS_RM-$(UCLIBC_HAS_GLOB) += glob.h
271 HEADERS_RM-$(UCLIBC_HAS_GNU_ERROR) += error.h
272 HEADERS_RM-$(UCLIBC_HAS_GNU_GETOPT)$(UCLIBC_HAS_GETOPT_LONG) += getopt.h
273 HEADERS_RM-$(UCLIBC_HAS_IPV6) += netinet/ip6.h netinet/icmp6.h
274 HEADERS_RM-$(UCLIBC_HAS_BACKTRACE) += execinfo.h
275 HEADERS_RM-$(UCLIBC_HAS_LOCALE) += iconv.h bits/uClibc_ctype.h
276 HEADERS_RM-$(UCLIBC_HAS_PTY) += pty.h
277 HEADERS_RM-$(UCLIBC_HAS_REALTIME) += mqueue.h bits/mqueue.h sched.h \
280 HEADERS_RM-$(UCLIBC_HAS_REGEX) += regex.h regexp.h
281 HEADERS_RM-$(UCLIBC_HAS_RPC) += rpc
282 HEADERS_RM-$(UCLIBC_HAS_SHADOW) += shadow.h
283 HEADERS_RM-$(UCLIBC_HAS_SOCKET) += sys/socket.h bits/socket.h sys/socketvar.h bits/socket_type.h
284 HEADERS_RM-$(UCLIBC_HAS_SYSLOG) += syslog.h sys/syslog.h bits/syslog*.h
285 HEADERS_RM-$(UCLIBC_HAS_THREADS) += *thread*.h semaphore.h \
288 HEADERS_RM-$(UCLIBC_HAS_THREADS_NATIVE) += atomic.h bits/atomic.h
289 HEADERS_RM-$(UCLIBC_HAS_UTMPX) += bits/utmpx.h utmpx.h
290 HEADERS_RM-$(UCLIBC_HAS_WCHAR) += wchar.h wctype.h
291 HEADERS_RM-$(UCLIBC_HAS_WORDEXP) += wordexp.h
292 HEADERS_RM-$(UCLIBC_HAS_XATTR) += sys/xattr.h
293 HEADERS_RM-$(UCLIBC_HAS_XLOCALE) += xlocale.h
294 HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC) += \
317 HEADERS_RM-$(UCLIBC_SUPPORT_AI_ADDRCONFIG) += ifaddrs.h
318 HEADERS_RM-$(UCLIBC_SV4_DEPRECATED) += ustat.h sys/ustat.h bits/ustat.h
319 HEADERS_RM-$(UCLIBC_SUSV3_LEGACY) += sys/timeb.h regexp.h
320 HEADERS_RM-$(UCLIBC_SUSV4_LEGACY) += utime.h ucontext.h
321 HEADERS_RM-$(UCLIBC_HAS_ADVANCED_REALTIME) += spawn.h
323 ifneq ($(findstring install,$(MAKECMDGOALS)),)
324 $(addprefix $(PREFIX)$(DEVEL_PREFIX),include $(MULTILIB_DIR)):
326 # avoid warning about duplicate targets in rule or overrides
327 ifneq ($(abspath $(RUNTIME_PREFIX)$(MULTILIB_DIR)),$(abspath $(DEVEL_PREFIX)$(MULTILIB_DIR)))
328 $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR):
332 install_headers: headers $(top_builddir)extra/scripts/unifdef | $(PREFIX)$(DEVEL_PREFIX)include
333 @$(call disp_install,"include -> $(PREFIX)$(DEVEL_PREFIX)include")
334 $(Q)top_builddir=$(top_builddir) \
335 $(top_srcdir)extra/scripts/install_headers.sh \
336 include $(PREFIX)$(DEVEL_PREFIX)include
337 ifneq ($(O),) # only run this step in O is set i.e. make O=/my/builddir/ ..
338 @$(call disp_install,"$(top_builddir)/include -> $(PREFIX)$(DEVEL_PREFIX)include")
339 $(Q)top_builddir=$(top_builddir) \
340 $(top_srcdir)extra/scripts/install_headers.sh \
341 $(top_builddir)/include $(PREFIX)$(DEVEL_PREFIX)include
343 $(Q)cd $(PREFIX)$(DEVEL_PREFIX)include && $(RM) -r $(HEADERS_RM-)
344 ifeq ($(UCLIBC_HAS_WCHAR),)
345 $(Q)cd $(PREFIX)$(DEVEL_PREFIX)include && mv -f wchar-stub.h wchar.h
347 $(Q)cd $(PREFIX)$(DEVEL_PREFIX)include && $(RM) -f wchar-stub.h
350 # Installs startfiles
351 install_startfiles: startfiles | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)
352 -$(INSTALL) -m 644 $(startfiles) $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
354 # Installs development library links.
355 install_dev: install_headers install_runtime install_startfiles | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)
356 -$(INSTALL) -m 644 $(top_builddir)lib/*.a $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
357 ifeq ($(HAVE_SHARED),y)
358 for i in `cd $(top_builddir) && find lib/ -type l -name 'lib[a-zA-Z]*.so' | \
359 $(SED) -e 's/lib\///'` ; do \
360 $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)$$i.$(ABI_VERSION) \
361 $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/$$i; \
363 ifeq ($(HARDWIRED_ABSPATH),y)
364 if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(SHARED_LIBNAME) ] ; then \
365 $(RM) $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
366 $(SED) -e 's:$(NONSHARED_LIBNAME):$(DEVEL_PREFIX)$(MULTILIB_DIR)/$(NONSHARED_LIBNAME):' \
367 -e 's:$(SHARED_LIBNAME):$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(SHARED_LIBNAME):' \
368 -e 's:$(UCLIBC_LDSO):$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UCLIBC_LDSO):' \
369 $(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
370 $(SED) -i -e 's://:/:g' $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
373 -$(INSTALL) -m 755 $(top_builddir)lib/libc.so $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
375 echo "$(UBACKTRACE_ASNEEDED)" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so
376 ifeq ($(UCLIBC_HAS_THREADS),y)
377 ifneq ($(LINUXTHREADS_OLD),y)
378 ifeq ($(HARDWIRED_ABSPATH),y)
379 if [ -f $(top_builddir)lib/libpthread.so -a -f $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)/libpthread.so.$(ABI_VERSION) ] ; then \
380 $(RM) $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread.so; \
381 cp $(top_srcdir)extra/scripts/format.lds $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread.so; \
382 echo "GROUP ( $(RUNTIME_PREFIX)$(MULTILIB_DIR)/libpthread.so.$(ABI_VERSION) $(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread_nonshared.a )" \
383 >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread.so; \
384 $(SED) -i -e 's://:/:g' $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread.so; \
387 -$(INSTALL) -m 755 $(top_builddir)lib/libpthread.so $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
391 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
392 $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \
393 $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libthread_db.so
396 # # If we build shared libraries then the static libs are PIC...
397 # # Make _pic.a symlinks to make mklibs.py and similar tools happy.
398 if [ -d $(top_builddir)lib ] ; then \
399 for i in `cd $(top_builddir) && find lib/ -type f -name 'lib*.a' | $(SED) -e 's/lib\///'` ; do \
400 $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/`echo $$i \
401 | $(SED) -e 's/\.a$$/_pic.a/'`; \
406 ifeq ($(UCLIBC_FORMAT_SHARED_FLAT),y)
407 for file in $(top_builddir)lib/lib*.gdb; do \
408 if test -f $$file; then \
409 $(INSTALL) -m 755 $$file $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR); \
410 $(INSTALL) -m 755 `echo $$file | $(SED) 's/\.gdb$$//'` \
411 $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR); \
416 # Installs run-time libraries
417 install_runtime: all | $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)
418 ifeq ($(HAVE_SHARED),y)
419 $(INSTALL) -m 755 $(top_builddir)lib/lib*-$(VERSION).so \
420 $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)
421 (cd $(top_builddir)lib && $(TAR) --exclude=$(UCLIBC_LDSO_NAME).so.lds -cf - *.so.*) \
422 | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)
423 @if [ -x $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so ] ; then \
426 $(INSTALL) -m 755 $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so \
427 $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR); \
432 $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" -C utils $@
434 # Installs helper applications, such as 'ldd' and 'ldconfig'
436 $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" -C utils utils_install
438 endif # ifeq ($(HAVE_DOT_CONFIG),y)
441 $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils $@
443 install_hostutils: hostutils
444 $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils utils_install
446 $(addprefix $(top_builddir),include include/bits include/sys include/config lib extra/config/lxdialog extra/locale extra/scripts $(subdirs)):
450 # ---------------------------------------------------------------------------
451 $(conf) $(mconf): | $(top_builddir)include/config $(top_builddir)extra/config/lxdialog
452 $(Q)$(MAKE) -C extra/config $(@F)
454 arch-defconfigs := $(notdir $(wildcard $(top_srcdir)extra/Configs/defconfigs/$(ARCH)/*_defconfig))
457 $(Q)$< extra/Configs/Config.in
460 $(Q)$< extra/Configs/Config.in
463 $(Q)$< -o extra/Configs/Config.in
465 silentoldconfig: $(conf)
466 $(Q)$< -s extra/Configs/Config.in
469 $(Q)$< -r extra/Configs/Config.in
471 allyesconfig: $(conf)
472 $(Q)$< -y extra/Configs/Config.in
473 $(SED) -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" \
474 -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" \
475 -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" \
476 -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" \
477 -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" \
479 $(Q)$< -o extra/Configs/Config.in
482 $(Q)$< -n extra/Configs/Config.in
484 cmd_defconfig = $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in
485 defconfig: $(conf) ; $(cmd_defconfig)
486 %_defconfig: $(conf) ; $(cmd_defconfig)
489 $(Q)$(MAKE) -C extra/config CLEAN_extra/config
491 # The find here should continue to work as long as we are only symlinking
492 # headers in to include/. I don't see this changing to anything else, so
495 $(SECHO) " CLEAN include"
496 $(Q)$(RM) -r $(top_builddir)include/bits
497 $(Q)find $(top_builddir)include/ -type l -exec rm -f {} +
500 $(Q)$(RM) -r $(top_builddir)lib
501 @$(MAKE) -C utils CLEAN_utils
502 +$(MAKE) -s -C test clean
503 $(Q)$(RM) $(top_builddir)extra/scripts/unifdef
504 $(Q)$(RM) -r $(LOCAL_INSTALL_PATH)
507 -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec $(RM) {} \;
508 $(RM) $(top_builddir).config $(top_builddir).config.old $(top_builddir).config.cmd
509 $(Q)$(RM) $(top_builddir)extra/locale/*.tgz
510 @$(MAKE) -C extra/config distclean
513 $(RM) ../uClibc-$(VERSION).tar
514 git archive --format=tar --prefix=uClibc-$(VERSION)/ HEAD \
515 > ../uClibc-$(VERSION).tar
516 cat ../uClibc-$(VERSION).tar | bzip2 -c9 > ../uClibc-$(VERSION).tar.bz2
517 cat ../uClibc-$(VERSION).tar | xz -e -c8 > ../uClibc-$(VERSION).tar.xz
518 du -b ../uClibc-$(VERSION).tar.{bz2,xz}
520 test check: test_compile
523 test_compile: $(LOCAL_INSTALL_PATH)
524 $(Q)$(MAKE) -C test compile