Makefile.in 17 KB

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