Makefile.in 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2005 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. noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \
  11. defconfig allyesconfig allnoconfig clean distclean \
  12. release dist tags
  13. include $(top_builddir)Rules.mak
  14. sub_headers := headers
  15. ifeq ($(HAVE_DOT_CONFIG),y)
  16. all: pregen libs
  17. # In this section, we need .config
  18. -include .config.cmd
  19. include $(top_srcdir)ldso/Makefile.in
  20. include $(top_srcdir)libcrypt/Makefile.in
  21. include $(top_srcdir)libintl/Makefile.in
  22. include $(top_srcdir)libm/Makefile.in
  23. include $(top_srcdir)libnsl/Makefile.in
  24. include $(top_srcdir)libresolv/Makefile.in
  25. include $(top_srcdir)libutil/Makefile.in
  26. include $(top_srcdir)libpthread/Makefile.in
  27. include $(top_srcdir)librt/Makefile.in
  28. include $(top_srcdir)extra/locale/Makefile.in
  29. # last included to catch all the objects added by others (locales/threads)
  30. include $(top_srcdir)libc/Makefile.in
  31. include/bits/uClibc_config.h: extra/config/conf .config
  32. $(Q)$(INSTALL) -d $(dir $@)
  33. $(Q)@$< -o $(top_srcdir)extra/Configs/Config.in
  34. $(top_srcdir)extra/scripts/conf-header.sh .config > include/bits/uClibc_config.h
  35. # For the moment, we have to keep re-running this target
  36. # because the fix includes scripts rely on pre-processers
  37. # in order to generate the headers correctly :(. That
  38. # means we can't use the $(HOSTCC) in order to get the
  39. # correct output.
  40. ifeq ($(ARCH_USE_MMU),y)
  41. export header_extra_args =
  42. else
  43. export header_extra_args = -n
  44. endif
  45. HEADERS_BITS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/bits/*.h))
  46. HEADERS_BITS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h))
  47. HEADERS_BITS_SUBARCH :=
  48. ifneq ($(TARGET_SUBARCH),)
  49. HEADERS_BITS_SUBARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h))
  50. endif
  51. HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH),$(HEADERS_BITS_COMMON))
  52. headers: include/bits/uClibc_config.h
  53. $(Q)$(MAKE) headers-y
  54. $(Q)\
  55. set -e; \
  56. if [ -e libc/sysdeps/linux/$(TARGET_ARCH)/fpu_control.h ] ; then \
  57. $(LN) -fs ../libc/sysdeps/linux/$(TARGET_ARCH)/fpu_control.h include/ ; \
  58. else \
  59. $(LN) -fs ../libc/sysdeps/linux/common/fpu_control.h include/ ; \
  60. fi; \
  61. for f in dl-osinfo.h hp-timing.h ; do \
  62. $(LN) -fs ../libc/sysdeps/linux/common/$$f include/ ; \
  63. done
  64. $(Q)\
  65. cd include/bits; \
  66. set -e; \
  67. for i in $(HEADERS_BITS_COMMON) ; do \
  68. $(LN) -fs ../../libc/sysdeps/linux/common/bits/$$i .; \
  69. done; \
  70. for i in $(HEADERS_BITS_ARCH) ; do \
  71. $(LN) -fs ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$$i .; \
  72. done; \
  73. for i in $(HEADERS_BITS_SUBARCH) ; do \
  74. $(LN) -fs ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$$i .; \
  75. done
  76. $(Q)\
  77. cd include/sys; \
  78. set -e; \
  79. for i in `ls ../../libc/sysdeps/linux/common/sys/*.h` ; do \
  80. $(LN) -fs $$i .; \
  81. done; \
  82. if [ -d ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
  83. for i in `ls ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h` ; do \
  84. $(LN) -fs $$i .; \
  85. done; \
  86. fi
  87. ifeq ($(UCLIBC_HAS_LOCALE),y)
  88. $(MAKE) -C extra/locale locale_headers
  89. endif
  90. pregen: headers
  91. $(Q)\
  92. set -e; \
  93. cd $(top_builddir); \
  94. tmp=`mktemp include/bits/sysnum.h.XXXXXX 2>/dev/null`; \
  95. [ -z "$$tmp" ] && tmp='include/bits/sysnum.h.new'; \
  96. KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir=. CC="$(CC) $(CPU_CFLAGS)" $(SHELL) extra/scripts/gen_bits_syscall_h.sh > $$tmp; \
  97. if cmp include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
  98. $(RM) $$tmp; \
  99. else \
  100. mv -f $$tmp include/bits/sysnum.h; \
  101. fi
  102. install: install_runtime install_dev
  103. RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)lib $(RUNTIME_PREFIX)lib)
  104. $(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c
  105. $(hcompile.u)
  106. # Installs kernel header files (linux/*, asm/*, asm-generic/*).
  107. install_kernel_headers: headers
  108. top_builddir=$(top_builddir) \
  109. $(top_srcdir)extra/scripts/install_kernel_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include
  110. # Installs header files.
  111. install_headers: headers $(top_builddir)extra/scripts/unifdef
  112. $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
  113. top_builddir=$(top_builddir) \
  114. $(top_srcdir)extra/scripts/install_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include
  115. printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' > \
  116. $(PREFIX)$(DEVEL_PREFIX)include/libc-internal.h
  117. echo '/* Dont use _syscall#() macros; use the syscall() function */' > \
  118. $(PREFIX)$(DEVEL_PREFIX)include/bits/syscalls.h
  119. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/dl-osinfo.h
  120. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/_lfs_64.h
  121. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_uintmaxtostr.h
  122. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_sigaction.h
  123. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_stat.h
  124. ifneq ($(UCLIBC_HAS_FLOATS),y)
  125. # Remove floating point related headers since float support is disabled.
  126. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/complex.h
  127. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fpu_control.h
  128. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ieee754.h
  129. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/math.h
  130. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tgmath.h
  131. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_fpmax.h
  132. endif
  133. ifneq ($(UCLIBC_HAS_FENV),y)
  134. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fenv.h \
  135. $(PREFIX)$(DEVEL_PREFIX)include/bits/fenv.h \
  136. $(PREFIX)$(DEVEL_PREFIX)include/bits/fenvinline.h
  137. endif
  138. ifneq ($(UCLIBC_HAS_WCHAR),y)
  139. # Remove wide char headers since wide char support is disabled.
  140. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wctype.h
  141. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wchar.h
  142. endif
  143. ifneq ($(UCLIBC_HAS_LOCALE),y)
  144. # Remove iconv header since locale support is disabled.
  145. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/iconv.h
  146. endif
  147. ifneq ($(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF),y)
  148. # Remove printf header since custom print specifier support is disabled.
  149. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/printf.h
  150. endif
  151. ifneq ($(UCLIBC_HAS_XLOCALE),y)
  152. # Remove xlocale header since extended locale support is disabled.
  153. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/xlocale.h
  154. endif
  155. ifneq ($(UCLIBC_HAS_GETTEXT_AWARENESS),y)
  156. # Remove libintl header since gettext support is disabled.
  157. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/libintl.h
  158. endif
  159. ifneq ($(UCLIBC_HAS_REGEX),y)
  160. # Remove regex headers since regex support is disabled.
  161. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regex.h
  162. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regexp.h
  163. endif
  164. ifneq ($(UCLIBC_HAS_WORDEXP),y)
  165. # Remove wordexp header since wordexp support is disabled.
  166. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wordexp.h
  167. endif
  168. ifneq ($(UCLIBC_HAS_FTW),y)
  169. # Remove ftw header since ftw support is disabled.
  170. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ftw.h
  171. endif
  172. ifneq ($(UCLIBC_HAS_GLOB),y)
  173. # Remove glob header since glob support is disabled.
  174. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/glob.h
  175. endif
  176. ifneq ($(UCLIBC_HAS_GNU_GETOPT),y)
  177. ifneq ($(UCLIBC_HAS_GETOPT_LONG),y)
  178. # Remove getopt header since gnu getopt support is disabled.
  179. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/getopt.h
  180. endif
  181. endif
  182. ifneq ($(UCLIBC_HAS_SHADOW),y)
  183. # Remove shadow header since shadow password support is disabled.
  184. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/shadow.h
  185. endif
  186. ifneq ($(PTHREADS_DEBUG_SUPPORT),y)
  187. # Remove thread_db header since thread debug support is disabled.
  188. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/thread_db.h
  189. endif
  190. ifneq ($(UCLIBC_HAS_THREADS),y)
  191. # Remove pthread headers since thread support is disabled.
  192. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/*thread*.h
  193. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h
  194. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/*thread*.h
  195. endif
  196. ifneq ($(HAVE_SHARED),y)
  197. # Remove dlfcn header if we don't have shared libraries.
  198. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/dlfcn.h
  199. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/dlfcn.h
  200. endif
  201. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  202. # Remove this as it is only used internally.
  203. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tls.h
  204. endif
  205. ifneq ($(UCLIBC_HAS_GNU_ERROR),y)
  206. # Remove error.h upon request
  207. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/error.h
  208. endif
  209. ifneq ($(UCLIBC_HAS_BSD_ERR),y)
  210. # Remove err.h upon request
  211. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/err.h
  212. endif
  213. ifneq ($(UCLIBC_SUSV3_LEGACY),y)
  214. # Remove timeb.h since the LEGACY ftime() was disabled upon request
  215. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/timeb.h
  216. endif
  217. ifneq ($(UCLIBC_HAS_EPOLL),y)
  218. # Remove epoll.h since epoll_*() were disabled upon request
  219. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/epoll.h
  220. endif
  221. ifneq ($(UCLIBC_HAS_XATTR),y)
  222. # Remove xattr.h since extended attributes were disabled upon request
  223. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/xattr.h
  224. endif
  225. ifneq ($(UCLIBC_HAS_PTY),y)
  226. # Remove pty.h since PTY support was disabled upon request
  227. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/pty.h
  228. endif
  229. ifneq ($(UCLIBC_LINUX_SPECIFIC),y)
  230. # Remove linux-specific headers as requested
  231. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/inotify.h
  232. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/perm.h
  233. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/personality.h
  234. endif
  235. ifneq ($(UCLIBC_SV4_DEPRECATED),y)
  236. # Remove ustat.h since deprecated SV4 support was disabled upon request
  237. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ustat.h
  238. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/ustat.h
  239. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/ustat.h
  240. endif
  241. ifeq ($(UCLIBC_HAS_REALTIME)$(UCLIBC_HAS_ADVANCED_REALTIME),)
  242. # Remove SUSv-realtime related message-queue headers upon request
  243. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/mqueue.h
  244. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/mqueue.h
  245. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/mqueue.h
  246. endif
  247. ifneq ($(UCLIBC_HAS_REALTIME),y)
  248. # Remove SUSv-realtime related headers upon request
  249. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sched.h
  250. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sched.h
  251. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/sched.h
  252. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h
  253. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/semaphore.h
  254. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/semaphore.h
  255. endif
  256. ifneq ($(UCLIBC_HAS_SOCKET),y)
  257. # Remove socket related headers upon request
  258. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/socket.h
  259. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/socket.h
  260. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/socketvar.h
  261. endif
  262. ifneq ($(UCLIBC_HAS_CRYPT),y)
  263. # Remove crypt.h since libcrypt was disabled upon request
  264. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/crypt.h
  265. endif
  266. # Installs development library links.
  267. install_dev: install_headers
  268. $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
  269. -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
  270. ifeq ($(HAVE_SHARED),y)
  271. for i in `find lib/ -type l -name 'lib[a-zA-Z]*.so' | \
  272. sed -e 's/lib\///'` ; do \
  273. $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)$$i.$(MAJOR_VERSION) \
  274. $(PREFIX)$(DEVEL_PREFIX)lib/$$i; \
  275. done
  276. if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
  277. $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
  278. sed -e 's:$(NONSHARED_LIBNAME):$(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME):' \
  279. -e 's:$(SHARED_MAJORNAME):$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME):' \
  280. -e 's:$(UCLIBC_LDSO):$(RUNTIME_PREFIX)lib/$(UCLIBC_LDSO):' \
  281. $(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
  282. fi
  283. ifeq ($(UCLIBC_HAS_THREADS),y)
  284. ifneq ($(LINUXTHREADS_OLD),y)
  285. if [ -f $(top_builddir)lib/libpthread.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) ] ; then \
  286. $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
  287. cp $(top_srcdir)extra/scripts/format.lds $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
  288. echo "GROUP ( $(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) $(DEVEL_PREFIX)lib/libpthread_nonshared.a )" \
  289. >> $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
  290. fi
  291. endif
  292. endif
  293. ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
  294. $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \
  295. $(PREFIX)$(DEVEL_PREFIX)lib/libthread_db.so
  296. endif
  297. ifeq ($(DOPIC),y)
  298. # # If we build shared libraries then the static libs are PIC...
  299. # # Make _pic.a symlinks to make mklibs.py and similar tools happy.
  300. if [ -d lib ] ; then \
  301. for i in `find lib/ -type f -name 'lib*.a' | sed -e 's/lib\///'` ; do \
  302. $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)lib/`echo $$i \
  303. | sed -e 's/\.a$$/_pic.a/'`; \
  304. done ; \
  305. fi
  306. endif
  307. endif
  308. ifeq ($(UCLIBC_FORMAT_SHARED_FLAT),y)
  309. for file in lib/lib*.gdb; do \
  310. if test -f $$file; then \
  311. $(INSTALL) -m 755 $$file $(PREFIX)$(DEVEL_PREFIX)lib; \
  312. $(INSTALL) -m 755 `echo $$file | sed 's/\.gdb$$//'` \
  313. $(PREFIX)$(DEVEL_PREFIX)lib; \
  314. fi; \
  315. done
  316. endif
  317. # Installs run-time libraries
  318. install_runtime:
  319. ifeq ($(HAVE_SHARED),y)
  320. $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)lib
  321. $(INSTALL) -m 644 lib/lib*-$(VERSION).so \
  322. $(PREFIX)$(RUNTIME_PREFIX)lib
  323. cd lib && $(TAR) -cf - *.so.* | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)lib
  324. @if [ -x lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so ] ; then \
  325. set -e; \
  326. $(SHELL_SET_X); \
  327. $(INSTALL) -m 755 lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so \
  328. $(PREFIX)$(RUNTIME_PREFIX)lib; \
  329. fi
  330. endif
  331. utils:
  332. $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils
  333. # Installs helper applications, such as 'ldd' and 'ldconfig'
  334. install_utils: utils
  335. $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install
  336. else # ifeq ($(HAVE_DOT_CONFIG),y)
  337. all: menuconfig
  338. headers:
  339. @echo "Need to make a config file first, run: make menuconfig"
  340. @false
  341. endif # ifeq ($(HAVE_DOT_CONFIG),y)
  342. include/bits:
  343. $(INSTALL) -d include/bits
  344. # configuration
  345. # ---------------------------------------------------------------------------
  346. extra/config/conf extra/config/mconf: include/bits
  347. # TODO: this results in "make[1]: `conf' is up to date" printed
  348. # on every rebuild, because extra/config/conf is already built
  349. # on previous make run. Make it "test -x $@ || ..." (simple & a bit wrong)
  350. # or "make -q -C extra/config $(notdir $@) || ..." (less readable)?
  351. $(Q)$(MAKE) -C extra/config $(notdir $@)
  352. menuconfig: extra/config/mconf include/bits
  353. $(Q)./extra/config/mconf extra/Configs/Config.in
  354. config: extra/config/conf include/bits
  355. $(Q)./extra/config/conf extra/Configs/Config.in
  356. oldconfig: extra/config/conf include/bits
  357. $(Q)./extra/config/conf -o extra/Configs/Config.in
  358. silentoldconfig: extra/config/conf include/bits
  359. $(Q)./extra/config/conf -s extra/Configs/Config.in
  360. randconfig: extra/config/conf include/bits
  361. $(Q)./extra/config/conf -r extra/Configs/Config.in
  362. allyesconfig: extra/config/conf include/bits
  363. $(Q)./extra/config/conf -y extra/Configs/Config.in
  364. sed -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" .config
  365. sed -i -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" .config
  366. sed -i -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" .config
  367. sed -i -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" .config
  368. sed -i -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" .config
  369. $(Q)./extra/config/conf -o extra/Configs/Config.in
  370. allnoconfig: extra/config/conf include/bits
  371. $(Q)./extra/config/conf -n extra/Configs/Config.in
  372. defconfig: extra/config/conf include/bits
  373. $(Q)./extra/config/conf -d extra/Configs/Config.in \
  374. -D extra/Configs/defconfigs/$(ARCH)
  375. clean:
  376. $(Q)$(RM) -r lib include/bits
  377. $(Q)$(RM) $(foreach ext,a o os oS,ldso/*/*.$(ext) \
  378. libc/*.$(ext) libcrypt/*.$(ext) libintl/*.$(ext) libm/*.$(ext) \
  379. libnsl/*.$(ext) libpthread/*.$(ext) libresolv/*.$(ext) \
  380. librt/*.$(ext) libutil/*.$(ext) lib/*.$(ext) \
  381. libpthread/*/*.$(ext) libpthread/*/*/*.$(ext) \
  382. libpthread/*/*/*/*.$(ext) libpthread/*/*/*/*/*.$(ext) \
  383. libpthread/*/*/*/*/*/*.$(ext) libpthread/*/*/*/*/*/*/*.$(ext) \
  384. libpthread/*/*/*/*/*/*/*/*.$(ext))
  385. $(Q)$(RM) include/fpu_control.h include/dl-osinfo.h include/hp-timing.h
  386. $(MAKE) objclean-y headers_clean-y
  387. $(MAKE) -s -C test clean
  388. $(MAKE) -C utils utils_clean
  389. @set -e; \
  390. for i in `(cd libc/sysdeps/linux/common/sys; ls *.h)` ; do \
  391. $(RM) include/sys/$$i; \
  392. done; \
  393. if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
  394. for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \
  395. $(RM) include/sys/$$i; \
  396. done; \
  397. fi
  398. @$(RM) include/linux include/asm*
  399. $(RM) $(top_builddir)extra/scripts/unifdef
  400. distclean: clean
  401. -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec $(RM) {} \;
  402. $(RM) .config .config.old .config.cmd
  403. $(RM) extra/locale/*.tgz
  404. $(MAKE) -C extra/config distclean
  405. dist release:
  406. $(RM) -r ../uClibc-$(VERSION) ../uClibc-$(VERSION).tar.bz2
  407. svn -q export . ../uClibc-$(VERSION)
  408. $(TAR) cjf ../uClibc-$(VERSION).tar.bz2 -C .. uClibc-$(VERSION)
  409. du -b ../uClibc-$(VERSION).tar.bz2
  410. test check:
  411. $(Q)$(MAKE) -C test