]> Git Repo - buildroot-mgba.git/blob - Makefile
Makefile: Remove ancient 'sourceball' target
[buildroot-mgba.git] / Makefile
1 # Makefile for buildroot2
2 #
3 # Copyright (C) 1999-2005 by Erik Andersen <[email protected]>
4 # Copyright (C) 2006-2009 by the Buildroot developers <[email protected]>
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 #--------------------------------------------------------------
22 # Just run 'make menuconfig', configure stuff, then run 'make'.
23 # You shouldn't need to mess with anything beyond this point...
24 #--------------------------------------------------------------
25 TOPDIR:=.
26 CONFIG_CONFIG_IN=Config.in
27 CONFIG_DEFCONFIG=.defconfig
28 CONFIG=package/config
29 DATE:=$(shell date +%Y%m%d)
30
31 noconfig_targets:=menuconfig xconfig config oldconfig randconfig \
32         defconfig allyesconfig allnoconfig release tags \
33         source-check help
34
35 # Strip quotes and then whitespaces
36 qstrip=$(strip $(subst ",,$(1)))
37 #"))
38
39 # Variables for use in Make constructs
40 comma:=,
41 empty:=
42 space:=$(empty) $(empty)
43
44 # $(shell find . -name *_defconfig |sed 's/.*\///')
45 # Pull in the user's configuration file
46 ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
47 -include .config
48 endif
49
50 # Override BR2_DL_DIR if shell variable defined
51 ifneq ($(BUILDROOT_DL_DIR),)
52 BR2_DL_DIR:=$(BUILDROOT_DL_DIR)
53 endif
54
55 # To put more focus on warnings, be less verbose as default
56 # Use 'make V=1' to see the full commands
57 ifdef V
58   ifeq ("$(origin V)", "command line")
59     KBUILD_VERBOSE=$(V)
60   endif
61 endif
62 ifndef KBUILD_VERBOSE
63   KBUILD_VERBOSE=0
64 endif
65
66 ifeq ($(KBUILD_VERBOSE),1)
67   quiet=
68   Q=
69 ifndef VERBOSE
70   VERBOSE=1
71 endif
72 else
73   quiet=quiet_
74   Q=@
75 endif
76
77 # we want bash as shell
78 SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \
79         else if [ -x /bin/bash ]; then echo /bin/bash; \
80         else echo sh; fi; fi)
81
82 # kconfig uses CONFIG_SHELL
83 CONFIG_SHELL:=$(SHELL)
84
85 export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE
86
87 ifndef HOSTAR
88 HOSTAR:=ar
89 endif
90 ifndef HOSTAS
91 HOSTAS:=as
92 endif
93 ifndef HOSTCC
94 HOSTCC:=gcc
95 else
96 endif
97 ifndef HOSTCXX
98 HOSTCXX:=g++
99 endif
100 ifndef HOSTFC
101 HOSTFC:=gfortran
102 endif
103 ifndef HOSTCPP
104 HOSTCPP:=cpp
105 endif
106 ifndef HOSTLD
107 HOSTLD:=ld
108 endif
109 ifndef HOSTLN
110 HOSTLN:=ln
111 endif
112 ifndef HOSTNM
113 HOSTNM:=nm
114 endif
115 HOSTAR:=$(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
116 HOSTAS:=$(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
117 HOSTCC:=$(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
118 HOSTCXX:=$(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
119 HOSTFC:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
120 HOSTCPP:=$(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
121 HOSTLD:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
122 HOSTLN:=$(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
123 HOSTNM:=$(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
124
125 ifndef CFLAGS_FOR_BUILD
126 CFLAGS_FOR_BUILD:=-g -O2
127 endif
128 ifndef CXXFLAGS_FOR_BUILD
129 CXXFLAGS_FOR_BUILD:=-g -O2
130 endif
131 ifndef FCFLAGS_FOR_BUILD
132 FCFLAGS_FOR_BUILD:=-g -O2
133 endif
134 export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD
135
136
137 ifeq ($(BR2_HAVE_DOT_CONFIG),y)
138
139 # cc-option
140 # Usage: cflags-y+=$(call cc-option, -march=winchip-c6, -march=i586)
141 # sets -march=winchip-c6 if supported else falls back to -march=i586
142 # without checking the latter.
143 cc-option=$(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
144         > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
145
146 #############################################################
147 #
148 # Hide troublesome environment variables from sub processes
149 #
150 #############################################################
151 unexport CROSS_COMPILE
152 unexport ARCH
153
154 #############################################################
155 #
156 # Setup the proper filename extensions for the host
157 #
158 ##############################################################
159 ifneq ($(findstring linux,$(BR2_GNU_BUILD_SUFFIX)),)
160 HOST_EXEEXT:=
161 HOST_LIBEXT:=.a
162 HOST_SHREXT:=.so
163 endif
164 ifneq ($(findstring apple,$(BR2_GNU_BUILD_SUFFIX)),)
165 HOST_EXEEXT:=
166 HOST_LIBEXT:=.a
167 HOST_SHREXT:=.dylib
168 endif
169 ifneq ($(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)),)
170 HOST_EXEEXT:=.exe
171 HOST_LIBEXT:=.lib
172 HOST_SHREXT:=.dll
173 HOST_LOADLIBES="-lcurses -lintl"
174 export HOST_LOADLIBES
175 endif
176 ifneq ($(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)),)
177 HOST_EXEEXT:=.exe
178 HOST_LIBEXT:=.lib
179 HOST_SHREXT:=.dll
180 endif
181
182 # The preferred type of libs we build for the target
183 ifeq ($(BR2_PREFER_STATIC_LIB),y)
184 LIBTGTEXT=.a
185 #PREFERRED_LIB_FLAGS:=--disable-shared --enable-static
186 else
187 LIBTGTEXT=.so
188 #PREFERRED_LIB_FLAGS:=--disable-static --enable-shared
189 endif
190 PREFERRED_LIB_FLAGS:=--enable-static --enable-shared
191
192 ##############################################################
193 #
194 # The list of stuff to build for the target toolchain
195 # along with the packages to build for the target.
196 #
197 ##############################################################
198 ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
199 BASE_TARGETS:=uclibc-configured binutils cross_compiler uclibc-target-utils kernel-headers
200 else
201 BASE_TARGETS:=uclibc
202 endif
203 TARGETS:=
204
205 # Strip off the annoying quoting
206 ARCH:=$(call qstrip,$(BR2_ARCH))
207 ifeq ($(ARCH),xtensa)
208 ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
209 endif
210 WGET:=$(call qstrip,$(BR2_WGET)) $(SPIDER) $(QUIET)
211 SVN_CO:=$(call qstrip,$(BR2_SVN_CO)) $(QUIET)
212 SVN_UP:=$(call qstrip,$(BR2_SVN_UP)) $(QUIET)
213 BZR_CO:=$(call qstrip,$(BR2_BZR_CO)) $(QUIET)
214 BZR_UP:=$(call qstrip,$(BR2_BZR_UP)) $(QUIET)
215 GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
216 ZCAT:=$(call qstrip,$(BR2_ZCAT))
217 BZCAT:=$(call qstrip,$(BR2_BZCAT))
218 TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
219
220 ifneq ("$(origin O)", "command line")
221 O:=output
222 else
223 # other packages might also support Linux-style out of tree builds
224 # with the O=<dir> syntax (E.G. Busybox does). As make automatically
225 # forwards command line variable definitions those packages get very
226 # confused. Fix this by telling make to not do so
227 MAKEOVERRIDES =
228 endif
229
230 BASE_DIR := $(shell mkdir -p $(O) && cd $(O) && pwd)
231 $(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
232
233 DL_DIR=$(call qstrip,$(BR2_DL_DIR))
234 ifeq ($(DL_DIR),)
235 DL_DIR:=$(TOPDIR)/dl
236 endif
237
238 BUILD_DIR:=$(BASE_DIR)/build
239
240 GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
241
242 STAGING_DIR:=$(call qstrip,$(BR2_STAGING_DIR))
243
244 # packages compiled for the host goes here
245 HOST_DIR:=$(BASE_DIR)/host
246
247 # stamp (dependency) files go here
248 STAMP_DIR:=$(BASE_DIR)/stamps
249
250 BINARIES_DIR:=$(BASE_DIR)/images
251 TARGET_DIR:=$(BASE_DIR)/target
252
253 # define values for prepatched source trees for toolchains
254 VENDOR_SITE:=$(call qstrip,$(BR2_VENDOR_SITE))
255 VENDOR_SUFFIX:=$(call qstrip,$(BR2_VENDOR_SUFFIX))
256 VENDOR_BINUTILS_RELEASE:=$(call qstrip,$(BR2_VENDOR_BINUTILS_RELEASE))
257 VENDOR_GCC_RELEASE:=$(call qstrip,$(BR2_VENDOR_GCC_RELEASE))
258 VENDOR_UCLIBC_RELEASE:=$(call qstrip,$(BR2_VENDOR_UCLIBC_RELEASE))
259 VENDOR_GDB_RELEASE:=$(call qstrip,$(BR2_VENDOR_GDB_RELEASE))
260 VENDOR_PATCH_DIR:=$(call qstrip,$(BR2_VENDOR_PATCH_DIR))
261
262 BR2_DEPENDS_DIR=$(BUILD_DIR)/buildroot-config
263
264 include toolchain/Makefile.in
265 include package/Makefile.in
266
267 #############################################################
268 #
269 # You should probably leave this stuff alone unless you know
270 # what you are doing.
271 #
272 #############################################################
273
274 all: world
275
276 # In this section, we need .config
277 include .config.cmd
278
279 # We also need the various per-package makefiles, which also add
280 # each selected package to TARGETS if that package was selected
281 # in the .config file.
282 ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
283 # avoid pulling in external toolchain which is broken for toplvl parallel builds
284 # Explicit ordering:
285 include toolchain/dependencies/dependencies.mk
286 include toolchain/binutils/binutils.mk
287 include toolchain/ccache/ccache.mk
288 include toolchain/elf2flt/elf2flt.mk
289 include toolchain/gcc/gcc-uclibc-3.x.mk
290 include toolchain/gcc/gcc-uclibc-4.x.mk
291 include toolchain/gdb/gdb.mk
292 include toolchain/kernel-headers/kernel-headers.mk
293 include toolchain/mklibs/mklibs.mk
294 include toolchain/sstrip/sstrip.mk
295 include toolchain/uClibc/uclibc.mk
296 else
297 include toolchain/*/*.mk
298 endif
299
300 ifeq ($(BR2_PACKAGE_LINUX),y)
301 TARGETS+=linux26-modules
302 endif
303
304 include package/*/*.mk
305
306 TARGETS+=target-finalize
307
308 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
309 TARGETS+=target-purgelocales
310 endif
311
312 # target stuff is last so it can override anything else
313 include target/Makefile.in
314
315 TARGETS+=erase-fakeroots
316
317 TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
318 TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS))
319 TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
320 TARGETS_ALL:=$(patsubst %,__real_tgt_%,$(TARGETS))
321 # all targets depend on the crosscompiler and it's prerequisites
322 $(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) %
323
324 $(BR2_DEPENDS_DIR): .config
325         rm -rf $@
326         mkdir -p $(@D)
327         cp -dpRf $(CONFIG)/buildroot-config $@
328
329 dirs: $(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
330         $(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(STAMP_DIR)
331
332 $(BASE_TARGETS): dirs
333
334 world: dependencies dirs $(BASE_TARGETS) $(TARGETS_ALL)
335
336
337 .PHONY: all world dirs clean dirclean distclean source \
338         $(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \
339         $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
340         $(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
341         $(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(STAMP_DIR)
342
343 #############################################################
344 #
345 # staging and target directories do NOT list these as
346 # dependencies anywhere else
347 #
348 #############################################################
349 $(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR):
350         @mkdir -p $@
351
352 $(STAGING_DIR):
353         @mkdir -p $(STAGING_DIR)/bin
354         @mkdir -p $(STAGING_DIR)/lib
355 ifeq ($(BR2_TOOLCHAIN_SYSROOT),y)
356         @mkdir -p $(STAGING_DIR)/usr/lib
357 else
358 ifneq ($(BR2_TOOLCHAIN_EXTERNAL),y)
359         @ln -snf . $(STAGING_DIR)/usr
360         @mkdir -p $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)
361         @ln -snf ../lib $(STAGING_DIR)/usr/lib
362         @ln -snf ../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
363 endif
364 endif
365         @mkdir -p $(STAGING_DIR)/usr/include
366
367 $(BUILD_DIR)/.root:
368         mkdir -p $(TARGET_DIR)
369         if ! [ -d "$(TARGET_DIR)/bin" ]; then \
370                 if [ -d "$(TARGET_SKELETON)" ]; then \
371                         cp -fa $(TARGET_SKELETON)/* $(TARGET_DIR)/; \
372                 fi; \
373                 if [ -d "$(TARGET_SKELETON_PATCH)" ]; then \
374                         toolchain/patch-kernel.sh $(TARGET_DIR) $(TARGET_SKELETON_PATCH)/ \*patch\*; \
375                 fi; \
376                 touch $(STAGING_DIR)/.fakeroot.00000; \
377         fi
378         -find $(TARGET_DIR) -type d -name CVS -print0 -o -name .svn -print0 | xargs -0 rm -rf
379         -find $(TARGET_DIR) -type f -name .empty -print0 | xargs -0 rm -rf
380         touch $@
381
382 $(TARGET_DIR): $(BUILD_DIR)/.root
383
384 erase-fakeroots:
385         rm -f $(BUILD_DIR)/.fakeroot*
386
387 target-finalize:
388 ifeq ($(BR2_HAVE_DEVFILES),y)
389         ( scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) )
390 else
391         rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib/pkgconfig
392         find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
393         find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
394 endif
395 ifneq ($(BR2_HAVE_MANPAGES),y)
396         rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
397 endif
398 ifneq ($(BR2_HAVE_INFOPAGES),y)
399         rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
400 endif
401         find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
402         $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null
403
404 ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"")
405         $(BR2_ROOTFS_POST_BUILD_SCRIPT) $(TARGET_DIR)
406 endif
407
408 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
409 LOCALE_WHITELIST=$(BUILD_DIR)/locales.nopurge
410 LOCALE_NOPURGE=$(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
411
412 target-purgelocales:
413         rm -f $(LOCALE_WHITELIST)
414         for i in $(LOCALE_NOPURGE); do echo $$i >> $(LOCALE_WHITELIST); done
415
416         for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/man /usr/share/man)); \
417         do \
418                 for lang in $$(cd $$dir; ls .|grep -v man); \
419                 do \
420                         grep -qx $$lang $(LOCALE_WHITELIST) || rm -rf $$dir/$$lang; \
421                 done; \
422         done
423 endif
424
425 source: $(TARGETS_SOURCE) $(HOST_SOURCE)
426
427 _source-check:
428         $(MAKE) SPIDER=--spider source
429
430 external-deps:
431         @$(MAKE) -Bs BR2_WGET=$(TOPDIR)/toolchain/wget-show-external-deps.sh \
432                 SPIDER=--spider source
433
434 #############################################################
435 #
436 # Cleanup and misc junk
437 #
438 #############################################################
439 clean: $(TARGETS_CLEAN)
440         rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(BUILD_DIR)/.root $(STAMP_DIR)
441
442 dirclean: $(TARGETS_DIRCLEAN)
443         rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(BUILD_DIR)/.root $(STAMP_DIR)
444
445 distclean:
446 ifeq ($(DL_DIR),$(TOPDIR)/dl)
447         rm -rf $(DL_DIR)
448 endif
449         rm -rf $(TOOLCHAIN_DIR) $(BUILD_DIR) $(BINARIES_DIR) \
450         .config.cmd
451         $(MAKE) -C $(CONFIG) clean
452
453 else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
454
455 all: menuconfig
456
457 # configuration
458 # ---------------------------------------------------------------------------
459
460 HOSTCFLAGS=$(CFLAGS_FOR_BUILD)
461 export HOSTCFLAGS
462
463 $(CONFIG)/conf:
464         @mkdir -p $(CONFIG)/buildroot-config
465         $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf
466         -@if [ ! -f .config ]; then \
467                 cp $(CONFIG_DEFCONFIG) .config; \
468         fi
469
470 $(CONFIG)/mconf:
471         @mkdir -p $(CONFIG)/buildroot-config
472         $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) mconf
473         -@if [ ! -f .config ]; then \
474                 cp $(CONFIG_DEFCONFIG) .config; \
475         fi
476
477 $(CONFIG)/qconf:
478         @mkdir -p $(CONFIG)/buildroot-config
479         $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) qconf
480         -@if [ ! -f .config ]; then \
481                 cp $(CONFIG_DEFCONFIG) .config; \
482         fi
483
484 xconfig: $(CONFIG)/qconf
485         @mkdir -p $(CONFIG)/buildroot-config
486         @if ! KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
487                 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
488                 $(CONFIG)/qconf $(CONFIG_CONFIG_IN); then \
489                 test -f .config.cmd || rm -f .config; \
490         fi
491
492 menuconfig: $(CONFIG)/mconf
493         @mkdir -p $(CONFIG)/buildroot-config
494         @if ! KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
495                 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
496                 $(CONFIG)/mconf $(CONFIG_CONFIG_IN); then \
497                 test -f .config.cmd || rm -f .config; \
498         fi
499
500 config: $(CONFIG)/conf
501         @mkdir -p $(CONFIG)/buildroot-config
502         @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
503                 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
504                 $(CONFIG)/conf $(CONFIG_CONFIG_IN)
505
506 oldconfig: $(CONFIG)/conf
507         @mkdir -p $(CONFIG)/buildroot-config
508         @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
509                 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
510                 $(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
511
512 randconfig: $(CONFIG)/conf
513         @mkdir -p $(CONFIG)/buildroot-config
514         @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
515                 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
516                 $(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
517
518 allyesconfig: $(CONFIG)/conf
519         cat $(CONFIG_DEFCONFIG) > .config
520         @mkdir -p $(CONFIG)/buildroot-config
521         @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
522                 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
523                 $(CONFIG)/conf -y $(CONFIG_CONFIG_IN)
524         #sed -i -e "s/^CONFIG_DEBUG.*/# CONFIG_DEBUG is not set/" .config
525
526 allnoconfig: $(CONFIG)/conf
527         @mkdir -p $(CONFIG)/buildroot-config
528         @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
529                 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
530                 $(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
531
532 defconfig: $(CONFIG)/conf
533         @mkdir -p $(CONFIG)/buildroot-config
534         @KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
535                 KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \
536                 $(CONFIG)/conf -d $(CONFIG_CONFIG_IN)
537
538 # check if download URLs are outdated
539 source-check: allyesconfig
540         $(MAKE) _source-check
541
542 #############################################################
543 #
544 # Cleanup and misc junk
545 #
546 #############################################################
547 clean:
548         rm -f .config .config.old .config.cmd .tmpconfig.h .lognr.*
549         -$(MAKE) -C $(CONFIG) clean
550
551 distclean: clean
552         rm -rf sources/*
553
554
555 endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
556
557 flush:
558         rm -f $(BUILD_DIR)/tgt-config.cache
559
560 %_defconfig: $(CONFIG)/conf
561         cp $(shell find ./target/ -name $@) .config
562         -@$(MAKE) oldconfig
563
564 configured: dirs host-sed kernel-headers uclibc-config busybox-config linux26-config
565
566 prepatch:       gcc-patched binutils-patched gdb-patched uclibc-patched
567
568 cross: $(BASE_TARGETS)
569
570 help:
571         @echo 'Cleaning:'
572         @echo '  clean                  - delete temporary files created by build'
573         @echo '  distclean              - delete all non-source files (including .config)'
574         @echo
575         @echo 'Build:'
576         @echo '  all                    - make world'
577         @echo
578         @echo 'Configuration:'
579         @echo '  menuconfig             - interactive curses-based configurator'
580         @echo '  xconfig                - interactive Qt-based configurator'
581         @echo '  oldconfig              - resolve any unresolved symbols in .config'
582         @echo '  configured             - make {uclibc/busybox/linux26}-config'
583         @echo '  saveconfig             - save current configuration under local/<project>'
584         @echo '  getconfig              - restore saved configuration from local/<project>'
585         @echo
586         @echo 'Miscellaneous:'
587         @echo '  source                 - download all sources needed for offline-build'
588         @echo '  source-check           - check all packages for valid download URLs'
589         @echo '  external-deps          - list external packages used'
590         @echo '  flush                  - flush configuration cache'
591         @echo
592         @echo 'See docs/README and docs/buildroot.html for further details'
593         @echo
594
595 release: distclean
596         OUT=buildroot-$$(grep -A2 BR2_VERSION $(CONFIG_CONFIG_IN)|grep default|cut -f2 -d\"); \
597         rm -rf ../$$OUT*; cp -al . ../$$OUT; cd ..; \
598         tar cfz $$OUT.tar.gz --exclude .svn --exclude .git --exclude \*~ $$OUT; \
599         rm -rf $$OUT
600
601 .PHONY: dummy subdirs release distclean clean config oldconfig \
602         menuconfig xconfig tags check test depend defconfig help
603
This page took 0.058149 seconds and 4 git commands to generate.