11da177e4SLinus Torvalds# 21da177e4SLinus Torvalds# Makefile for the linux kernel. 31da177e4SLinus Torvalds# 41da177e4SLinus Torvalds 5029632fbSPeter Zijlstraobj-y = fork.o exec_domain.o panic.o printk.o \ 668f4f1ecSMax Krasnyansky cpu.o exit.o itimer.o time.o softirq.o resource.o \ 7afa588b2SEric W. Biederman sysctl.o sysctl_binary.o capability.o ptrace.o timer.o user.o \ 8e73f8959SOleg Nesterov signal.o sys.o kmod.o workqueue.o pid.o task_work.o \ 9e260be67SPaul E. McKenney rcupdate.o extable.o params.o posix-timers.o \ 10c0a31329SThomas Gleixner kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \ 1164ac24e7SMatthew Wilcox hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \ 12391e43daSPeter Zijlstra notifier.o ksysfs.o cred.o \ 13eea62f83SAndi Kleen async.o range.o groups.o lglock.o 14029632fbSPeter Zijlstra 15606576ceSSteven Rostedtifdef CONFIG_FUNCTION_TRACER 166ec56232SSteven Rostedt# Do not trace debug files and internal ftrace files 176ec56232SSteven RostedtCFLAGS_REMOVE_lockdep.o = -pg 186ec56232SSteven RostedtCFLAGS_REMOVE_lockdep_proc.o = -pg 196ec56232SSteven RostedtCFLAGS_REMOVE_mutex-debug.o = -pg 206ec56232SSteven RostedtCFLAGS_REMOVE_rtmutex-debug.o = -pg 216ec56232SSteven RostedtCFLAGS_REMOVE_cgroup-debug.o = -pg 22e360adbeSPeter ZijlstraCFLAGS_REMOVE_irq_work.o = -pg 231d09daa5SSteven Rostedtendif 241d09daa5SSteven Rostedt 25391e43daSPeter Zijlstraobj-y += sched/ 26dae5cbc2SRafael J. Wysockiobj-y += power/ 27391e43daSPeter Zijlstra 28d97b46a6SCyrill Gorcunovifeq ($(CONFIG_CHECKPOINT_RESTORE),y) 29d97b46a6SCyrill Gorcunovobj-$(CONFIG_X86) += kcmp.o 30d97b46a6SCyrill Gorcunovendif 318174f150SMatt Helsleyobj-$(CONFIG_FREEZER) += freezer.o 32b03f6489SAdrian Bunkobj-$(CONFIG_PROFILING) += profile.o 338637c099SIngo Molnarobj-$(CONFIG_STACKTRACE) += stacktrace.o 34ad596171Sjohn stultzobj-y += time/ 35408894eeSIngo Molnarobj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o 36fbb9ce95SIngo Molnarobj-$(CONFIG_LOCKDEP) += lockdep.o 37a8f24a39SIngo Molnarifeq ($(CONFIG_PROC_FS),y) 38a8f24a39SIngo Molnarobj-$(CONFIG_LOCKDEP) += lockdep_proc.o 39a8f24a39SIngo Molnarendif 401da177e4SLinus Torvaldsobj-$(CONFIG_FUTEX) += futex.o 4134f192c6SIngo Molnarifeq ($(CONFIG_COMPAT),y) 4234f192c6SIngo Molnarobj-$(CONFIG_FUTEX) += futex_compat.o 4334f192c6SIngo Molnarendif 4423f78d4aSIngo Molnarobj-$(CONFIG_RT_MUTEXES) += rtmutex.o 45e7eebaf6SIngo Molnarobj-$(CONFIG_DEBUG_RT_MUTEXES) += rtmutex-debug.o 4661a87122SThomas Gleixnerobj-$(CONFIG_RT_MUTEX_TESTER) += rtmutex-tester.o 471da177e4SLinus Torvaldsobj-$(CONFIG_GENERIC_ISA_DMA) += dma.o 48351f8f8eSAmerigo Wangobj-$(CONFIG_SMP) += smp.o 4938498a67SThomas Gleixnerobj-$(CONFIG_SMP) += smpboot.o 509316fcacSAndrew Mortonifneq ($(CONFIG_SMP),y) 5153ce3d95SAndrew Mortonobj-y += up.o 5253ce3d95SAndrew Mortonendif 5368f4f1ecSMax Krasnyanskyobj-$(CONFIG_SMP) += spinlock.o 54fb1c8f93SIngo Molnarobj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o 558a25d5deSIngo Molnarobj-$(CONFIG_PROVE_LOCKING) += spinlock.o 561da177e4SLinus Torvaldsobj-$(CONFIG_UID16) += uid16.o 571da177e4SLinus Torvaldsobj-$(CONFIG_MODULES) += module.o 58106a4ee2SRusty Russellobj-$(CONFIG_MODULE_SIG) += module_signing.o 591da177e4SLinus Torvaldsobj-$(CONFIG_KALLSYMS) += kallsyms.o 601da177e4SLinus Torvaldsobj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o 61dc009d92SEric W. Biedermanobj-$(CONFIG_KEXEC) += kexec.o 626dab2778SArjan van de Venobj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o 631da177e4SLinus Torvaldsobj-$(CONFIG_COMPAT) += compat.o 64ddbcc7e8SPaul Menageobj-$(CONFIG_CGROUPS) += cgroup.o 65dc52ddc0SMatt Helsleyobj-$(CONFIG_CGROUP_FREEZER) += cgroup_freezer.o 661da177e4SLinus Torvaldsobj-$(CONFIG_CPUSETS) += cpuset.o 67aee16ce7SPavel Emelyanovobj-$(CONFIG_UTS_NS) += utsname.o 68aee16ce7SPavel Emelyanovobj-$(CONFIG_USER_NS) += user_namespace.o 6974bd59bbSPavel Emelyanovobj-$(CONFIG_PID_NS) += pid_namespace.o 701da177e4SLinus Torvaldsobj-$(CONFIG_IKCONFIG) += configs.o 71e552b661SPavel Emelianovobj-$(CONFIG_RESOURCE_COUNTERS) += res_counter.o 72bbf1bb3eSTejun Heoobj-$(CONFIG_SMP) += stop_machine.o 738c1c9356SAnanth N Mavinakayanahalliobj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o 74939a67fcSEric Parisobj-$(CONFIG_AUDIT) += audit.o auditfilter.o 751da177e4SLinus Torvaldsobj-$(CONFIG_AUDITSYSCALL) += auditsc.o 76939a67fcSEric Parisobj-$(CONFIG_AUDIT_WATCH) += audit_watch.o 7774c3cbe3SAl Viroobj-$(CONFIG_AUDIT_TREE) += audit_tree.o 78939a67fcSEric Parisobj-$(CONFIG_GCOV_KERNEL) += gcov/ 791da177e4SLinus Torvaldsobj-$(CONFIG_KPROBES) += kprobes.o 80c4338209SJason Wesselobj-$(CONFIG_KGDB) += debug/ 81e162b39aSMandeep Singh Bainesobj-$(CONFIG_DETECT_HUNG_TASK) += hung_task.o 8258687acbSDon Zickusobj-$(CONFIG_LOCKUP_DETECTOR) += watchdog.o 831da177e4SLinus Torvaldsobj-$(CONFIG_GENERIC_HARDIRQS) += irq/ 841da177e4SLinus Torvaldsobj-$(CONFIG_SECCOMP) += seccomp.o 85a241ec65SPaul E. McKenneyobj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o 8664db4cffSPaul E. McKenneyobj-$(CONFIG_TREE_RCU) += rcutree.o 87f41d911fSPaul E. McKenneyobj-$(CONFIG_TREE_PREEMPT_RCU) += rcutree.o 8864db4cffSPaul E. McKenneyobj-$(CONFIG_TREE_RCU_TRACE) += rcutree_trace.o 899b1d82faSPaul E. McKenneyobj-$(CONFIG_TINY_RCU) += rcutiny.o 90a57eb940SPaul E. McKenneyobj-$(CONFIG_TINY_PREEMPT_RCU) += rcutiny.o 91b86ff981SJens Axboeobj-$(CONFIG_RELAY) += relay.o 9239732acdSEric W. Biedermanobj-$(CONFIG_SYSCTL) += utsname_sysctl.o 93ca74e92bSShailabh Nagarobj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o 94f3cef7a9SJay Lanobj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o 9597e1c18eSMathieu Desnoyersobj-$(CONFIG_TRACEPOINTS) += tracepoint.o 969745512cSArjan van de Venobj-$(CONFIG_LATENCYTOP) += latencytop.o 971fcccbacSDaisuke HATAYAMAobj-$(CONFIG_BINFMT_ELF) += elfcore.o 981fcccbacSDaisuke HATAYAMAobj-$(CONFIG_COMPAT_BINFMT_ELF) += elfcore.o 991fcccbacSDaisuke HATAYAMAobj-$(CONFIG_BINFMT_ELF_FDPIC) += elfcore.o 100606576ceSSteven Rostedtobj-$(CONFIG_FUNCTION_TRACER) += trace/ 101bc0c38d1SSteven Rostedtobj-$(CONFIG_TRACING) += trace/ 10256449f43SIngo Molnarobj-$(CONFIG_X86_DS) += trace/ 1031155de47SPaul Mundtobj-$(CONFIG_RING_BUFFER) += trace/ 104870915e0SMathieu Desnoyersobj-$(CONFIG_TRACEPOINTS) += trace/ 105e360adbeSPeter Zijlstraobj-$(CONFIG_IRQ_WORK) += irq_work.o 106ab10023eSColin Crossobj-$(CONFIG_CPU_PM) += cpu_pm.o 107fae85b7cSBorislav Petkov 108fae85b7cSBorislav Petkovobj-$(CONFIG_PERF_EVENTS) += events/ 109fae85b7cSBorislav Petkov 1107a041097SAvi Kivityobj-$(CONFIG_USER_RETURN_NOTIFIER) += user-return-notifier.o 11116295becSSteffen Klassertobj-$(CONFIG_PADATA) += padata.o 11293a72052SOlaf Heringobj-$(CONFIG_CRASH_DUMP) += crash_dump.o 113b77f0f3cSJason Baronobj-$(CONFIG_JUMP_LABEL) += jump_label.o 1141da177e4SLinus Torvalds 1151da177e4SLinus Torvalds$(obj)/configs.o: $(obj)/config_data.h 1161da177e4SLinus Torvalds 1171da177e4SLinus Torvalds# config_data.h contains the same information as ikconfig.h but gzipped. 1181da177e4SLinus Torvalds# Info from config_data can be extracted from /proc/config* 1191da177e4SLinus Torvaldstargets += config_data.gz 12041263fc6SBen Gardiner$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE 1211da177e4SLinus Torvalds $(call if_changed,gzip) 1221da177e4SLinus Torvalds 123e78e8f2dSPeter Foley filechk_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") 1241da177e4SLinus Torvaldstargets += config_data.h 1251da177e4SLinus Torvalds$(obj)/config_data.h: $(obj)/config_data.gz FORCE 126e78e8f2dSPeter Foley $(call filechk,ikconfiggz) 127bdc80787SH. Peter Anvin 128bdc80787SH. Peter Anvin$(obj)/time.o: $(obj)/timeconst.h 129bdc80787SH. Peter Anvin 130bdc80787SH. Peter Anvinquiet_cmd_timeconst = TIMEC $@ 131bdc80787SH. Peter Anvin cmd_timeconst = $(PERL) $< $(CONFIG_HZ) > $@ 132bdc80787SH. Peter Anvintargets += timeconst.h 133bdc80787SH. Peter Anvin$(obj)/timeconst.h: $(src)/timeconst.pl FORCE 134bdc80787SH. Peter Anvin $(call if_changed,timeconst) 135*d441108cSDavid Howells 136*d441108cSDavid Howellsifeq ($(CONFIG_MODULE_SIG),y) 137*d441108cSDavid Howells 138*d441108cSDavid Howells############################################################################### 139*d441108cSDavid Howells# 140*d441108cSDavid Howells# If module signing is requested, say by allyesconfig, but a key has not been 141*d441108cSDavid Howells# supplied, then one will need to be generated to make sure the build does not 142*d441108cSDavid Howells# fail and that the kernel may be used afterwards. 143*d441108cSDavid Howells# 144*d441108cSDavid Howells############################################################################### 145*d441108cSDavid Howellssigning_key.priv signing_key.x509: x509.genkey 146*d441108cSDavid Howells @echo "###" 147*d441108cSDavid Howells @echo "### Now generating an X.509 key pair to be used for signing modules." 148*d441108cSDavid Howells @echo "###" 149*d441108cSDavid Howells @echo "### If this takes a long time, you might wish to run rngd in the" 150*d441108cSDavid Howells @echo "### background to keep the supply of entropy topped up. It" 151*d441108cSDavid Howells @echo "### needs to be run as root, and should use a hardware random" 152*d441108cSDavid Howells @echo "### number generator if one is available, eg:" 153*d441108cSDavid Howells @echo "###" 154*d441108cSDavid Howells @echo "### rngd -r /dev/hwrandom" 155*d441108cSDavid Howells @echo "###" 156*d441108cSDavid Howells openssl req -new -nodes -utf8 -sha1 -days 36500 -batch \ 157*d441108cSDavid Howells -x509 -config x509.genkey \ 158*d441108cSDavid Howells -outform DER -out signing_key.x509 \ 159*d441108cSDavid Howells -keyout signing_key.priv 160*d441108cSDavid Howells @echo "###" 161*d441108cSDavid Howells @echo "### Key pair generated." 162*d441108cSDavid Howells @echo "###" 163*d441108cSDavid Howells 164*d441108cSDavid Howellsx509.genkey: 165*d441108cSDavid Howells @echo Generating X.509 key generation config 166*d441108cSDavid Howells @echo >x509.genkey "[ req ]" 167*d441108cSDavid Howells @echo >>x509.genkey "default_bits = 4096" 168*d441108cSDavid Howells @echo >>x509.genkey "distinguished_name = req_distinguished_name" 169*d441108cSDavid Howells @echo >>x509.genkey "prompt = no" 170*d441108cSDavid Howells @echo >>x509.genkey "x509_extensions = myexts" 171*d441108cSDavid Howells @echo >>x509.genkey 172*d441108cSDavid Howells @echo >>x509.genkey "[ req_distinguished_name ]" 173*d441108cSDavid Howells @echo >>x509.genkey "O = Magrathea" 174*d441108cSDavid Howells @echo >>x509.genkey "CN = Glacier signing key" 175*d441108cSDavid Howells @echo >>x509.genkey "emailAddress = slartibartfast@magrathea.h2g2" 176*d441108cSDavid Howells @echo >>x509.genkey 177*d441108cSDavid Howells @echo >>x509.genkey "[ myexts ]" 178*d441108cSDavid Howells @echo >>x509.genkey "basicConstraints=critical,CA:FALSE" 179*d441108cSDavid Howells @echo >>x509.genkey "keyUsage=digitalSignature" 180*d441108cSDavid Howells @echo >>x509.genkey "subjectKeyIdentifier=hash" 181*d441108cSDavid Howells @echo >>x509.genkey "authorityKeyIdentifier=keyid" 182*d441108cSDavid Howellsendif 183*d441108cSDavid HowellsCLEAN_FILES += signing_key.priv signing_key.x509 x509.genkey 184