Makefile.in 16 KB

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