Include bits/libc-lock.h to get __libc_once_define
[uclibc-ng.git] / Makefile.in
blob39dd18cc15d9c0d7e9915bf3bfa1ad09660acbc7
1 # Makefile for uClibc
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 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_srcdir)Rules.mak
18 sub_headers := headers
20 ifndef KCONFIG_CONFIG
21 KCONFIG_CONFIG := $(top_builddir).config
22 endif
23 export KCONFIG_CONFIG
25 ifeq ($(HAVE_DOT_CONFIG),y)
27 all: pregen libs
28 libs: pregen
30 # In this section, we need .config
31 -include $(top_builddir).config.cmd
33 else # ifeq ($(HAVE_DOT_CONFIG),y)
35 all: menuconfig
37 headers:
38 @echo "Need to make a config file first, run: make menuconfig"
39 @false
41 endif # ifeq ($(HAVE_DOT_CONFIG),y)
43 include $(top_srcdir)ldso/Makefile.in
44 include $(top_srcdir)libcrypt/Makefile.in
45 include $(top_srcdir)libintl/Makefile.in
46 include $(top_srcdir)libm/Makefile.in
47 include $(top_srcdir)libnsl/Makefile.in
48 include $(top_srcdir)libresolv/Makefile.in
49 include $(top_srcdir)libutil/Makefile.in
50 include $(top_srcdir)libpthread/Makefile.in
51 include $(top_srcdir)librt/Makefile.in
52 include $(top_srcdir)extra/locale/Makefile.in
54 # last included to catch all the objects added by others (locales/threads)
55 include $(top_srcdir)libc/Makefile.in
57 ifeq ($(HAVE_DOT_CONFIG),y)
58 # If the .config changes then we have to make sure that our includes are
59 # updated properly. This would normally work by saying that the headers
60 # have uClibc_config.h as prerequisite but since we _symlink_ the headers
61 # and do not (?) want to rely on 'make -L' we better update them right here,
62 # on spot to save us from alot of hazzle.
63 $(top_builddir)include/bits/uClibc_config.h: $(top_builddir)extra/config/conf $(KCONFIG_CONFIG) $(top_srcdir)extra/scripts/conf-header.sh | $(top_builddir)include/bits $(top_builddir)include/config
64 @$(disp_gen)
65 $(Q)@$< -s $(top_srcdir)extra/Configs/Config.in
66 $(Q)$(top_srcdir)extra/scripts/conf-header.sh $(KCONFIG_CONFIG) > $@
67 $(Q)$(MAKE) headers-y
69 # The above doesn't work for threads, though. Just using check-symlinks for now.
70 # XXX: FIXME: this is ugly
71 MAKEFLAGS += -L
73 $(top_builddir)include/config/linuxthreads/old.h $(top_builddir)include/config/linuxthreads/new.h:
74 @true
76 # For the moment, we have to keep re-running this target
77 # because the fix includes scripts rely on pre-processers
78 # in order to generate the headers correctly :(. That
79 # means we can't use the $(HOSTCC) in order to get the
80 # correct output.
81 ifeq ($(ARCH_USE_MMU),y)
82 export header_extra_args =
83 else
84 export header_extra_args = -n
85 endif
86 HEADERS_BITS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/bits/*.h))
87 HEADERS_BITS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h))
88 HEADERS_BITS_SUBARCH :=
89 ifneq ($(TARGET_SUBARCH),)
90 HEADERS_BITS_SUBARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h))
91 endif
92 HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH) $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_COMMON))
94 HEADERS_SYS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/sys/*.h))
95 HEADERS_SYS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h))
96 HEADERS_SYS_COMMON := $(filter-out $(HEADERS_SYS_ARCH),$(HEADERS_SYS_COMMON))
98 ALL_HEADERS_COMMON := $(top_builddir)include/fpu_control.h \
99 $(top_builddir)include/dl-osinfo.h \
100 $(top_builddir)include/hp-timing.h
101 ALL_HEADERS_BITS_COMMON := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_COMMON))
102 ALL_HEADERS_BITS_ARCH := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_ARCH))
103 ifneq ($(TARGET_SUBARCH),)
104 ALL_HEADERS_BITS_SUBARCH := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_SUBARCH))
105 else
106 ALL_HEADERS_BITS_SUBARCH :=
107 endif
108 ALL_HEADERS_SYS_COMMON := $(addprefix $(top_builddir)include/sys/,$(HEADERS_SYS_COMMON))
109 ALL_HEADERS_SYS_ARCH := $(addprefix $(top_builddir)include/sys/,$(HEADERS_SYS_ARCH))
111 target-headers-sysdep := \
112 $(ALL_HEADERS_COMMON) \
113 $(ALL_HEADERS_BITS_COMMON) \
114 $(ALL_HEADERS_BITS_ARCH) \
115 $(ALL_HEADERS_BITS_SUBARCH) \
116 $(ALL_HEADERS_SYS_COMMON) \
117 $(ALL_HEADERS_SYS_ARCH)
119 $(top_builddir)include/fpu_control.h:
120 @$(disp_ln)
121 $(Q)[ -r $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) ] && \
122 $(LN) -fs $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ || \
123 $(LN) -fs $(call rel_srcdir)libc/sysdeps/linux/common/$(@F) $@
125 $(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h:
126 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/$(@F) $@
128 $(ALL_HEADERS_BITS_COMMON):
129 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/bits/$(@F) $@
131 $(ALL_HEADERS_BITS_ARCH):
132 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(@F) $@
134 ifneq ($(TARGET_SUBARCH),)
135 $(ALL_HEADERS_BITS_SUBARCH):
136 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$(@F) $@
137 endif
139 ifneq ($(strip $(ALL_HEADERS_SYS_COMMON)),)
140 $(ALL_HEADERS_SYS_COMMON):
141 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/sys/$(@F) $@
142 endif
144 ifneq ($(strip $(ALL_HEADERS_SYS_ARCH)),)
145 $(ALL_HEADERS_SYS_ARCH):
146 $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/$(@F) $@
147 endif
149 $(target-headers-sysdep): | $(top_builddir)include/bits $(top_builddir)include/sys
151 sysdep_common_headers-clean:
152 $(RM) $(ALL_HEADERS_COMMON)
153 headers_clean-y += sysdep_common_headers-clean
155 # The headers. Arch specific headers are specified via ARCH_HEADERS in
156 # libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch which appends those via
157 # libc/sysdeps/linux/Makefile.commonarch to headers-y
158 headers-y += $(target-headers-sysdep)
160 headers: $(top_builddir)include/bits/uClibc_config.h
161 subdirs: $(addprefix $(top_builddir),$(subdirs))
162 pregen: $(top_builddir)include/bits/sysnum.h headers subdirs
164 $(top_builddir)include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh
165 $(Q)$(INSTALL) -d $(@D)
166 @$(disp_gen)
167 $(Q)set -e; \
168 tmp=`mktemp $(top_builddir)include/bits/sysnum.h.XXXXXX 2>/dev/null || true`; \
169 [ -z "$$tmp" ] && tmp='$(top_builddir)include/bits/sysnum.h.new'; \
170 KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir="$(top_builddir)" CC="$(CC) $(CPU_CFLAGS)" $(SHELL) $< > $$tmp; \
171 if cmp $(top_builddir)include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
172 $(RM) $$tmp; \
173 else \
174 mv -f $$tmp $(top_builddir)include/bits/sysnum.h; \
176 @# Ugly linux specific hack..
177 $(Q)if grep -q __NR_ $@; then true; else \
178 rm -f $@; \
179 echo "ERROR: Could not generate syscalls."; \
180 echo "Make sure that you have proper kernel headers."; \
181 echo "Your .config in KERNEL_HEADERS=\"\" was set to:"; \
182 echo "${KERNEL_HEADERS}"; \
183 exit 1; \
186 $(LOCAL_INSTALL_PATH):
187 $(Q)$(MAKE) PREFIX=$(shell pwd)/$(LOCAL_INSTALL_PATH) RUNTIME_PREFIX=/ \
188 DEVEL_PREFIX=/usr/ \
189 HOSTCC="$(HOSTCC)" \
190 install
192 install: install_runtime install_dev
195 RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)lib $(RUNTIME_PREFIX)lib)
197 $(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c|$(@D)
198 $(hcompile.u)
200 # Installs header files.
201 # a "y" here means the feature is enabled and so we should *not* rm it.
202 # if the option expands to nothing though, we can punt the headers.
203 HEADERS_RM- := \
204 dl-osinfo.h \
205 _lfs_64.h \
206 bits/uClibc_arch_features.h \
207 bits/kernel_sigaction.h \
208 bits/kernel_stat.h \
209 bits/kernel_types.h \
210 bits/syscalls.h \
211 bits/syscalls-common.h \
212 bits/utmpx.h \
213 bits/uClibc_errno.h \
214 bits/uClibc_uintmaxtostr.h \
215 atomic.h \
216 bits/atomic.h \
217 bits/sigcontextinfo.h \
218 bits/stackinfo.h \
219 tls.h \
220 rpc/des_crypt.h \
221 rpc/key_prot.h \
222 rpc/rpc_des.h \
223 sgtty.h
224 HEADERS_RM-$(UCLIBC_HAS_FLOATS) += \
225 complex.h \
226 fpu_control.h \
227 ieee754.h \
228 math.h \
229 tgmath.h \
230 bits/uClibc_fpmax.h \
231 bits/math*.h
232 HEADERS_RM-$(UCLIBC_HAS_GNU_GETOPT)$(UCLIBC_HAS_GETOPT_LONG) += getopt.h
233 HEADERS_RM-$(UCLIBC_HAS_REALTIME) += \
234 mqueue.h \
235 bits/mqueue.h \
236 sched.h \
237 bits/sched.h \
238 semaphore.h
239 HEADERS_RM-$(UCLIBC_HAS_THREADS) += \
240 *thread*.h \
241 semaphore.h \
242 bits/*thread*.h \
243 bits/initspin.h
244 HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC) += \
245 sys/fsuid.h \
246 sys/inotify.h \
247 sys/perm.h \
248 sys/personality.h \
249 sys/prctl.h \
250 sys/reboot.h \
251 sys/sendfile.h \
252 sys/signalfd.h \
253 bits/statfs.h \
254 sys/statfs.h \
255 sys/swap.h \
256 sys/sysctl.h \
257 sys/sysinfo.h \
258 sys/vfs.h
259 HEADERS_RM-$(HAVE_SHARED) += dlfcn.h bits/dlfcn.h
260 HEADERS_RM-$(PTHREADS_DEBUG_SUPPORT) += thread_db.h
261 HEADERS_RM-$(UCLIBC_HAS_BSD_ERR) += err.h
262 HEADERS_RM-$(UCLIBC_HAS_CRYPT) += crypt.h
263 HEADERS_RM-$(UCLIBC_HAS_EPOLL) += sys/epoll.h
264 HEADERS_RM-$(UCLIBC_HAS_FENV) += fenv.h bits/fenv.h bits/fenvinline.h
265 HEADERS_RM-$(findstring y,$(UCLIBC_HAS_FTW)$(UCLIBC_HAS_NFTW)) += ftw.h
266 HEADERS_RM-$(UCLIBC_HAS_GETTEXT_AWARENESS) += libintl.h
267 HEADERS_RM-$(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF) += printf.h
268 HEADERS_RM-$(UCLIBC_HAS_GLOB) += glob.h
269 HEADERS_RM-$(UCLIBC_HAS_GNU_ERROR) += error.h
270 HEADERS_RM-$(UCLIBC_HAS_IPV6) += netinet/ip6.h netinet/icmp6.h
271 HEADERS_RM-$(UCLIBC_HAS_LOCALE) += iconv.h
272 HEADERS_RM-$(UCLIBC_HAS_PTY) += pty.h
273 HEADERS_RM-$(UCLIBC_HAS_REGEX) += regex.h regexp.h
274 HEADERS_RM-$(UCLIBC_HAS_RPC) += rpc
275 HEADERS_RM-$(UCLIBC_HAS_SHADOW) += shadow.h
276 HEADERS_RM-$(UCLIBC_HAS_SOCKET) += sys/socket.h bits/socket.h sys/socketvar.h
277 HEADERS_RM-$(UCLIBC_HAS_SYSLOG) += syslog.h sys/syslog.h bits/syslog*.h
278 HEADERS_RM-$(UCLIBC_HAS_WCHAR) += wchar.h wctype.h
279 HEADERS_RM-$(UCLIBC_HAS_WORDEXP) += wordexp.h
280 HEADERS_RM-$(UCLIBC_HAS_XATTR) += sys/xattr.h
281 HEADERS_RM-$(UCLIBC_HAS_XLOCALE) += xlocale.h
282 HEADERS_RM-$(UCLIBC_SUPPORT_AI_ADDRCONFIG) += ifaddrs.h
283 HEADERS_RM-$(UCLIBC_SV4_DEPRECATED) += ustat.h sys/ustat.h bits/ustat.h
284 HEADERS_RM-$(UCLIBC_SUSV3_LEGACY) += sys/timeb.h regexp.h
285 HEADERS_RM-$(UCLIBC_SUSV4_LEGACY) += utime.h
286 # BREAKAGE: include/signal.h uses it, this rm broke bbox compile:
287 ### ucontext.h
289 install_headers: headers $(top_builddir)extra/scripts/unifdef
290 $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
291 top_builddir=$(top_builddir) \
292 $(top_srcdir)extra/scripts/install_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include
293 cd $(PREFIX)$(DEVEL_PREFIX)include && $(RM) -r $(HEADERS_RM-)
294 ifeq ($(UCLIBC_HAS_WCHAR),)
295 cd $(PREFIX)$(DEVEL_PREFIX)include && mv -f wchar-stub.h wchar.h
296 else
297 cd $(PREFIX)$(DEVEL_PREFIX)include && $(RM) -f wchar-stub.h
298 endif
300 # Installs development library links.
301 install_dev: install_headers all
302 $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
303 -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
304 ifeq ($(HAVE_SHARED),y)
305 for i in `find lib/ -type l -name 'lib[a-zA-Z]*.so' | \
306 $(SED) -e 's/lib\///'` ; do \
307 $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)$$i.$(MAJOR_VERSION) \
308 $(PREFIX)$(DEVEL_PREFIX)lib/$$i; \
309 done
310 ifeq ($(HARDWIRED_ABSPATH),y)
311 if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
312 $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
313 $(SED) -e 's:$(NONSHARED_LIBNAME):$(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME):' \
314 -e 's:$(SHARED_MAJORNAME):$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME):' \
315 -e 's:$(UCLIBC_LDSO):$(RUNTIME_PREFIX)lib/$(UCLIBC_LDSO):' \
316 $(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
318 else
319 -$(INSTALL) -m 755 lib/libc.so $(PREFIX)$(DEVEL_PREFIX)lib/
320 endif
321 ifeq ($(UCLIBC_HAS_THREADS),y)
322 ifneq ($(LINUXTHREADS_OLD),y)
323 ifeq ($(HARDWIRED_ABSPATH),y)
324 if [ -f $(top_builddir)lib/libpthread.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) ] ; then \
325 $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
326 cp $(top_srcdir)extra/scripts/format.lds $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
327 echo "GROUP ( $(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) $(DEVEL_PREFIX)lib/libpthread_nonshared.a )" \
328 >> $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
330 else
331 -$(INSTALL) -m 755 lib/libpthread.so $(PREFIX)$(DEVEL_PREFIX)lib/
332 endif
333 endif
334 endif
335 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
336 $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \
337 $(PREFIX)$(DEVEL_PREFIX)lib/libthread_db.so
338 endif
339 ifeq ($(DOPIC),y)
340 # # If we build shared libraries then the static libs are PIC...
341 # # Make _pic.a symlinks to make mklibs.py and similar tools happy.
342 if [ -d lib ] ; then \
343 for i in `find lib/ -type f -name 'lib*.a' | $(SED) -e 's/lib\///'` ; do \
344 $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)lib/`echo $$i \
345 | $(SED) -e 's/\.a$$/_pic.a/'`; \
346 done ; \
348 endif
349 endif
350 ifeq ($(UCLIBC_FORMAT_SHARED_FLAT),y)
351 for file in lib/lib*.gdb; do \
352 if test -f $$file; then \
353 $(INSTALL) -m 755 $$file $(PREFIX)$(DEVEL_PREFIX)lib; \
354 $(INSTALL) -m 755 `echo $$file | $(SED) 's/\.gdb$$//'` \
355 $(PREFIX)$(DEVEL_PREFIX)lib; \
356 fi; \
357 done
358 endif
360 # Installs run-time libraries
361 install_runtime: all
362 ifeq ($(HAVE_SHARED),y)
363 $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)lib
364 $(INSTALL) -m 755 lib/lib*-$(VERSION).so \
365 $(PREFIX)$(RUNTIME_PREFIX)lib
366 (cd lib && $(TAR) -cf - *.so.*) | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)lib
367 @if [ -x lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so ] ; then \
368 set -e; \
369 $(SHELL_SET_X); \
370 $(INSTALL) -m 755 lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so \
371 $(PREFIX)$(RUNTIME_PREFIX)lib; \
373 endif
375 utils:
376 $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils $@
378 # Installs helper applications, such as 'ldd' and 'ldconfig'
379 install_utils: utils
380 $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install
382 endif # ifeq ($(HAVE_DOT_CONFIG),y)
384 hostutils:
385 $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils $@
387 install_hostutils: hostutils
388 $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils utils_install
390 $(addprefix $(top_builddir),include/bits include/sys include/config extra/config/lxdialog extra/locale extra/scripts $(subdirs)):
391 $(do_mkdir)
393 # configuration
394 # ---------------------------------------------------------------------------
395 $(top_builddir)extra/config/conf $(top_builddir)extra/config/mconf: | $(top_builddir)include/config $(top_builddir)extra/config/lxdialog
396 $(Q)$(MAKE) -C extra/config $(@F)
398 menuconfig: $(top_builddir)extra/config/mconf
399 $(Q)$(top_builddir)extra/config/mconf extra/Configs/Config.in
401 config: $(top_builddir)extra/config/conf
402 $(Q)$(top_builddir)extra/config/conf extra/Configs/Config.in
404 oldconfig: $(top_builddir)extra/config/conf
405 $(Q)$(top_builddir)extra/config/conf -o extra/Configs/Config.in
407 silentoldconfig: $(top_builddir)extra/config/conf
408 $(Q)$(top_builddir)extra/config/conf -s extra/Configs/Config.in
410 randconfig: $(top_builddir)extra/config/conf
411 $(Q)$(top_builddir)extra/config/conf -r extra/Configs/Config.in
413 allyesconfig: $(top_builddir)extra/config/conf
414 $(Q)$(top_builddir)extra/config/conf -y extra/Configs/Config.in
415 $(SED) -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" \
416 -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" \
417 -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" \
418 -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" \
419 -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" \
420 $(KCONFIG_CONFIG)
421 $(Q)$(top_builddir)extra/config/conf -o extra/Configs/Config.in
423 allnoconfig: $(top_builddir)extra/config/conf
424 $(Q)$(top_builddir)extra/config/conf -n extra/Configs/Config.in
426 defconfig: $(top_builddir)extra/config/conf
427 $(Q)$(top_builddir)extra/config/conf -d extra/Configs/Config.in \
428 -D extra/Configs/defconfigs/$(ARCH)
430 menuconfig-clean-y:
431 $(Q)$(MAKE) -C extra/config menuconfig_clean
433 include_clean:
434 $(Q)$(RM) $(top_builddir)include/fpu_control.h $(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h
435 @set -e; \
436 for i in `(cd libc/sysdeps/linux/common/sys; ls *.h)` ; do \
437 $(RM) $(top_builddir)include/sys/$$i; \
438 done; \
439 if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
440 for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \
441 $(RM) $(top_builddir)include/sys/$$i; \
442 done; \
445 clean: include_clean
446 $(Q)$(RM) -r $(top_builddir)lib $(top_builddir)include/bits
447 @$(MAKE) -C utils utils_clean
448 +$(MAKE) -s -C test clean
449 @$(RM) $(top_builddir)include/linux $(top_builddir)include/asm*
450 $(Q)$(RM) $(top_builddir)extra/scripts/unifdef
451 $(Q)$(RM) -r $(LOCAL_INSTALL_PATH)
453 distclean: clean
454 -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec $(RM) {} \;
455 $(RM) $(top_builddir).config $(top_builddir).config.old $(top_builddir).config.cmd
456 $(RM) $(top_builddir)extra/locale/*.tgz
457 $(MAKE) -C extra/config distclean
459 dist release:
460 $(RM) -r ../uClibc-$(VERSION) ../uClibc-$(VERSION).tar.bz2
461 mkdir -p ../uClibc-$(VERSION)
462 git archive HEAD |(cd ../uClibc-$(VERSION) && $(TAR) xf -)
463 $(TAR) cjf ../uClibc-$(VERSION).tar.bz2 -C .. uClibc-$(VERSION)
464 du -b ../uClibc-$(VERSION).tar.bz2
466 test check: test_compile
467 $(Q)$(MAKE) -C test
469 test_compile: $(LOCAL_INSTALL_PATH)
470 $(Q)$(MAKE) -C test compile