blob: 0630e293cd493b0f1a7aba2f0d513d3ff1572145 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#
2# Makefile for the linux kernel.
3#
4
Adrian Bunkb03f6482008-07-25 01:45:35 -07005obj-y = sched.o fork.o exec_domain.o panic.o printk.o \
Max Krasnyansky68f4f1e2008-05-29 11:17:02 -07006 cpu.o exit.o itimer.o time.o softirq.o resource.o \
Pavel Emelyanovaee16ce2008-02-08 04:18:23 -08007 sysctl.o capability.o ptrace.o timer.o user.o \
Linus Torvalds1da177e2005-04-16 15:20:36 -07008 signal.o sys.o kmod.o workqueue.o pid.o \
Paul E. McKenneye260be62008-01-25 21:08:24 +01009 rcupdate.o extable.o params.o posix-timers.o \
Thomas Gleixnerc0a31322006-01-09 20:52:32 -080010 kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
Matthew Wilcox64ac24e2008-03-07 21:55:58 -050011 hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
Arjan van de Ven22a9d642009-01-07 08:45:46 -080012 notifier.o ksysfs.o pm_qos_params.o sched_clock.o cred.o \
13 async.o
Alexey Dobriyan30639b6a2009-06-16 15:33:40 -070014obj-y += groups.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070015
Steven Rostedt606576c2008-10-06 19:06:12 -040016ifdef CONFIG_FUNCTION_TRACER
Steven Rostedt6ec56232008-05-14 21:30:30 -040017# Do not trace debug files and internal ftrace files
18CFLAGS_REMOVE_lockdep.o = -pg
19CFLAGS_REMOVE_lockdep_proc.o = -pg
20CFLAGS_REMOVE_mutex-debug.o = -pg
21CFLAGS_REMOVE_rtmutex-debug.o = -pg
22CFLAGS_REMOVE_cgroup-debug.o = -pg
23CFLAGS_REMOVE_sched_clock.o = -pg
Steven Rostedt1d09daa2008-05-12 21:20:55 +020024endif
25
Matt Helsley8174f152008-10-18 20:27:19 -070026obj-$(CONFIG_FREEZER) += freezer.o
Adrian Bunkb03f6482008-07-25 01:45:35 -070027obj-$(CONFIG_PROFILING) += profile.o
Holger Schurig88f458e2008-04-29 01:02:36 -070028obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o
Ingo Molnar8637c092006-07-03 00:24:38 -070029obj-$(CONFIG_STACKTRACE) += stacktrace.o
john stultzad596172006-06-26 00:25:06 -070030obj-y += time/
Ingo Molnar408894e2006-01-09 15:59:20 -080031obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o
Ingo Molnarfbb9ce952006-07-03 00:24:50 -070032obj-$(CONFIG_LOCKDEP) += lockdep.o
Ingo Molnara8f24a32006-07-03 00:24:52 -070033ifeq ($(CONFIG_PROC_FS),y)
34obj-$(CONFIG_LOCKDEP) += lockdep_proc.o
35endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070036obj-$(CONFIG_FUTEX) += futex.o
Ingo Molnar34f192c2006-03-27 01:16:24 -080037ifeq ($(CONFIG_COMPAT),y)
38obj-$(CONFIG_FUTEX) += futex_compat.o
39endif
Ingo Molnar23f78d4a2006-06-27 02:54:53 -070040obj-$(CONFIG_RT_MUTEXES) += rtmutex.o
Ingo Molnare7eebaf2006-06-27 02:54:55 -070041obj-$(CONFIG_DEBUG_RT_MUTEXES) += rtmutex-debug.o
Thomas Gleixner61a87122006-06-27 02:54:56 -070042obj-$(CONFIG_RT_MUTEX_TESTER) += rtmutex-tester.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070043obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
Andrew Morton9316fca2009-01-14 09:35:44 -080044obj-$(CONFIG_USE_GENERIC_SMP_HELPERS) += smp.o
45ifneq ($(CONFIG_SMP),y)
Andrew Morton53ce3d92009-01-09 12:27:08 -080046obj-y += up.o
47endif
Max Krasnyansky68f4f1e2008-05-29 11:17:02 -070048obj-$(CONFIG_SMP) += spinlock.o
Ingo Molnarfb1c8f92005-09-10 00:25:56 -070049obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o
Ingo Molnar8a25d5d2006-07-03 00:24:54 -070050obj-$(CONFIG_PROVE_LOCKING) += spinlock.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070051obj-$(CONFIG_UID16) += uid16.o
52obj-$(CONFIG_MODULES) += module.o
53obj-$(CONFIG_KALLSYMS) += kallsyms.o
54obj-$(CONFIG_PM) += power/
Rafael J. Wysocki42f5e032009-02-18 14:48:21 -080055obj-$(CONFIG_FREEZER) += power/
Linus Torvalds1da177e2005-04-16 15:20:36 -070056obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
Eric W. Biedermandc009d92005-06-25 14:57:52 -070057obj-$(CONFIG_KEXEC) += kexec.o
Arjan van de Ven6dab2772008-01-30 13:33:08 +010058obj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070059obj-$(CONFIG_COMPAT) += compat.o
Paul Menageddbcc7e2007-10-18 23:39:30 -070060obj-$(CONFIG_CGROUPS) += cgroup.o
Paul Menage006cb992007-10-18 23:39:43 -070061obj-$(CONFIG_CGROUP_DEBUG) += cgroup_debug.o
Matt Helsleydc52ddc2008-10-18 20:27:21 -070062obj-$(CONFIG_CGROUP_FREEZER) += cgroup_freezer.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070063obj-$(CONFIG_CPUSETS) += cpuset.o
Serge E. Hallyn858d72e2007-10-18 23:39:45 -070064obj-$(CONFIG_CGROUP_NS) += ns_cgroup.o
Pavel Emelyanovaee16ce2008-02-08 04:18:23 -080065obj-$(CONFIG_UTS_NS) += utsname.o
66obj-$(CONFIG_USER_NS) += user_namespace.o
Pavel Emelyanov74bd59b2008-02-08 04:18:24 -080067obj-$(CONFIG_PID_NS) += pid_namespace.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070068obj-$(CONFIG_IKCONFIG) += configs.o
Pavel Emelianove552b662008-02-07 00:13:49 -080069obj-$(CONFIG_RESOURCE_COUNTERS) += res_counter.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070070obj-$(CONFIG_STOP_MACHINE) += stop_machine.o
Ananth N Mavinakayanahalli8c1c9352008-01-30 13:32:53 +010071obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o
David Woodhousefe7752b2005-12-15 18:33:52 +000072obj-$(CONFIG_AUDIT) += audit.o auditfilter.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070073obj-$(CONFIG_AUDITSYSCALL) += auditsc.o
Peter Oberparleiter2521f2c2009-06-17 16:28:08 -070074obj-$(CONFIG_GCOV_KERNEL) += gcov/
Al Viro74c3cbe2007-07-22 08:04:18 -040075obj-$(CONFIG_AUDIT_TREE) += audit_tree.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070076obj-$(CONFIG_KPROBES) += kprobes.o
Jason Wesseldc7d5522008-04-17 20:05:37 +020077obj-$(CONFIG_KGDB) += kgdb.o
Ingo Molnar8446f1d2005-09-06 15:16:27 -070078obj-$(CONFIG_DETECT_SOFTLOCKUP) += softlockup.o
Mandeep Singh Bainese162b392009-01-15 11:08:40 -080079obj-$(CONFIG_DETECT_HUNG_TASK) += hung_task.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070080obj-$(CONFIG_GENERIC_HARDIRQS) += irq/
81obj-$(CONFIG_SECCOMP) += seccomp.o
Paul E. McKenneya241ec62005-10-30 15:03:12 -080082obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o
Paul E. McKenneye260be62008-01-25 21:08:24 +010083obj-$(CONFIG_CLASSIC_RCU) += rcuclassic.o
Paul E. McKenney64db4cf2008-12-18 21:55:32 +010084obj-$(CONFIG_TREE_RCU) += rcutree.o
Paul E. McKenneye260be62008-01-25 21:08:24 +010085obj-$(CONFIG_PREEMPT_RCU) += rcupreempt.o
Paul E. McKenney64db4cf2008-12-18 21:55:32 +010086obj-$(CONFIG_TREE_RCU_TRACE) += rcutree_trace.o
87obj-$(CONFIG_PREEMPT_RCU_TRACE) += rcupreempt_trace.o
Jens Axboeb86ff9812006-03-23 19:56:55 +010088obj-$(CONFIG_RELAY) += relay.o
Eric W. Biederman39732ac2007-02-14 00:33:58 -080089obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
Shailabh Nagarca74e922006-07-14 00:24:36 -070090obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
Jay Lanf3cef7a2006-09-30 23:28:55 -070091obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
Mathieu Desnoyers8256e472007-10-18 23:41:06 -070092obj-$(CONFIG_MARKERS) += marker.o
Mathieu Desnoyers97e1c182008-07-18 12:16:16 -040093obj-$(CONFIG_TRACEPOINTS) += tracepoint.o
Arjan van de Ven97455122008-01-25 21:08:34 +010094obj-$(CONFIG_LATENCYTOP) += latencytop.o
Dmitry Baryshkovee7e5512008-06-29 14:18:46 +040095obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o
Steven Rostedt606576c2008-10-06 19:06:12 -040096obj-$(CONFIG_FUNCTION_TRACER) += trace/
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020097obj-$(CONFIG_TRACING) += trace/
Ingo Molnar56449f42009-04-14 11:24:36 +020098obj-$(CONFIG_X86_DS) += trace/
Paul Mundt1155de42009-06-25 14:30:12 +090099obj-$(CONFIG_RING_BUFFER) += trace/
Gregory Haskins6e0534f2008-05-12 21:21:01 +0200100obj-$(CONFIG_SMP) += sched_cpupri.o
David Howells07fe7cb2009-04-03 16:42:35 +0100101obj-$(CONFIG_SLOW_WORK) += slow-work.o
Thomas Gleixner0793a612008-12-04 20:12:29 +0100102obj-$(CONFIG_PERF_COUNTERS) += perf_counter.o
Linus Torvalds1da177e2005-04-16 15:20:36 -0700103
Ingo Molnarae1e9132008-11-11 09:05:16 +0100104ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105# 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
110CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer
111endif
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*
117targets += config_data.gz
118$(obj)/config_data.gz: .config FORCE
119 $(call if_changed,gzip)
120
121quiet_cmd_ikconfiggz = IKCFG $@
122 cmd_ikconfiggz = (echo "static const char kernel_config_data[] = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") > $@
123targets += config_data.h
124$(obj)/config_data.h: $(obj)/config_data.gz FORCE
125 $(call if_changed,ikconfiggz)
H. Peter Anvinbdc80782008-02-08 04:21:26 -0800126
127$(obj)/time.o: $(obj)/timeconst.h
128
129quiet_cmd_timeconst = TIMEC $@
130 cmd_timeconst = $(PERL) $< $(CONFIG_HZ) > $@
131targets += timeconst.h
132$(obj)/timeconst.h: $(src)/timeconst.pl FORCE
133 $(call if_changed,timeconst)