~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
VERSION = 2
2
 
PATCHLEVEL = 6
3
 
SUBLEVEL = 39
4
 
EXTRAVERSION = .1
5
 
NAME = Flesh-Eating Bats with Fangs
 
1
VERSION = 3
 
2
PATCHLEVEL = 0
 
3
SUBLEVEL = 4
 
4
EXTRAVERSION =
 
5
NAME = Sneaky Weasel
6
6
 
7
7
# *DOCUMENTATION*
8
8
# To see a list of typical targets execute "make help"
103
103
endif
104
104
 
105
105
ifeq ("$(origin W)", "command line")
106
 
  export KBUILD_ENABLE_EXTRA_GCC_CHECKS := 1
 
106
  export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W)
107
107
endif
108
108
 
109
109
# That's our default target when none is given on the command line
220
220
       SRCARCH := sh
221
221
endif
222
222
 
 
223
# Additional ARCH settings for tile
 
224
ifeq ($(ARCH),tilepro)
 
225
       SRCARCH := tile
 
226
endif
 
227
ifeq ($(ARCH),tilegx)
 
228
       SRCARCH := tile
 
229
endif
 
230
 
223
231
# Where to locate arch specific headers
224
232
hdr-arch  := $(SRCARCH)
225
233
 
355
363
 
356
364
# Use LINUXINCLUDE when you must reference the include/ directory.
357
365
# Needed to be compatible with the O= option
358
 
LINUXINCLUDE    := $(UBUNTUINCLUDE) -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \
 
366
LINUXINCLUDE    := $(UBUNTUINCLUDE) -I$(srctree)/arch/$(hdr-arch)/include \
 
367
                   -Iarch/$(hdr-arch)/include/generated -Iinclude \
359
368
                   $(if $(KBUILD_SRC), -I$(srctree)/include) \
360
369
                   -include include/generated/autoconf.h
361
370
 
378
387
 
379
388
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
380
389
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
381
 
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
390
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
382
391
 
383
392
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
384
393
export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
391
400
export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
392
401
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
393
402
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
 
403
export KBUILD_ARFLAGS
394
404
 
395
405
# When compiling out-of-tree modules, put MODVERDIR in the module
396
406
# tree rather than in the kernel tree. The kernel tree might
425
435
            $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
426
436
endif
427
437
 
 
438
# Support for using generic headers in asm-generic
 
439
PHONY += asm-generic
 
440
asm-generic:
 
441
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
 
442
                    obj=arch/$(SRCARCH)/include/generated/asm
 
443
 
428
444
# To make sure we do not include .config for any of the *config targets
429
445
# catch them early, and hand them over to scripts/kconfig/Makefile
430
446
# It is allowed to specify more targets when calling make, including
568
584
KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
569
585
endif
570
586
 
 
587
# This warning generated too much noise in a regular build.
 
588
# Use make W=1 to enable this warning (see scripts/Makefile.build)
 
589
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
 
590
 
571
591
ifdef CONFIG_FRAME_POINTER
572
592
KBUILD_CFLAGS   += -fno-omit-frame-pointer -fno-optimize-sibling-calls
573
593
else
613
633
KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
614
634
 
615
635
# disable pointer signed / unsigned warnings in gcc 4.0
616
 
KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
 
636
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)
617
637
 
618
638
# disable invalid "can't wrap" optimizations for signed / pointers
619
639
KBUILD_CFLAGS   += $(call cc-option,-fno-strict-overflow)
621
641
# conserve stack if available
622
642
KBUILD_CFLAGS   += $(call cc-option,-fconserve-stack)
623
643
 
 
644
# use the deterministic mode of AR if available
 
645
KBUILD_ARFLAGS := $(call ar-option,D)
 
646
 
624
647
# check for 'asm goto'
625
648
ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y)
626
649
        KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
806
829
# o The correct .tmp_kallsyms2.o is linked into the final vmlinux.
807
830
# o Verify that the System.map from vmlinux matches the map from
808
831
#   .tmp_vmlinux2, just in case we did not generate kallsyms correctly.
809
 
# o If CONFIG_KALLSYMS_EXTRA_PASS is set, do an extra pass using
 
832
# o If 'make KALLSYMS_EXTRA_PASS=1" was used, do an extra pass using
810
833
#   .tmp_vmlinux3 and .tmp_kallsyms3.o.  This is only meant as a
811
834
#   temporary bypass to allow the kernel to be built while the
812
835
#   maintainers work out what went wrong with kallsyms.
813
836
 
814
 
ifdef CONFIG_KALLSYMS_EXTRA_PASS
 
837
last_kallsyms := 2
 
838
 
 
839
ifdef KALLSYMS_EXTRA_PASS
 
840
ifneq ($(KALLSYMS_EXTRA_PASS),0)
815
841
last_kallsyms := 3
816
 
else
817
 
last_kallsyms := 2
 
842
endif
818
843
endif
819
844
 
820
845
kallsyms.o := .tmp_kallsyms$(last_kallsyms).o
825
850
          $(cmd_sysmap) .tmp_vmlinux$(last_kallsyms) .tmp_System.map
826
851
        $(Q)cmp -s System.map .tmp_System.map ||                             \
827
852
                (echo Inconsistent kallsyms data;                            \
828
 
                 echo Try setting CONFIG_KALLSYMS_EXTRA_PASS;                \
 
853
                 echo This is a bug - please report about it;                \
 
854
                 echo Try "make KALLSYMS_EXTRA_PASS=1" as a workaround;      \
829
855
                 rm .tmp_kallsyms* ; /bin/false )
