3 # Copyright (C) 2000-2005 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 clean_targets := clean realclean distclean \
12 objclean-y headers_clean-y utils_clean
13 noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \
14 defconfig allyesconfig allnoconfig \
15 release dist tags help
17 include $(top_builddir)Rules.mak
18 sub_headers := headers
20 #suspicious_dependency:=include/bits
22 ifeq ($(HAVE_DOT_CONFIG),y)
26 # In this section, we need .config
29 else # ifeq ($(HAVE_DOT_CONFIG),y)
34 @echo "Need to make a config file first, run: make menuconfig"
37 endif # ifeq ($(HAVE_DOT_CONFIG),y)
39 include $(top_srcdir)ldso/Makefile.in
40 include $(top_srcdir)libcrypt/Makefile.in
41 include $(top_srcdir)libintl/Makefile.in
42 include $(top_srcdir)libm/Makefile.in
43 include $(top_srcdir)libnsl/Makefile.in
44 include $(top_srcdir)libresolv/Makefile.in
45 include $(top_srcdir)libutil/Makefile.in
46 include $(top_srcdir)libpthread/Makefile.in
47 include $(top_srcdir)librt/Makefile.in
48 include $(top_srcdir)extra/locale/Makefile.in
50 # last included to catch all the objects added by others (locales/threads)
51 include $(top_srcdir)libc/Makefile.in
53 ifeq ($(HAVE_DOT_CONFIG),y)
54 # If the .config changes then we have to make sure that our includes are
55 # updated properly. This would normally work by saying that the headers
56 # have uClibc_config.h as prerequisite but since we _symlink_ the headers
57 # and do not (?) want to rely on 'make -L' we better update them right here,
58 # on spot to save us from alot of hazzle.
59 include/bits/uClibc_config.h: extra/config/conf .config $(top_srcdir)extra/scripts/conf-header.sh | include/bits
61 @#superfluous: $(Q)$(INSTALL) -d $(dir $@)
62 $(Q)@$< -s $(top_srcdir)extra/Configs/Config.in
63 $(Q)$(top_srcdir)extra/scripts/conf-header.sh .config > $@
66 # For the moment, we have to keep re-running this target
67 # because the fix includes scripts rely on pre-processers
68 # in order to generate the headers correctly :(. That
69 # means we can't use the $(HOSTCC) in order to get the
71 ifeq ($(ARCH_USE_MMU),y)
72 export header_extra_args =
74 export header_extra_args = -n
76 HEADERS_BITS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/bits/*.h))
77 HEADERS_BITS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h))
78 HEADERS_BITS_SUBARCH :=
79 ifneq ($(TARGET_SUBARCH),)
80 HEADERS_BITS_SUBARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h))
82 HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH) $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_COMMON))
84 HEADERS_SYS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/sys/*.h))
85 HEADERS_SYS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h))
86 HEADERS_SYS_COMMON := $(filter-out $(HEADERS_SYS_ARCH),$(HEADERS_SYS_COMMON))
88 ALL_HEADERS_COMMON := include/fpu_control.h include/dl-osinfo.h \
90 ALL_HEADERS_BITS_COMMON := $(addprefix include/bits/,$(HEADERS_BITS_COMMON))
91 ALL_HEADERS_BITS_ARCH := $(addprefix include/bits/,$(HEADERS_BITS_ARCH))
92 ifneq ($(TARGET_SUBARCH),)
93 ALL_HEADERS_BITS_SUBARCH := $(addprefix include/bits/,$(HEADERS_BITS_SUBARCH))
95 ALL_HEADERS_BITS_SUBARCH :=
97 ALL_HEADERS_SYS_COMMON := $(addprefix include/sys/,$(HEADERS_SYS_COMMON))
98 ALL_HEADERS_SYS_ARCH := $(addprefix include/sys/,$(HEADERS_SYS_ARCH))
100 target-headers-sysdep := \
101 $(ALL_HEADERS_COMMON) \
102 $(ALL_HEADERS_BITS_COMMON) \
103 $(ALL_HEADERS_BITS_ARCH) \
104 $(ALL_HEADERS_BITS_SUBARCH) \
105 $(ALL_HEADERS_SYS_COMMON) \
106 $(ALL_HEADERS_SYS_ARCH)
108 include/fpu_control.h:
110 $(Q)[ -r libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) ] && \
111 $(LN) -fs ../libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ || \
112 $(LN) -fs ../libc/sysdeps/linux/common/$(@F) $@
114 include/dl-osinfo.h include/hp-timing.h:
115 $(do_ln) ../libc/sysdeps/linux/common/$(@F) $@
117 $(ALL_HEADERS_BITS_COMMON):
118 $(do_ln) ../../libc/sysdeps/linux/common/bits/$(@F) $@
120 $(ALL_HEADERS_BITS_ARCH):
121 $(do_ln) ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(@F) $@
123 ifneq ($(TARGET_SUBARCH),)
124 $(ALL_HEADERS_BITS_SUBARCH):
125 $(do_ln) ../../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$(@F) $@
128 ifneq ($(strip $(ALL_HEADERS_SYS_COMMON)),)
129 $(ALL_HEADERS_SYS_COMMON):
130 $(do_ln) ../../libc/sysdeps/linux/common/sys/$(@F) $@
133 ifneq ($(strip $(ALL_HEADERS_SYS_ARCH)),)
134 $(ALL_HEADERS_SYS_ARCH):
135 $(do_ln) ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys/$(@F) $@
138 $(target-headers-sysdep): | include/bits
140 sysdep_common_headers-clean:
141 $(RM) $(ALL_HEADERS_COMMON)
142 headers_clean-y += sysdep_common_headers-clean
144 # The headers. Arch specific headers are specified via ARCH_HEADERS in
145 # libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch which appends those via
146 # libc/sysdeps/linux/Makefile.commonarch to headers-y
147 headers-y += $(target-headers-sysdep)
149 headers: include/bits/uClibc_config.h
151 pregen: include/bits/sysnum.h headers
152 $(Q)$(if $(UCLIBC_HAS_LOCALE),$(MAKE) -C extra/locale locale_headers)
154 include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh
155 $(Q)$(INSTALL) -d $(@D)
158 cd $(top_builddir); \
159 tmp=`mktemp include/bits/sysnum.h.XXXXXX 2>/dev/null`; \
160 [ -z "$$tmp" ] && tmp='include/bits/sysnum.h.new'; \
161 KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir=. CC="$(CC) $(CPU_CFLAGS)" $(SHELL) extra/scripts/gen_bits_syscall_h.sh > $$tmp; \
162 if cmp include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
165 mv -f $$tmp include/bits/sysnum.h; \
168 $(LOCAL_INSTALL_PATH):
169 $(Q)$(MAKE) PREFIX=$(shell pwd)/ RUNTIME_PREFIX=./ \
170 DEVEL_PREFIX=$(LOCAL_INSTALL_PATH)/usr/ \
172 install_kernel_headers
173 $(Q)$(MAKE) PREFIX=$(shell pwd)/ RUNTIME_PREFIX=./ \
174 DEVEL_PREFIX=$(LOCAL_INSTALL_PATH)/usr/ \
178 install: install_runtime install_dev
181 RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)lib $(RUNTIME_PREFIX)lib)
183 $(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c
186 # Installs kernel header files (linux/*, asm/*, asm-generic/*).
187 install_kernel_headers: headers
188 top_builddir=$(top_builddir) \
189 $(top_srcdir)extra/scripts/install_kernel_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include
191 # Installs header files.
192 install_headers: headers $(top_builddir)extra/scripts/unifdef
193 $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
194 top_builddir=$(top_builddir) \
195 $(top_srcdir)extra/scripts/install_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include
196 printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' > \
197 $(PREFIX)$(DEVEL_PREFIX)include/libc-internal.h
198 echo '/* Dont use _syscall#() macros; use the syscall() function */' > \
199 $(PREFIX)$(DEVEL_PREFIX)include/bits/syscalls.h
200 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/dl-osinfo.h
201 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/_lfs_64.h
202 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_uintmaxtostr.h
203 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_sigaction.h
204 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_stat.h
205 ifneq ($(UCLIBC_HAS_FLOATS),y)
206 # Remove floating point related headers since float support is disabled.
207 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/complex.h
208 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fpu_control.h
209 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ieee754.h
210 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/math.h
211 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tgmath.h
212 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_fpmax.h
214 ifneq ($(UCLIBC_HAS_FENV),y)
215 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fenv.h \
216 $(PREFIX)$(DEVEL_PREFIX)include/bits/fenv.h \
217 $(PREFIX)$(DEVEL_PREFIX)include/bits/fenvinline.h
219 ifneq ($(UCLIBC_HAS_WCHAR),y)
220 # Remove wide char headers since wide char support is disabled.
221 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wctype.h
222 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wchar.h
224 ifneq ($(UCLIBC_HAS_LOCALE),y)
225 # Remove iconv header since locale support is disabled.
226 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/iconv.h
228 ifneq ($(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF),y)
229 # Remove printf header since custom print specifier support is disabled.
230 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/printf.h
232 ifneq ($(UCLIBC_HAS_XLOCALE),y)
233 # Remove xlocale header since extended locale support is disabled.
234 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/xlocale.h
236 ifneq ($(UCLIBC_HAS_GETTEXT_AWARENESS),y)
237 # Remove libintl header since gettext support is disabled.
238 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/libintl.h
240 ifneq ($(UCLIBC_HAS_REGEX),y)
241 # Remove regex headers since regex support is disabled.
242 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regex.h
243 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regexp.h
245 ifneq ($(UCLIBC_HAS_WORDEXP),y)
246 # Remove wordexp header since wordexp support is disabled.
247 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wordexp.h
249 ifneq ($(UCLIBC_HAS_FTW),y)
250 # Remove ftw header since ftw support is disabled.
251 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ftw.h
253 ifneq ($(UCLIBC_HAS_GLOB),y)
254 # Remove glob header since glob support is disabled.
255 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/glob.h
257 ifneq ($(UCLIBC_HAS_GNU_GETOPT),y)
258 ifneq ($(UCLIBC_HAS_GETOPT_LONG),y)
259 # Remove getopt header since gnu getopt support is disabled.
260 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/getopt.h
263 ifneq ($(UCLIBC_HAS_SHADOW),y)
264 # Remove shadow header since shadow password support is disabled.
265 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/shadow.h
267 ifneq ($(PTHREADS_DEBUG_SUPPORT),y)
268 # Remove thread_db header since thread debug support is disabled.
269 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/thread_db.h
271 ifneq ($(UCLIBC_HAS_THREADS),y)
272 # Remove pthread headers since thread support is disabled.
273 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/*thread*.h
274 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h
275 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/*thread*.h
277 ifneq ($(HAVE_SHARED),y)
278 # Remove dlfcn header if we don't have shared libraries.
279 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/dlfcn.h
280 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/dlfcn.h
282 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
283 # Remove this as it is only used internally.
284 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tls.h
286 ifneq ($(UCLIBC_HAS_GNU_ERROR),y)
287 # Remove error.h upon request
288 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/error.h
290 ifneq ($(UCLIBC_HAS_BSD_ERR),y)
291 # Remove err.h upon request
292 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/err.h
294 ifneq ($(UCLIBC_SUSV3_LEGACY),y)
295 # Remove timeb.h since the LEGACY ftime() was disabled upon request
296 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/timeb.h
298 ifneq ($(UCLIBC_HAS_EPOLL),y)
299 # Remove epoll.h since epoll_*() were disabled upon request
300 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/epoll.h
302 ifneq ($(UCLIBC_HAS_XATTR),y)
303 # Remove xattr.h since extended attributes were disabled upon request
304 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/xattr.h
306 ifneq ($(UCLIBC_HAS_PTY),y)
307 # Remove pty.h since PTY support was disabled upon request
308 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/pty.h
310 ifneq ($(UCLIBC_LINUX_SPECIFIC),y)
311 # Remove linux-specific headers as requested
312 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/inotify.h
313 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/perm.h
314 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/personality.h
316 ifneq ($(UCLIBC_SV4_DEPRECATED),y)
317 # Remove ustat.h since deprecated SV4 support was disabled upon request
318 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ustat.h
319 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/ustat.h
320 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/ustat.h
322 ifeq ($(UCLIBC_HAS_REALTIME)$(UCLIBC_HAS_ADVANCED_REALTIME),)
323 # Remove SUSv-realtime related message-queue headers upon request
324 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/mqueue.h
325 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/mqueue.h
326 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/mqueue.h
328 ifneq ($(UCLIBC_HAS_REALTIME),y)
329 # Remove SUSv-realtime related headers upon request
330 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sched.h
331 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sched.h
332 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/sched.h
333 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h
334 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/semaphore.h
335 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/semaphore.h
337 ifneq ($(UCLIBC_HAS_SOCKET),y)
338 # Remove socket related headers upon request
339 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/socket.h
340 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/socket.h
341 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/socketvar.h
343 ifneq ($(UCLIBC_HAS_CRYPT),y)
344 # Remove crypt.h since libcrypt was disabled upon request
345 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/crypt.h
347 ifneq ($(UCLIBC_SUPPORT_AI_ADDRCONFIG),y)
348 # Remove ifaddrs.h since the corresponding functionality is disabled
349 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ifaddrs.h
352 # Installs development library links.
353 install_dev: install_headers
354 $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
355 -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
356 ifeq ($(HAVE_SHARED),y)
357 for i in `find lib/ -type l -name 'lib[a-zA-Z]*.so' | \
358 sed -e 's/lib\///'` ; do \
359 $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)$$i.$(MAJOR_VERSION) \
360 $(PREFIX)$(DEVEL_PREFIX)lib/$$i; \
362 if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
363 $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
364 sed -e 's:$(NONSHARED_LIBNAME):$(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME):' \
365 -e 's:$(SHARED_MAJORNAME):$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME):' \
366 -e 's:$(UCLIBC_LDSO):$(RUNTIME_PREFIX)lib/$(UCLIBC_LDSO):' \
367 $(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
369 ifeq ($(UCLIBC_HAS_THREADS),y)
370 ifneq ($(LINUXTHREADS_OLD),y)
371 if [ -f $(top_builddir)lib/libpthread.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) ] ; then \
372 $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
373 cp $(top_srcdir)extra/scripts/format.lds $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
374 echo "GROUP ( $(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) $(DEVEL_PREFIX)lib/libpthread_nonshared.a )" \
375 >> $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
379 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
380 $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \
381 $(PREFIX)$(DEVEL_PREFIX)lib/libthread_db.so
384 # # If we build shared libraries then the static libs are PIC...
385 # # Make _pic.a symlinks to make mklibs.py and similar tools happy.
386 if [ -d lib ] ; then \
387 for i in `find lib/ -type f -name 'lib*.a' | sed -e 's/lib\///'` ; do \
388 $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)lib/`echo $$i \
389 | sed -e 's/\.a$$/_pic.a/'`; \
394 ifeq ($(UCLIBC_FORMAT_SHARED_FLAT),y)
395 for file in lib/lib*.gdb; do \
396 if test -f $$file; then \
397 $(INSTALL) -m 755 $$file $(PREFIX)$(DEVEL_PREFIX)lib; \
398 $(INSTALL) -m 755 `echo $$file | sed 's/\.gdb$$//'` \
399 $(PREFIX)$(DEVEL_PREFIX)lib; \
404 # Installs run-time libraries
406 ifeq ($(HAVE_SHARED),y)
407 $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)lib
408 $(INSTALL) -m 644 lib/lib*-$(VERSION).so \
409 $(PREFIX)$(RUNTIME_PREFIX)lib
410 cd lib && $(TAR) -cf - *.so.* | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)lib
411 @if [ -x lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so ] ; then \
414 $(INSTALL) -m 755 lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so \
415 $(PREFIX)$(RUNTIME_PREFIX)lib; \
420 $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils
422 # Installs helper applications, such as 'ldd' and 'ldconfig'
424 $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install
426 endif # ifeq ($(HAVE_DOT_CONFIG),y)
433 # ---------------------------------------------------------------------------
434 extra/config/conf extra/config/mconf: $(suspicious_dependency)
435 $(Q)$(MAKE) -C extra/config $(notdir $@)
437 menuconfig: extra/config/mconf $(suspicious_dependency)
438 $(Q)./extra/config/mconf extra/Configs/Config.in
440 config: extra/config/conf $(suspicious_dependency)
441 $(Q)./extra/config/conf extra/Configs/Config.in
443 oldconfig: extra/config/conf $(suspicious_dependency)
444 $(Q)./extra/config/conf -o extra/Configs/Config.in
446 silentoldconfig: extra/config/conf $(suspicious_dependency)
447 $(Q)./extra/config/conf -s extra/Configs/Config.in
449 randconfig: extra/config/conf $(suspicious_dependency)
450 $(Q)./extra/config/conf -r extra/Configs/Config.in
452 allyesconfig: extra/config/conf $(suspicious_dependency)
453 $(Q)./extra/config/conf -y extra/Configs/Config.in
454 sed -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" .config
455 sed -i -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" .config
456 sed -i -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" .config
457 sed -i -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" .config
458 sed -i -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" .config
459 $(Q)./extra/config/conf -o extra/Configs/Config.in
461 allnoconfig: extra/config/conf $(suspicious_dependency)
462 $(Q)./extra/config/conf -n extra/Configs/Config.in
464 defconfig: extra/config/conf $(suspicious_dependency)
465 $(Q)./extra/config/conf -d extra/Configs/Config.in \
466 -D extra/Configs/defconfigs/$(ARCH)
469 $(Q)$(RM) -r lib include/bits
470 $(RM) ldso/*/*.a libpthread/*/*.a libc/*.a libcrypt/*.a libintl/*.a \
471 libm/*.a libnsl/*.a libpthread/*.a libresolv/*.a librt/*.a \
472 libutil/*.a lib/*.a \
473 include/fpu_control.h include/dl-osinfo.h include/hp-timing.h
474 +$(MAKE) -s -C test clean
475 +$(MAKE) -C utils utils_clean
477 for i in `(cd libc/sysdeps/linux/common/sys; ls *.h)` ; do \
478 $(RM) include/sys/$$i; \
480 if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
481 for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \
482 $(RM) include/sys/$$i; \
485 @$(RM) include/linux include/asm*
486 $(RM) $(top_builddir)extra/scripts/unifdef
487 $(RM) -r $(LOCAL_INSTALL_PATH)
490 -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec $(RM) {} \;
491 $(RM) .config .config.old .config.cmd
492 $(RM) extra/locale/*.tgz
493 $(MAKE) -C extra/config distclean
496 $(RM) -r ../uClibc-$(VERSION) ../uClibc-$(VERSION).tar.bz2
497 svn -q export . ../uClibc-$(VERSION)
498 $(TAR) cjf ../uClibc-$(VERSION).tar.bz2 -C .. uClibc-$(VERSION)
499 du -b ../uClibc-$(VERSION).tar.bz2
501 test check: test_compile
504 test_compile: $(LOCAL_INSTALL_PATH)
505 $(Q)$(MAKE) -C test compile