blob: 53abf008ecb39758e1812f7a593323d65e7fd304 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#
2# Makefile for the linux kernel.
3#
4
Joe Perchesb9ee9792013-07-31 13:53:42 -07005obj-y = fork.o exec_domain.o panic.o \
Thomas Gleixner5cee9642014-06-22 12:06:40 +02006 cpu.o exit.o softirq.o resource.o \
7 sysctl.o sysctl_binary.o capability.o ptrace.o user.o \
Oleg Nesterove73f8952012-05-11 10:59:07 +10008 signal.o sys.o kmod.o workqueue.o pid.o task_work.o \
Thomas Gleixner5cee9642014-06-22 12:06:40 +02009 extable.o params.o \
10 kthread.o sys_ni.o nsproxy.o \
Robin Holt15d94b82013-07-08 16:01:32 -070011 notifier.o ksysfs.o cred.o reboot.o \
Iulia Manda28138932015-04-15 16:16:41 -070012 async.o range.o smpboot.o
13
14obj-$(CONFIG_MULTIUSER) += groups.o
Peter Zijlstra029632f2011-10-25 10:00:11 +020015
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
Heiko Carstensc0a80c02015-01-09 13:06:33 +010018CFLAGS_REMOVE_cgroup-debug.o = $(CC_FLAGS_FTRACE)
19CFLAGS_REMOVE_irq_work.o = $(CC_FLAGS_FTRACE)
Steven Rostedt1d09daa2008-05-12 21:20:55 +020020endif
21
Andi Kleen58edae32014-02-08 09:01:10 +010022# cond_syscall is currently not LTO compatible
23CFLAGS_sys_ni.o = $(DISABLE_LTO)
24
Peter Zijlstra391e43d2011-11-15 17:14:39 +010025obj-y += sched/
Peter Zijlstra01768b42013-10-31 18:11:53 +010026obj-y += locking/
Rafael J. Wysockidae5cbc2012-01-14 00:33:03 +010027obj-y += power/
Joe Perchesb9ee9792013-07-31 13:53:42 -070028obj-y += printk/
Martin Schwidefsky0244ad02013-08-30 09:39:53 +020029obj-y += irq/
Paul E. McKenney4102ada2013-10-08 20:23:47 -070030obj-y += rcu/
Seth Jenningsb700e7f2014-12-16 11:58:19 -060031obj-y += livepatch/
Peter Zijlstra391e43d2011-11-15 17:14:39 +010032
Cyrill Gorcunov1e142b22013-02-27 17:05:58 -080033obj-$(CONFIG_CHECKPOINT_RESTORE) += kcmp.o
Matt Helsley8174f152008-10-18 20:27:19 -070034obj-$(CONFIG_FREEZER) += freezer.o
Adrian Bunkb03f6482008-07-25 01:45:35 -070035obj-$(CONFIG_PROFILING) += profile.o
Ingo Molnar8637c092006-07-03 00:24:38 -070036obj-$(CONFIG_STACKTRACE) += stacktrace.o
john stultzad596172006-06-26 00:25:06 -070037obj-y += time/
Linus Torvalds1da177e2005-04-16 15:20:36 -070038obj-$(CONFIG_FUTEX) += futex.o
Ingo Molnar34f192c2006-03-27 01:16:24 -080039ifeq ($(CONFIG_COMPAT),y)
40obj-$(CONFIG_FUTEX) += futex_compat.o
41endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070042obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
Amerigo Wang351f8f82011-01-12 16:59:39 -080043obj-$(CONFIG_SMP) += smp.o
Andrew Morton9316fca2009-01-14 09:35:44 -080044ifneq ($(CONFIG_SMP),y)
Andrew Morton53ce3d92009-01-09 12:27:08 -080045obj-y += up.o
46endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070047obj-$(CONFIG_UID16) += uid16.o
48obj-$(CONFIG_MODULES) += module.o
David Howellsb56e5a12013-08-30 16:07:30 +010049obj-$(CONFIG_MODULE_SIG) += module_signing.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070050obj-$(CONFIG_KALLSYMS) += kallsyms.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070051obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
Dave Young2965faa2015-09-09 15:38:55 -070052obj-$(CONFIG_KEXEC_CORE) += kexec_core.o
Eric W. Biedermandc009d92005-06-25 14:57:52 -070053obj-$(CONFIG_KEXEC) += kexec.o
Dave Younga43cac02015-09-09 15:38:51 -070054obj-$(CONFIG_KEXEC_FILE) += kexec_file.o
Arjan van de Ven6dab2772008-01-30 13:33:08 +010055obj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070056obj-$(CONFIG_COMPAT) += compat.o
Paul Menageddbcc7e2007-10-18 23:39:30 -070057obj-$(CONFIG_CGROUPS) += cgroup.o
Matt Helsleydc52ddc2008-10-18 20:27:21 -070058obj-$(CONFIG_CGROUP_FREEZER) += cgroup_freezer.o
Aleksa Sarai49b786e2015-06-09 21:32:10 +100059obj-$(CONFIG_CGROUP_PIDS) += cgroup_pids.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070060obj-$(CONFIG_CPUSETS) += cpuset.o
Pavel Emelyanovaee16ce2008-02-08 04:18:23 -080061obj-$(CONFIG_UTS_NS) += utsname.o
62obj-$(CONFIG_USER_NS) += user_namespace.o
Pavel Emelyanov74bd59b2008-02-08 04:18:24 -080063obj-$(CONFIG_PID_NS) += pid_namespace.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070064obj-$(CONFIG_IKCONFIG) += configs.o
Tejun Heobbf1bb32010-05-08 16:20:53 +020065obj-$(CONFIG_SMP) += stop_machine.o
Ananth N Mavinakayanahalli8c1c9352008-01-30 13:32:53 +010066obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o
Eric Paris939a67f2009-12-17 20:12:06 -050067obj-$(CONFIG_AUDIT) += audit.o auditfilter.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070068obj-$(CONFIG_AUDITSYSCALL) += auditsc.o
Richard Guy Briggs7f492942015-08-05 16:29:36 -040069obj-$(CONFIG_AUDIT_WATCH) += audit_watch.o audit_fsnotify.o
Al Viro74c3cbe2007-07-22 08:04:18 -040070obj-$(CONFIG_AUDIT_TREE) += audit_tree.o
Eric Paris939a67f2009-12-17 20:12:06 -050071obj-$(CONFIG_GCOV_KERNEL) += gcov/
Linus Torvalds1da177e2005-04-16 15:20:36 -070072obj-$(CONFIG_KPROBES) += kprobes.o
Jason Wesselc4338202009-05-19 07:49:32 -050073obj-$(CONFIG_KGDB) += debug/
Mandeep Singh Bainese162b392009-01-15 11:08:40 -080074obj-$(CONFIG_DETECT_HUNG_TASK) += hung_task.o
Don Zickus58687ac2010-05-07 17:11:44 -040075obj-$(CONFIG_LOCKUP_DETECTOR) += watchdog.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070076obj-$(CONFIG_SECCOMP) += seccomp.o
Jens Axboeb86ff9812006-03-23 19:56:55 +010077obj-$(CONFIG_RELAY) += relay.o
Eric W. Biederman39732ac2007-02-14 00:33:58 -080078obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
Shailabh Nagarca74e922006-07-14 00:24:36 -070079obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
Jay Lanf3cef7a2006-09-30 23:28:55 -070080obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
Mathieu Desnoyers97e1c182008-07-18 12:16:16 -040081obj-$(CONFIG_TRACEPOINTS) += tracepoint.o
Arjan van de Ven97455122008-01-25 21:08:34 +010082obj-$(CONFIG_LATENCYTOP) += latencytop.o
Daisuke HATAYAMA1fcccba2010-03-05 13:44:07 -080083obj-$(CONFIG_BINFMT_ELF) += elfcore.o
84obj-$(CONFIG_COMPAT_BINFMT_ELF) += elfcore.o
85obj-$(CONFIG_BINFMT_ELF_FDPIC) += elfcore.o
Steven Rostedt606576c2008-10-06 19:06:12 -040086obj-$(CONFIG_FUNCTION_TRACER) += trace/
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020087obj-$(CONFIG_TRACING) += trace/
Josh Triplettea632e92012-09-02 19:45:14 -070088obj-$(CONFIG_TRACE_CLOCK) += trace/
Paul Mundt1155de42009-06-25 14:30:12 +090089obj-$(CONFIG_RING_BUFFER) += trace/
Mathieu Desnoyers870915e2010-10-28 11:31:17 -040090obj-$(CONFIG_TRACEPOINTS) += trace/
Peter Zijlstrae360adb2010-10-14 14:01:34 +080091obj-$(CONFIG_IRQ_WORK) += irq_work.o
Colin Crossab100232011-02-10 02:04:45 -080092obj-$(CONFIG_CPU_PM) += cpu_pm.o
Alexei Starovoitovf89b7752014-10-23 18:41:08 -070093obj-$(CONFIG_BPF) += bpf/
Borislav Petkovfae85b72010-10-26 20:24:03 +020094
95obj-$(CONFIG_PERF_EVENTS) += events/
96
Avi Kivity7a041092009-10-25 14:24:45 +020097obj-$(CONFIG_USER_RETURN_NOTIFIER) += user-return-notifier.o
Steffen Klassert16295be2010-01-06 19:47:10 +110098obj-$(CONFIG_PADATA) += padata.o
Olaf Hering93a72052011-03-23 16:43:29 -070099obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
Jason Baronb77f0f32011-08-05 16:40:40 -0400100obj-$(CONFIG_JUMP_LABEL) += jump_label.o
Frederic Weisbecker91d1aa432012-11-27 19:33:25 +0100101obj-$(CONFIG_CONTEXT_TRACKING) += context_tracking.o
Paul E. McKenney51b11302014-01-27 11:49:39 -0800102obj-$(CONFIG_TORTURE_TEST) += torture.o
Mathieu Desnoyers5b25b132015-09-11 13:07:39 -0700103obj-$(CONFIG_MEMBARRIER) += membarrier.o
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104
Dan Williams92281dee2015-08-10 23:07:06 -0400105obj-$(CONFIG_HAS_IOMEM) += memremap.o
106
Linus Torvalds1da177e2005-04-16 15:20:36 -0700107$(obj)/configs.o: $(obj)/config_data.h
108
109# config_data.h contains the same information as ikconfig.h but gzipped.
110# Info from config_data can be extracted from /proc/config*
111targets += config_data.gz
Ben Gardiner41263fc2010-12-14 11:39:44 -0500112$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700113 $(call if_changed,gzip)
114
Vivek Goyal8370ede2014-08-08 14:25:38 -0700115 filechk_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/basic/bin2c; echo "MAGIC_END;")
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116targets += config_data.h
117$(obj)/config_data.h: $(obj)/config_data.gz FORCE
Peter Foleye78e8f22011-07-05 19:42:18 -0400118 $(call filechk,ikconfiggz)