830
856
endef
831
857
 
956
982
endif
957
983
 
958
984
# prepare2 creates a makefile if using a separate output directory
959
 
prepare2: prepare3 outputmakefile
 
985
prepare2: prepare3 outputmakefile asm-generic
960
986
 
961
987
prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \
962
988
                   include/config/auto.conf
988
1014
 
989
1015
define filechk_version.h
990
1016
        (echo \#define LINUX_VERSION_CODE $(shell                             \
991
 
        expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL));     \
 
1017
        expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL));    \
992
1018
        echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
993
1019
endef
994
1020
 
1000
1026
 
1001
1027
PHONY += headerdep
1002
1028
headerdep:
1003
 
        $(Q)find include/ -name '*.h' | xargs --max-args 1 scripts/headerdep.pl
 
1029
        $(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
 
1030
        $(srctree)/scripts/headerdep.pl -I$(srctree)/include
1004
1031
 
1005
1032
# ---------------------------------------------------------------------------
1006
1033
 
1030
1057
hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
1031
1058
 
1032
1059
PHONY += __headers
1033
 
__headers: include/linux/version.h scripts_basic FORCE
 
1060
__headers: include/linux/version.h scripts_basic asm-generic FORCE
1034
1061
        $(Q)$(MAKE) $(build)=scripts build_unifdef
1035
1062
 
1036
1063
PHONY += headers_install_all
1094
1121
 
1095
1122
PHONY += _modinst_
1096
1123
_modinst_:
1097
 
        @if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \
1098
 
                echo "Warning: you may need to install module-init-tools"; \
1099
 
                echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\
1100
 
                sleep 1; \
1101
 
        fi
1102
1124
        @rm -rf $(MODLIB)/kernel
1103
1125
        @rm -f $(MODLIB)/source
1104
1126
        @mkdir -p $(MODLIB)/kernel
1147
1169
                .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
1148
1170
 
1149
1171
# Directories & files removed with 'make mrproper'
1150
 
MRPROPER_DIRS  += include/config usr/include include/generated
 
1172
MRPROPER_DIRS  += include/config usr/include include/generated          \
 
1173
                  arch/*/include/generated
1151
1174
MRPROPER_FILES += .config .config.old .version .old_version             \
1152
1175
                  include/linux/version.h                               \
1153
1176
                  Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
1278
1301
        @echo  '  make O=dir [targets] Locate all output files in "dir", including .config'
1279
1302
        @echo  '  make C=1   [targets] Check all c source with $$CHECK (sparse by default)'
1280
1303
        @echo  '  make C=2   [targets] Force check of all c source with $$CHECK'
1281
 
        @echo  '  make W=1   [targets] Enable extra gcc checks'
 
1304
        @echo  '  make W=n   [targets] Enable extra gcc checks, n=1,2,3 where'
 
1305
        @echo  '                1: warnings which may be relevant and do not occur too often'
 
1306
        @echo  '                2: warnings which occur quite often but may still be relevant'
 
1307
        @echo  '                3: more obscure warnings, can most likely be ignored'
 
1308
        @echo  '                Multiple levels can be combined with W=12 or W=123'
 
1309
        @echo  '  make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
1282
1310
        @echo  ''
1283
1311
        @echo  'Execute "make" or "make all" to build all targets marked with [*] '
1284
1312
        @echo  'For further info see the ./README file'
1301
1329
# Documentation targets
1302
1330
# ---------------------------------------------------------------------------
1303
1331
%docs: scripts_basic FORCE
 
1332
        $(Q)$(MAKE) $(build)=scripts build_docproc
1304
1333
        $(Q)$(MAKE) $(build)=Documentation/DocBook $@
1305
1334
 
1306
1335
else # KBUILD_EXTMOD
1403
1432
# Scripts to check various things for consistency
1404
1433
# ---------------------------------------------------------------------------
1405
1434
 
 
1435
PHONY += includecheck versioncheck coccicheck namespacecheck export_report
 
1436
 
1406
1437
includecheck:
1407
 
        find * $(RCS_FIND_IGNORE) \
 
1438
        find $(srctree)/* $(RCS_FIND_IGNORE) \
1408
1439
                -name '*.[hcS]' -type f -print | sort \
1409
1440
                | xargs $(PERL) -w $(srctree)/scripts/checkincludes.pl
1410
1441
 
1411
1442
versioncheck:
1412
 
        find * $(RCS_FIND_IGNORE) \
 
1443
        find $(srctree)/* $(RCS_FIND_IGNORE) \
1413
1444
                -name '*.[hcS]' -type f -print | sort \
1414
1445
                | xargs $(PERL) -w $(srctree)/scripts/checkversion.pl
1415
1446
 
1506
1537
 
1507
1538
# Run depmod only if we have System.map and depmod is executable
1508
1539
quiet_cmd_depmod = DEPMOD  $(KERNELRELEASE)
1509
 
      cmd_depmod = \
1510
 
        if [ -r System.map -a -x $(DEPMOD) ]; then                              \
1511
 
                $(DEPMOD) -ae -F System.map                                     \
1512
 
                $(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) )     \
1513
 
                $(KERNELRELEASE);                                               \
1514
 
        fi
 
1540
      cmd_depmod = $(CONFIG_SHELL) $(srctree)/scripts/depmod.sh $(DEPMOD) \
 
1541
                   $(KERNELRELEASE)
1515
1542
 
1516
1543
# Create temporary dir for module support files
1517
1544
# clean it up only when building all modules