Makefile 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. # Makefile for buildroot2
  2. #
  3. # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
  4. # Copyright (C) 2006-2009 by the Buildroot developers <buildroot@uclibc.org>
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. # General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. #
  20. #--------------------------------------------------------------
  21. # Just run 'make menuconfig', configure stuff, then run 'make'.
  22. # You shouldn't need to mess with anything beyond this point...
  23. #--------------------------------------------------------------
  24. TOPDIR=./
  25. CONFIG_CONFIG_IN=Config.in
  26. CONFIG_DEFCONFIG=.defconfig
  27. CONFIG=package/config
  28. DATE:=$(shell date +%Y%m%d)
  29. noconfig_targets:=menuconfig config oldconfig randconfig \
  30. defconfig allyesconfig allnoconfig release tags \
  31. source-check help
  32. # Use shell variables, if defined
  33. ifneq ($(BUILDROOT_LOCAL),)
  34. BR2_LOCAL:=$(BUILDROOT_LOCAL)
  35. else
  36. BR2_LOCAL:=$(TOPDIR)/local
  37. endif
  38. # Variables for use in Make constructs
  39. comma:=,
  40. empty:=
  41. space:=$(empty) $(empty)
  42. # $(shell find . -name *_defconfig |sed 's/.*\///')
  43. # Pull in the user's configuration file
  44. ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
  45. ifeq ($(BOARD),)
  46. # if "make BOARD=xyz" command
  47. -include .config
  48. else
  49. # if "make" command
  50. -include $(BR2_LOCAL)/$(BOARD)/$(BOARD).config
  51. endif
  52. endif
  53. # Override BR2_DL_DIR if shell variable defined
  54. ifneq ($(BUILDROOT_DL_DIR),)
  55. BR2_DL_DIR:=$(BUILDROOT_DL_DIR)
  56. endif
  57. LOCAL:=$(BR2_LOCAL)
  58. # To put more focus on warnings, be less verbose as default
  59. # Use 'make V=1' to see the full commands
  60. ifdef V
  61. ifeq ("$(origin V)", "command line")
  62. KBUILD_VERBOSE=$(V)
  63. endif
  64. endif
  65. ifndef KBUILD_VERBOSE
  66. KBUILD_VERBOSE=0
  67. endif
  68. ifeq ($(KBUILD_VERBOSE),1)
  69. quiet=
  70. Q=
  71. ifndef VERBOSE
  72. VERBOSE=1
  73. endif
  74. else
  75. quiet=quiet_
  76. Q=@
  77. endif
  78. # we want bash as shell
  79. SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \
  80. else if [ -x /bin/bash ]; then echo /bin/bash; \
  81. else echo sh; fi; fi)
  82. # kconfig uses CONFIG_SHELL
  83. CONFIG_SHELL:=$(SHELL)
  84. export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE
  85. ifndef HOSTAR
  86. HOSTAR:=ar
  87. endif
  88. ifndef HOSTAS
  89. HOSTAS:=as
  90. endif
  91. ifndef HOSTCC
  92. HOSTCC:=gcc
  93. else
  94. endif
  95. ifndef HOSTCXX
  96. HOSTCXX:=g++
  97. endif
  98. ifndef HOSTFC
  99. HOSTFC:=gfortran
  100. endif
  101. ifndef HOSTCPP
  102. HOSTCPP:=cpp
  103. endif
  104. ifndef HOSTLD
  105. HOSTLD:=ld
  106. endif
  107. ifndef HOSTLN
  108. HOSTLN:=ln
  109. endif
  110. ifndef HOSTNM
  111. HOSTNM:=nm
  112. endif
  113. HOSTAR:=$(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
  114. HOSTAS:=$(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
  115. HOSTCC:=$(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
  116. HOSTCXX:=$(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
  117. HOSTFC:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
  118. HOSTCPP:=$(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
  119. HOSTLD:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
  120. HOSTLN:=$(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
  121. HOSTNM:=$(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
  122. ifndef CFLAGS_FOR_BUILD
  123. CFLAGS_FOR_BUILD:=-g -O2
  124. endif
  125. ifndef CXXFLAGS_FOR_BUILD
  126. CXXFLAGS_FOR_BUILD:=-g -O2
  127. endif
  128. ifndef FCFLAGS_FOR_BUILD
  129. FCFLAGS_FOR_BUILD:=-g -O2
  130. endif
  131. export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD
  132. ifeq ($(BR2_HAVE_DOT_CONFIG),y)
  133. # cc-option
  134. # Usage: cflags-y+=$(call cc-option, -march=winchip-c6, -march=i586)
  135. # sets -march=winchip-c6 if supported else falls back to -march=i586
  136. # without checking the latter.
  137. cc-option=$(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
  138. > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
  139. #############################################################
  140. #
  141. # Hide troublesome environment variables from sub processes
  142. #
  143. #############################################################
  144. unexport CROSS_COMPILE
  145. unexport ARCH
  146. #############################################################
  147. #
  148. # Setup the proper filename extensions for the host
  149. #
  150. ##############################################################
  151. ifneq ($(findstring linux,$(BR2_GNU_BUILD_SUFFIX)),)
  152. HOST_EXEEXT:=
  153. HOST_LIBEXT:=.a
  154. HOST_SHREXT:=.so
  155. endif
  156. ifneq ($(findstring apple,$(BR2_GNU_BUILD_SUFFIX)),)
  157. HOST_EXEEXT:=
  158. HOST_LIBEXT:=.a
  159. HOST_SHREXT:=.dylib
  160. endif
  161. ifneq ($(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)),)
  162. HOST_EXEEXT:=.exe
  163. HOST_LIBEXT:=.lib
  164. HOST_SHREXT:=.dll
  165. HOST_LOADLIBES="-lcurses -lintl"
  166. export HOST_LOADLIBES
  167. endif
  168. ifneq ($(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)),)
  169. HOST_EXEEXT:=.exe
  170. HOST_LIBEXT:=.lib
  171. HOST_SHREXT:=.dll
  172. endif
  173. # The preferred type of libs we build for the target
  174. ifeq ($(BR2_PREFER_STATIC_LIB),y)
  175. LIBTGTEXT=.a
  176. #PREFERRED_LIB_FLAGS:=--disable-shared --enable-static
  177. else
  178. LIBTGTEXT=.so
  179. #PREFERRED_LIB_FLAGS:=--disable-static --enable-shared
  180. endif
  181. PREFERRED_LIB_FLAGS:=--enable-static --enable-shared
  182. ##############################################################
  183. #
  184. # The list of stuff to build for the target toolchain
  185. # along with the packages to build for the target.
  186. #
  187. ##############################################################
  188. ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
  189. BASE_TARGETS:=uclibc-configured binutils cross_compiler uclibc-target-utils kernel-headers
  190. else
  191. BASE_TARGETS:=uclibc
  192. endif
  193. TARGETS:=
  194. # setup our paths
  195. include project/Makefile.in
  196. BR2_DEPENDS_DIR=$(PROJECT_BUILD_DIR)/buildroot-config
  197. include toolchain/Makefile.in
  198. include package/Makefile.in
  199. #############################################################
  200. #
  201. # You should probably leave this stuff alone unless you know
  202. # what you are doing.
  203. #
  204. #############################################################
  205. all: world
  206. # In this section, we need .config
  207. include .config.cmd
  208. include project/*.mk
  209. # We also need the various per-package makefiles, which also add
  210. # each selected package to TARGETS if that package was selected
  211. # in the .config file.
  212. ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
  213. # avoid pulling in external toolchain which is broken for toplvl parallel builds
  214. # Explicit ordering:
  215. include toolchain/dependencies/dependencies.mk
  216. include toolchain/binutils/binutils.mk
  217. include toolchain/ccache/ccache.mk
  218. include toolchain/elf2flt/elf2flt.mk
  219. include toolchain/gcc/gcc-uclibc-3.x.mk
  220. include toolchain/gcc/gcc-uclibc-4.x.mk
  221. include toolchain/gdb/gdb.mk
  222. include toolchain/kernel-headers/kernel-headers.mk
  223. include toolchain/mklibs/mklibs.mk
  224. include toolchain/sstrip/sstrip.mk
  225. include toolchain/uClibc/uclibc.mk
  226. else
  227. include toolchain/*/*.mk
  228. endif
  229. ifeq ($(BR2_PACKAGE_LINUX),y)
  230. TARGETS+=linux26-modules
  231. endif
  232. include package/*/*.mk
  233. TARGETS+=target-finalize
  234. ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
  235. TARGETS+=target-purgelocales
  236. endif
  237. # target stuff is last so it can override anything else
  238. include target/Makefile.in
  239. TARGETS+=erase-fakeroots
  240. TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
  241. TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS))
  242. TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
  243. TARGETS_ALL:=$(patsubst %,__real_tgt_%,$(TARGETS))
  244. # all targets depend on the crosscompiler and it's prerequisites
  245. $(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) %
  246. $(BR2_DEPENDS_DIR): .config
  247. rm -rf $@
  248. mkdir -p $(@D)
  249. cp -dpRf $(CONFIG)/buildroot-config $@
  250. dirs: $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
  251. $(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(PROJECT_BUILD_DIR) \
  252. $(PROJECT_BUILD_DIR)/autotools-stamps $(STAMP_DIR)
  253. $(BASE_TARGETS): dirs
  254. world: dependencies dirs target-host-info $(BASE_TARGETS) $(TARGETS_ALL)
  255. .PHONY: all world dirs clean dirclean distclean source \
  256. $(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \
  257. $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
  258. $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
  259. $(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(PROJECT_BUILD_DIR) \
  260. $(PROJECT_BUILD_DIR)/autotools-stamps $(STAMP_DIR)
  261. #############################################################
  262. #
  263. # staging and target directories do NOT list these as
  264. # dependencies anywhere else
  265. #
  266. #############################################################
  267. $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(HOST_DIR) $(PROJECT_BUILD_DIR) \
  268. $(PROJECT_BUILD_DIR)/autotools-stamps $(BINARIES_DIR) $(STAMP_DIR):
  269. @mkdir -p $@
  270. $(STAGING_DIR):
  271. @mkdir -p $(STAGING_DIR)/bin
  272. @mkdir -p $(STAGING_DIR)/lib
  273. ifeq ($(BR2_TOOLCHAIN_SYSROOT),y)
  274. @mkdir -p $(STAGING_DIR)/usr/lib
  275. else
  276. ifneq ($(BR2_TOOLCHAIN_EXTERNAL),y)
  277. @ln -snf . $(STAGING_DIR)/usr
  278. @mkdir -p $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)
  279. @ln -snf ../lib $(STAGING_DIR)/usr/lib
  280. @ln -snf ../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
  281. endif
  282. endif
  283. @mkdir -p $(STAGING_DIR)/usr/include
  284. $(PROJECT_BUILD_DIR)/.root:
  285. mkdir -p $(TARGET_DIR)
  286. if ! [ -d "$(TARGET_DIR)/bin" ]; then \
  287. if [ -d "$(TARGET_SKELETON)" ]; then \
  288. cp -fa $(TARGET_SKELETON)/* $(TARGET_DIR)/; \
  289. fi; \
  290. touch $(STAGING_DIR)/.fakeroot.00000; \
  291. fi
  292. -find $(TARGET_DIR) -type d -name CVS -o -name .svn -print0 | xargs -0 rm -rf
  293. -find $(TARGET_DIR) -type f -name .empty -print0 | xargs -0 rm -rf
  294. touch $@
  295. $(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root
  296. erase-fakeroots:
  297. rm -f $(PROJECT_BUILD_DIR)/.fakeroot*
  298. target-finalize:
  299. ifeq ($(BR2_HAVE_DEVFILES),y)
  300. ( scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) )
  301. else
  302. rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib/pkgconfig
  303. find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
  304. find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
  305. endif
  306. ifneq ($(BR2_HAVE_MANPAGES),y)
  307. rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
  308. endif
  309. ifneq ($(BR2_HAVE_INFOPAGES),y)
  310. rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
  311. endif
  312. find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
  313. $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null
  314. ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
  315. LOCALE_WHITELIST=$(PROJECT_BUILD_DIR)/locales.nopurge
  316. LOCALE_NOPURGE=$(strip $(subst ",,$(BR2_ENABLE_LOCALE_WHITELIST)))
  317. #"))
  318. target-purgelocales:
  319. rm -f $(LOCALE_WHITELIST)
  320. for i in $(LOCALE_NOPURGE); do echo $$i >> $(LOCALE_WHITELIST); done
  321. for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/man /usr/share/man)); \
  322. do \
  323. for lang in $$(cd $$dir; ls .|grep -v man); \
  324. do \
  325. grep -qx $$lang $(LOCALE_WHITELIST) || rm -rf $$dir/$$lang; \
  326. done; \
  327. done
  328. endif
  329. source: $(TARGETS_SOURCE) $(HOST_SOURCE)
  330. _source-check:
  331. $(MAKE) SPIDER=--spider source
  332. external-deps:
  333. @$(MAKE) -Bs BR2_WGET=$(TOPDIR)/toolchain/wget-show-external-deps.sh \
  334. SPIDER=--spider source
  335. #############################################################
  336. #
  337. # Cleanup and misc junk
  338. #
  339. #############################################################
  340. clean: $(TARGETS_CLEAN)
  341. rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps $(STAMP_DIR)
  342. dirclean: $(TARGETS_DIRCLEAN)
  343. rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps $(STAMP_DIR)
  344. distclean:
  345. ifeq ($(DL_DIR),$(BASE_DIR)/dl)
  346. rm -rf $(DL_DIR)
  347. endif
  348. rm -rf $(TOOL_BUILD_DIR) $(BUILD_DIR) $(PROJECT_BUILD_DIR) $(BINARIES_DIR) \
  349. .config.cmd
  350. $(MAKE) -C $(CONFIG) clean
  351. sourceball:
  352. rm -rf $(BUILD_DIR) $(PROJECT_BUILD_DIR) $(BINARIES_DIR)
  353. set -e; \
  354. cd ..; \
  355. rm -f buildroot.tar.bz2; \
  356. tar -cvf buildroot.tar buildroot; \
  357. bzip2 -9 buildroot.tar; \
  358. else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
  359. all: menuconfig
  360. # configuration
  361. # ---------------------------------------------------------------------------
  362. HOSTCFLAGS=$(CFLAGS_FOR_BUILD)
  363. export HOSTCFLAGS
  364. $(CONFIG)/conf:
  365. @mkdir -p $(CONFIG)/buildroot-config
  366. $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf
  367. -@if [ ! -f .config ]; then \
  368. cp $(CONFIG_DEFCONFIG) .config; \
  369. fi
  370. $(CONFIG)/mconf:
  371. @mkdir -p $(CONFIG)/buildroot-config
  372. $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf mconf
  373. -@if [ ! -f .config ]; then \
  374. cp $(CONFIG_DEFCONFIG) .config; \
  375. fi
  376. menuconfig: $(CONFIG)/mconf
  377. @mkdir -p $(CONFIG)/buildroot-config
  378. @if ! KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
  379. KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
  380. $(CONFIG)/mconf $(CONFIG_CONFIG_IN); then \
  381. test -f .config.cmd || rm -f .config; \
  382. fi
  383. config: $(CONFIG)/conf
  384. @mkdir -p $(CONFIG)/buildroot-config
  385. @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
  386. KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
  387. $(CONFIG)/conf $(CONFIG_CONFIG_IN)
  388. oldconfig: $(CONFIG)/conf
  389. @mkdir -p $(CONFIG)/buildroot-config
  390. @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
  391. KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
  392. $(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
  393. randconfig: $(CONFIG)/conf
  394. @mkdir -p $(CONFIG)/buildroot-config
  395. @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
  396. KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
  397. $(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
  398. allyesconfig: $(CONFIG)/conf
  399. cat $(CONFIG_DEFCONFIG) > .config
  400. @mkdir -p $(CONFIG)/buildroot-config
  401. @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
  402. KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
  403. $(CONFIG)/conf -y $(CONFIG_CONFIG_IN)
  404. #sed -i -e "s/^CONFIG_DEBUG.*/# CONFIG_DEBUG is not set/" .config
  405. allnoconfig: $(CONFIG)/conf
  406. @mkdir -p $(CONFIG)/buildroot-config
  407. @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
  408. KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
  409. $(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
  410. defconfig: $(CONFIG)/conf
  411. @mkdir -p $(CONFIG)/buildroot-config
  412. @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
  413. KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
  414. $(CONFIG)/conf -d $(CONFIG_CONFIG_IN)
  415. # check if download URLs are outdated
  416. source-check: allyesconfig
  417. $(MAKE) _source-check
  418. #############################################################
  419. #
  420. # Cleanup and misc junk
  421. #
  422. #############################################################
  423. clean:
  424. rm -f .config .config.old .config.cmd .tmpconfig.h .lognr.*
  425. -$(MAKE) -C $(CONFIG) clean
  426. distclean: clean
  427. rm -rf sources/*
  428. endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
  429. flush:
  430. rm -f $(PROJECT_BUILD_DIR)/tgt-config.cache
  431. %_defconfig: $(CONFIG)/conf
  432. cp $(shell find ./target/ -name $@) .config
  433. -@$(MAKE) oldconfig
  434. update:
  435. cp .config $(BOARD_PATH)/$(PROJECT)_defconfig
  436. configured: dirs host-sed kernel-headers uclibc-config busybox-config linux26-config
  437. prepatch: gcc-patched binutils-patched gdb-patched uclibc-patched
  438. .lognr.$(PROJECT):
  439. @echo "0" > .lognr.$(PROJECT)
  440. log: .lognr.$(PROJECT)
  441. @expr `cat .lognr.$(PROJECT)` + 1 > .lognr.$(PROJECT)
  442. @echo Creating $(PROJECT)-`cat .lognr.$(PROJECT)`.log
  443. @$(MAKE) > $(PROJECT)-`cat .lognr.$(PROJECT)`.log 2>&1
  444. cross: $(BASE_TARGETS)
  445. help:
  446. @echo 'Cleaning:'
  447. @echo ' clean - delete temporary files created by build'
  448. @echo ' distclean - delete all non-source files (including .config)'
  449. @echo
  450. @echo 'Build:'
  451. @echo ' all - make world'
  452. @echo
  453. @echo 'Configuration:'
  454. @echo ' menuconfig - interactive curses-based configurator'
  455. @echo ' oldconfig - resolve any unresolved symbols in .config'
  456. @echo ' configured - make {uclibc/busybox/linux26}-config'
  457. @echo ' saveconfig - save current configuration under local/<project>'
  458. @echo ' getconfig - restore saved configuration from local/<project>'
  459. @echo
  460. @echo 'Miscellaneous:'
  461. @echo ' source - download all sources needed for offline-build'
  462. @echo ' source-check - check all packages for valid download URLs'
  463. @echo ' external-deps - list external packages used'
  464. @echo ' flush - flush configuration cache'
  465. @echo
  466. @echo 'See docs/README and docs/buildroot.html for further details'
  467. @echo
  468. release: distclean
  469. OUT=buildroot-$$(grep -A2 BR2_VERSION $(CONFIG_CONFIG_IN)|grep default|cut -f2 -d\"); \
  470. rm -rf ../$$OUT*; cp -al . ../$$OUT; cd ..; \
  471. tar cfz $$OUT.tar.gz --exclude .svn --exclude .git --exclude \*~ $$OUT; \
  472. rm -rf $$OUT
  473. .PHONY: dummy subdirs release distclean clean config oldconfig \
  474. menuconfig tags check test depend defconfig help