blob: 38ddd9f83d0e586289c56bdbf1e38a6a977ff1a7 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#
2# Makefile for the linux kernel.
3#
4
Sam Ravnborg51b563f2009-09-20 12:28:22 +02005CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
6AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
Tim Bird376cfa82010-10-09 22:24:38 +05308ifdef CONFIG_FUNCTION_TRACER
Abhishek Sagar014c2572008-05-31 14:23:50 +05309CFLAGS_REMOVE_ftrace.o = -pg
Rabin Vincentd82227c2012-02-18 17:50:06 +010010CFLAGS_REMOVE_insn.o = -pg
Rabin Vincentb21d55e2012-02-18 17:50:51 +010011CFLAGS_REMOVE_patch.o = -pg
Abhishek Sagar014c2572008-05-31 14:23:50 +053012endif
13
Uwe Kleine-König4bf1fa52009-07-21 09:56:27 +010014CFLAGS_REMOVE_return_address.o = -pg
15
Linus Torvalds1da177e2005-04-16 15:20:36 -070016# Object file lists.
17
Uwe Kleine-König4477ca42013-03-21 21:02:37 +010018obj-y := elf.o entry-common.o irq.o opcodes.o \
Stephen Boyd38ff87f2013-06-01 23:39:40 -070019 process.o ptrace.o return_address.o \
Victor Kamensky574e2b52013-08-27 22:41:57 -070020 setup.o signal.o sigreturn_codes.o \
21 stacktrace.o sys_arm.o time.o traps.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
Nicolas Pitrebd51e2f2012-09-01 03:03:25 +010023obj-$(CONFIG_ATAGS) += atags_parse.o
24obj-$(CONFIG_ATAGS_PROC) += atags_proc.o
Nicolas Pitreaa783b62012-09-01 03:00:15 +010025obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o
Uwe Kleine-König73a65b32010-01-19 10:13:14 +010026
Uwe Kleine-König4477ca42013-03-21 21:02:37 +010027ifeq ($(CONFIG_CPU_V7M),y)
Uwe Kleine-König6a7d2c62013-08-27 21:15:02 +010028obj-y += entry-v7m.o v7m.o
Uwe Kleine-König4477ca42013-03-21 21:02:37 +010029else
30obj-y += entry-armv.o
31endif
32
Alexander Shishkinc5d6c772009-12-01 14:00:51 +010033obj-$(CONFIG_OC_ETM) += etm.o
Robert Leee1689792012-03-20 15:22:42 -050034obj-$(CONFIG_CPU_IDLE) += cpuidle.o
Russell King065909b2006-01-04 15:44:16 +000035obj-$(CONFIG_ISA_DMA_API) += dma.o
Dave Martindc2eb922011-05-23 12:22:10 +010036obj-$(CONFIG_FIQ) += fiq.o fiqasm.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070037obj-$(CONFIG_MODULES) += armksyms.o module.o
38obj-$(CONFIG_ARTHUR) += arthur.o
39obj-$(CONFIG_ISA_DMA) += dma-isa.o
Russell King863dab42006-08-28 12:47:05 +010040obj-$(CONFIG_PCI) += bios32.o isa.o
Linus Torvalds1fdb24e2011-10-28 12:02:27 -070041obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o
Sebastian Capella603fb422014-03-25 01:20:29 +010042obj-$(CONFIG_HIBERNATION) += hibernate.o
Jonathan Austin8006b4d2013-04-24 11:51:38 +010043obj-$(CONFIG_SMP) += smp.o
44ifdef CONFIG_MMU
45obj-$(CONFIG_SMP) += smp_tlb.o
46endif
Russell Kinga8cbcd92009-05-16 11:51:14 +010047obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o
Russell Kingf32f4ce2009-05-16 12:14:21 +010048obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o
Marc Zyngier022c03a2012-01-11 17:25:17 +000049obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o
Rabin Vincentd82227c2012-02-18 17:50:06 +010050obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o
51obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o
Rabin Vincent09f05d82012-02-18 17:52:41 +010052obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o
Richard Purdiec587e4a2007-02-06 21:29:00 +010053obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
David A. Longc7edc9e2014-03-07 11:23:04 -050054obj-$(CONFIG_UPROBES) += probes.o probes-arm.o uprobes.o uprobes-arm.o
David A. Longc18377c2014-03-07 11:16:10 -050055obj-$(CONFIG_KPROBES) += probes.o kprobes.o kprobes-common.o patch.o
Jon Medhurst24371702011-04-19 17:56:58 +010056ifdef CONFIG_THUMB2_KERNEL
David A. Long87abef62014-03-05 21:06:29 -050057obj-$(CONFIG_KPROBES) += kprobes-thumb.o probes-thumb.o
Jon Medhurst24371702011-04-19 17:56:58 +010058else
David A. Longc18377c2014-03-07 11:16:10 -050059obj-$(CONFIG_KPROBES) += kprobes-arm.o probes-arm.o
Jon Medhurst24371702011-04-19 17:56:58 +010060endif
Jon Medhurst9eed1792011-08-28 16:02:38 +010061obj-$(CONFIG_ARM_KPROBES_TEST) += test-kprobes.o
62test-kprobes-objs := kprobes-test.o
Jon Medhurstc7054aa2011-08-27 12:40:30 +010063ifdef CONFIG_THUMB2_KERNEL
64test-kprobes-objs += kprobes-test-thumb.o
Jon Medhurstc0cc6df2011-08-27 12:41:05 +010065else
66test-kprobes-objs += kprobes-test-arm.o
Jon Medhurstc7054aa2011-08-27 12:40:30 +010067endif
Nicolas Pitre687ad012006-01-14 16:35:31 +000068obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
Catalin Marinasd7f864b2008-04-18 22:43:06 +010069obj-$(CONFIG_ARM_THUMBEE) += thumbee.o
Jason Wessel5cbad0e2008-02-20 13:33:40 -060070obj-$(CONFIG_KGDB) += kgdb.o
Catalin Marinasadf8b372009-02-12 13:56:34 +010071obj-$(CONFIG_ARM_UNWIND) += unwind.o
Linus Walleijbc581772009-09-15 17:30:37 +010072obj-$(CONFIG_HAVE_TCM) += tcm.o
Grant Likely9eb8f672011-04-28 14:27:20 -060073obj-$(CONFIG_OF) += devtree.o
Mika Westerberg67742c82010-05-10 09:26:19 +010074obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
Leif Lindholm64d2dc32010-09-16 18:00:47 +010075obj-$(CONFIG_SWP_EMULATE) += swp_emulate.o
Russell King283a1b92010-11-08 10:11:19 +000076CFLAGS_swp_emulate.o := -Wa,-march=armv7-a
Will Deacon19852e52010-09-03 10:44:33 +010077obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070078
Lennert Buytenhekafe4b252006-12-03 18:51:14 +010079obj-$(CONFIG_CPU_XSCALE) += xscale-cp0.o
80obj-$(CONFIG_CPU_XSC3) += xscale-cp0.o
Eric Miao40305a52009-02-26 09:34:35 +080081obj-$(CONFIG_CPU_MOHAWK) += xscale-cp0.o
Haojian Zhuangef6c8442010-11-24 11:54:25 +080082obj-$(CONFIG_CPU_PJ4) += pj4-cp0.o
Sebastian Hesselbarthd93003e2014-04-24 22:58:30 +010083obj-$(CONFIG_CPU_PJ4B) += pj4-cp0.o
Lennert Buytenhekafe4b252006-12-03 18:51:14 +010084obj-$(CONFIG_IWMMXT) += iwmmxt.o
Will Deacon49863892013-09-26 12:36:35 +010085obj-$(CONFIG_PERF_EVENTS) += perf_regs.o
Will Deacon5505b202012-07-29 13:09:14 +010086obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o perf_event_cpu.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070087AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt
Vincent Guittotc9018aa2011-08-08 13:21:59 +010088obj-$(CONFIG_ARM_CPU_TOPOLOGY) += topology.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070089
90ifneq ($(CONFIG_ARCH_EBSA110),y)
91 obj-y += io.o
92endif
93
Hyok S. Choi3b920ce2006-04-24 09:45:35 +010094head-y := head$(MMUEXT).o
Linus Torvalds1da177e2005-04-16 15:20:36 -070095obj-$(CONFIG_DEBUG_LL) += debug.o
Catalin Marinas93fd03a82009-12-09 10:02:18 +000096obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070097
Dave Martin80c59da2012-02-09 08:47:17 -080098obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o
Stefano Stabellini05774082013-05-21 14:24:11 +000099ifeq ($(CONFIG_ARM_PSCI),y)
100obj-y += psci.o
101obj-$(CONFIG_SMP) += psci_smp.o
102endif
Dave Martin80c59da2012-02-09 08:47:17 -0800103
Thomas Gleixner5290dc22012-05-03 09:02:50 +0000104extra-y := $(head-y) vmlinux.lds