Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | # |
| 2 | # Makefile for the linux kernel. |
| 3 | # |
| 4 | |
Adrian Bunk | b03f648 | 2008-07-25 01:45:35 -0700 | [diff] [blame] | 5 | obj-y = sched.o fork.o exec_domain.o panic.o printk.o \ |
Max Krasnyansky | 68f4f1e | 2008-05-29 11:17:02 -0700 | [diff] [blame] | 6 | cpu.o exit.o itimer.o time.o softirq.o resource.o \ |
Pavel Emelyanov | aee16ce | 2008-02-08 04:18:23 -0800 | [diff] [blame] | 7 | sysctl.o capability.o ptrace.o timer.o user.o \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | signal.o sys.o kmod.o workqueue.o pid.o \ |
Paul E. McKenney | e260be6 | 2008-01-25 21:08:24 +0100 | [diff] [blame] | 9 | rcupdate.o extable.o params.o posix-timers.o \ |
Thomas Gleixner | c0a3132 | 2006-01-09 20:52:32 -0800 | [diff] [blame] | 10 | kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \ |
Matthew Wilcox | 64ac24e | 2008-03-07 21:55:58 -0500 | [diff] [blame] | 11 | hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \ |
Arjan van de Ven | 22a9d64 | 2009-01-07 08:45:46 -0800 | [diff] [blame] | 12 | notifier.o ksysfs.o pm_qos_params.o sched_clock.o cred.o \ |
| 13 | async.o |
Alexey Dobriyan | 30639b6a | 2009-06-16 15:33:40 -0700 | [diff] [blame] | 14 | obj-y += groups.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
Steven Rostedt | 606576c | 2008-10-06 19:06:12 -0400 | [diff] [blame] | 16 | ifdef CONFIG_FUNCTION_TRACER |
Steven Rostedt | 6ec5623 | 2008-05-14 21:30:30 -0400 | [diff] [blame] | 17 | # Do not trace debug files and internal ftrace files |
| 18 | CFLAGS_REMOVE_lockdep.o = -pg |
| 19 | CFLAGS_REMOVE_lockdep_proc.o = -pg |
| 20 | CFLAGS_REMOVE_mutex-debug.o = -pg |
| 21 | CFLAGS_REMOVE_rtmutex-debug.o = -pg |
| 22 | CFLAGS_REMOVE_cgroup-debug.o = -pg |
| 23 | CFLAGS_REMOVE_sched_clock.o = -pg |
Steven Rostedt | 1d09daa | 2008-05-12 21:20:55 +0200 | [diff] [blame] | 24 | endif |
| 25 | |
Matt Helsley | 8174f15 | 2008-10-18 20:27:19 -0700 | [diff] [blame] | 26 | obj-$(CONFIG_FREEZER) += freezer.o |
Adrian Bunk | b03f648 | 2008-07-25 01:45:35 -0700 | [diff] [blame] | 27 | obj-$(CONFIG_PROFILING) += profile.o |
Holger Schurig | 88f458e | 2008-04-29 01:02:36 -0700 | [diff] [blame] | 28 | obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o |
Ingo Molnar | 8637c09 | 2006-07-03 00:24:38 -0700 | [diff] [blame] | 29 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
john stultz | ad59617 | 2006-06-26 00:25:06 -0700 | [diff] [blame] | 30 | obj-y += time/ |
Ingo Molnar | 408894e | 2006-01-09 15:59:20 -0800 | [diff] [blame] | 31 | obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o |
Ingo Molnar | fbb9ce95 | 2006-07-03 00:24:50 -0700 | [diff] [blame] | 32 | obj-$(CONFIG_LOCKDEP) += lockdep.o |
Ingo Molnar | a8f24a3 | 2006-07-03 00:24:52 -0700 | [diff] [blame] | 33 | ifeq ($(CONFIG_PROC_FS),y) |
| 34 | obj-$(CONFIG_LOCKDEP) += lockdep_proc.o |
| 35 | endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | obj-$(CONFIG_FUTEX) += futex.o |
Ingo Molnar | 34f192c | 2006-03-27 01:16:24 -0800 | [diff] [blame] | 37 | ifeq ($(CONFIG_COMPAT),y) |
| 38 | obj-$(CONFIG_FUTEX) += futex_compat.o |
| 39 | endif |
Ingo Molnar | 23f78d4a | 2006-06-27 02:54:53 -0700 | [diff] [blame] | 40 | obj-$(CONFIG_RT_MUTEXES) += rtmutex.o |
Ingo Molnar | e7eebaf | 2006-06-27 02:54:55 -0700 | [diff] [blame] | 41 | obj-$(CONFIG_DEBUG_RT_MUTEXES) += rtmutex-debug.o |
Thomas Gleixner | 61a8712 | 2006-06-27 02:54:56 -0700 | [diff] [blame] | 42 | obj-$(CONFIG_RT_MUTEX_TESTER) += rtmutex-tester.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o |
Andrew Morton | 9316fca | 2009-01-14 09:35:44 -0800 | [diff] [blame] | 44 | obj-$(CONFIG_USE_GENERIC_SMP_HELPERS) += smp.o |
| 45 | ifneq ($(CONFIG_SMP),y) |
Andrew Morton | 53ce3d9 | 2009-01-09 12:27:08 -0800 | [diff] [blame] | 46 | obj-y += up.o |
| 47 | endif |
Max Krasnyansky | 68f4f1e | 2008-05-29 11:17:02 -0700 | [diff] [blame] | 48 | obj-$(CONFIG_SMP) += spinlock.o |
Ingo Molnar | fb1c8f9 | 2005-09-10 00:25:56 -0700 | [diff] [blame] | 49 | obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o |
Ingo Molnar | 8a25d5d | 2006-07-03 00:24:54 -0700 | [diff] [blame] | 50 | obj-$(CONFIG_PROVE_LOCKING) += spinlock.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | obj-$(CONFIG_UID16) += uid16.o |
| 52 | obj-$(CONFIG_MODULES) += module.o |
| 53 | obj-$(CONFIG_KALLSYMS) += kallsyms.o |
| 54 | obj-$(CONFIG_PM) += power/ |
Rafael J. Wysocki | 42f5e03 | 2009-02-18 14:48:21 -0800 | [diff] [blame] | 55 | obj-$(CONFIG_FREEZER) += power/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o |
Eric W. Biederman | dc009d9 | 2005-06-25 14:57:52 -0700 | [diff] [blame] | 57 | obj-$(CONFIG_KEXEC) += kexec.o |
Arjan van de Ven | 6dab277 | 2008-01-30 13:33:08 +0100 | [diff] [blame] | 58 | obj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | obj-$(CONFIG_COMPAT) += compat.o |
Paul Menage | ddbcc7e | 2007-10-18 23:39:30 -0700 | [diff] [blame] | 60 | obj-$(CONFIG_CGROUPS) += cgroup.o |
Paul Menage | 006cb99 | 2007-10-18 23:39:43 -0700 | [diff] [blame] | 61 | obj-$(CONFIG_CGROUP_DEBUG) += cgroup_debug.o |
Matt Helsley | dc52ddc | 2008-10-18 20:27:21 -0700 | [diff] [blame] | 62 | obj-$(CONFIG_CGROUP_FREEZER) += cgroup_freezer.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 63 | obj-$(CONFIG_CPUSETS) += cpuset.o |
Serge E. Hallyn | 858d72e | 2007-10-18 23:39:45 -0700 | [diff] [blame] | 64 | obj-$(CONFIG_CGROUP_NS) += ns_cgroup.o |
Pavel Emelyanov | aee16ce | 2008-02-08 04:18:23 -0800 | [diff] [blame] | 65 | obj-$(CONFIG_UTS_NS) += utsname.o |
| 66 | obj-$(CONFIG_USER_NS) += user_namespace.o |
Pavel Emelyanov | 74bd59b | 2008-02-08 04:18:24 -0800 | [diff] [blame] | 67 | obj-$(CONFIG_PID_NS) += pid_namespace.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | obj-$(CONFIG_IKCONFIG) += configs.o |
Pavel Emelianov | e552b66 | 2008-02-07 00:13:49 -0800 | [diff] [blame] | 69 | obj-$(CONFIG_RESOURCE_COUNTERS) += res_counter.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | obj-$(CONFIG_STOP_MACHINE) += stop_machine.o |
Ananth N Mavinakayanahalli | 8c1c935 | 2008-01-30 13:32:53 +0100 | [diff] [blame] | 71 | obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o |
David Woodhouse | fe7752b | 2005-12-15 18:33:52 +0000 | [diff] [blame] | 72 | obj-$(CONFIG_AUDIT) += audit.o auditfilter.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 73 | obj-$(CONFIG_AUDITSYSCALL) += auditsc.o |
Peter Oberparleiter | 2521f2c | 2009-06-17 16:28:08 -0700 | [diff] [blame] | 74 | obj-$(CONFIG_GCOV_KERNEL) += gcov/ |
Al Viro | 74c3cbe | 2007-07-22 08:04:18 -0400 | [diff] [blame] | 75 | obj-$(CONFIG_AUDIT_TREE) += audit_tree.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | obj-$(CONFIG_KPROBES) += kprobes.o |
Jason Wessel | dc7d552 | 2008-04-17 20:05:37 +0200 | [diff] [blame] | 77 | obj-$(CONFIG_KGDB) += kgdb.o |
Ingo Molnar | 8446f1d | 2005-09-06 15:16:27 -0700 | [diff] [blame] | 78 | obj-$(CONFIG_DETECT_SOFTLOCKUP) += softlockup.o |
Mandeep Singh Baines | e162b39 | 2009-01-15 11:08:40 -0800 | [diff] [blame] | 79 | obj-$(CONFIG_DETECT_HUNG_TASK) += hung_task.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | obj-$(CONFIG_GENERIC_HARDIRQS) += irq/ |
| 81 | obj-$(CONFIG_SECCOMP) += seccomp.o |
Paul E. McKenney | a241ec6 | 2005-10-30 15:03:12 -0800 | [diff] [blame] | 82 | obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o |
Paul E. McKenney | e260be6 | 2008-01-25 21:08:24 +0100 | [diff] [blame] | 83 | obj-$(CONFIG_CLASSIC_RCU) += rcuclassic.o |
Paul E. McKenney | 64db4cf | 2008-12-18 21:55:32 +0100 | [diff] [blame] | 84 | obj-$(CONFIG_TREE_RCU) += rcutree.o |
Paul E. McKenney | e260be6 | 2008-01-25 21:08:24 +0100 | [diff] [blame] | 85 | obj-$(CONFIG_PREEMPT_RCU) += rcupreempt.o |
Paul E. McKenney | 64db4cf | 2008-12-18 21:55:32 +0100 | [diff] [blame] | 86 | obj-$(CONFIG_TREE_RCU_TRACE) += rcutree_trace.o |
| 87 | obj-$(CONFIG_PREEMPT_RCU_TRACE) += rcupreempt_trace.o |
Jens Axboe | b86ff981 | 2006-03-23 19:56:55 +0100 | [diff] [blame] | 88 | obj-$(CONFIG_RELAY) += relay.o |
Eric W. Biederman | 39732ac | 2007-02-14 00:33:58 -0800 | [diff] [blame] | 89 | obj-$(CONFIG_SYSCTL) += utsname_sysctl.o |
Shailabh Nagar | ca74e92 | 2006-07-14 00:24:36 -0700 | [diff] [blame] | 90 | obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o |
Jay Lan | f3cef7a | 2006-09-30 23:28:55 -0700 | [diff] [blame] | 91 | obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o |
Mathieu Desnoyers | 8256e47 | 2007-10-18 23:41:06 -0700 | [diff] [blame] | 92 | obj-$(CONFIG_MARKERS) += marker.o |
Mathieu Desnoyers | 97e1c18 | 2008-07-18 12:16:16 -0400 | [diff] [blame] | 93 | obj-$(CONFIG_TRACEPOINTS) += tracepoint.o |
Arjan van de Ven | 9745512 | 2008-01-25 21:08:34 +0100 | [diff] [blame] | 94 | obj-$(CONFIG_LATENCYTOP) += latencytop.o |
Dmitry Baryshkov | ee7e551 | 2008-06-29 14:18:46 +0400 | [diff] [blame] | 95 | obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o |
Steven Rostedt | 606576c | 2008-10-06 19:06:12 -0400 | [diff] [blame] | 96 | obj-$(CONFIG_FUNCTION_TRACER) += trace/ |
Steven Rostedt | bc0c38d | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 97 | obj-$(CONFIG_TRACING) += trace/ |
Ingo Molnar | 56449f4 | 2009-04-14 11:24:36 +0200 | [diff] [blame] | 98 | obj-$(CONFIG_X86_DS) += trace/ |
Paul Mundt | 1155de4 | 2009-06-25 14:30:12 +0900 | [diff] [blame^] | 99 | obj-$(CONFIG_RING_BUFFER) += trace/ |
Gregory Haskins | 6e0534f | 2008-05-12 21:21:01 +0200 | [diff] [blame] | 100 | obj-$(CONFIG_SMP) += sched_cpupri.o |
David Howells | 07fe7cb | 2009-04-03 16:42:35 +0100 | [diff] [blame] | 101 | obj-$(CONFIG_SLOW_WORK) += slow-work.o |
Thomas Gleixner | 0793a61 | 2008-12-04 20:12:29 +0100 | [diff] [blame] | 102 | obj-$(CONFIG_PERF_COUNTERS) += perf_counter.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 103 | |
Ingo Molnar | ae1e913 | 2008-11-11 09:05:16 +0100 | [diff] [blame] | 104 | ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is |
| 106 | # needed for x86 only. Why this used to be enabled for all architectures is beyond |
| 107 | # me. I suspect most platforms don't need this, but until we know that for sure |
| 108 | # I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k |
| 109 | # to get a correct value for the wait-channel (WCHAN in ps). --davidm |
| 110 | CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer |
| 111 | endif |
| 112 | |
| 113 | $(obj)/configs.o: $(obj)/config_data.h |
| 114 | |
| 115 | # config_data.h contains the same information as ikconfig.h but gzipped. |
| 116 | # Info from config_data can be extracted from /proc/config* |
| 117 | targets += config_data.gz |
| 118 | $(obj)/config_data.gz: .config FORCE |
| 119 | $(call if_changed,gzip) |
| 120 | |
| 121 | quiet_cmd_ikconfiggz = IKCFG $@ |
| 122 | cmd_ikconfiggz = (echo "static const char kernel_config_data[] = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") > $@ |
| 123 | targets += config_data.h |
| 124 | $(obj)/config_data.h: $(obj)/config_data.gz FORCE |
| 125 | $(call if_changed,ikconfiggz) |
H. Peter Anvin | bdc8078 | 2008-02-08 04:21:26 -0800 | [diff] [blame] | 126 | |
| 127 | $(obj)/time.o: $(obj)/timeconst.h |
| 128 | |
| 129 | quiet_cmd_timeconst = TIMEC $@ |
| 130 | cmd_timeconst = $(PERL) $< $(CONFIG_HZ) > $@ |
| 131 | targets += timeconst.h |
| 132 | $(obj)/timeconst.h: $(src)/timeconst.pl FORCE |
| 133 | $(call if_changed,timeconst) |