blob: 39c9834461b440bd2994d56db99d8d270510c5ba [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
Jonathan Austin8006b4d2013-04-24 11:51:38 +010042obj-$(CONFIG_SMP) += smp.o
43ifdef CONFIG_MMU
44obj-$(CONFIG_SMP) += smp_tlb.o
45endif
Russell Kinga8cbcd92009-05-16 11:51:14 +010046obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o
Russell Kingf32f4ce2009-05-16 12:14:21 +010047obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o
Marc Zyngier022c03a2012-01-11 17:25:17 +000048obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o
Rabin Vincentd82227c2012-02-18 17:50:06 +010049obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o
50obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o
Rabin Vincent09f05d82012-02-18 17:52:41 +010051obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o
Richard Purdiec587e4a2007-02-06 21:29:00 +010052obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
Rabin Vincentb21d55e2012-02-18 17:50:51 +010053obj-$(CONFIG_KPROBES) += kprobes.o kprobes-common.o patch.o
Jon Medhurst24371702011-04-19 17:56:58 +010054ifdef CONFIG_THUMB2_KERNEL
55obj-$(CONFIG_KPROBES) += kprobes-thumb.o
56else
Jon Medhurst691b2ff2011-07-06 10:49:07 +010057obj-$(CONFIG_KPROBES) += kprobes-arm.o
Jon Medhurst24371702011-04-19 17:56:58 +010058endif
Jon Medhurst9eed1792011-08-28 16:02:38 +010059obj-$(CONFIG_ARM_KPROBES_TEST) += test-kprobes.o
60test-kprobes-objs := kprobes-test.o
Jon Medhurstc7054aa2011-08-27 12:40:30 +010061ifdef CONFIG_THUMB2_KERNEL
62test-kprobes-objs += kprobes-test-thumb.o
Jon Medhurstc0cc6df2011-08-27 12:41:05 +010063else
64test-kprobes-objs += kprobes-test-arm.o
Jon Medhurstc7054aa2011-08-27 12:40:30 +010065endif
Nicolas Pitre687ad012006-01-14 16:35:31 +000066obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
Catalin Marinasd7f864b2008-04-18 22:43:06 +010067obj-$(CONFIG_ARM_THUMBEE) += thumbee.o
Jason Wessel5cbad0e2008-02-20 13:33:40 -060068obj-$(CONFIG_KGDB) += kgdb.o
Catalin Marinasadf8b372009-02-12 13:56:34 +010069obj-$(CONFIG_ARM_UNWIND) += unwind.o
Linus Walleijbc581772009-09-15 17:30:37 +010070obj-$(CONFIG_HAVE_TCM) += tcm.o
Grant Likely9eb8f672011-04-28 14:27:20 -060071obj-$(CONFIG_OF) += devtree.o
Mika Westerberg67742c82010-05-10 09:26:19 +010072obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
Leif Lindholm64d2dc32010-09-16 18:00:47 +010073obj-$(CONFIG_SWP_EMULATE) += swp_emulate.o
Russell King283a1b92010-11-08 10:11:19 +000074CFLAGS_swp_emulate.o := -Wa,-march=armv7-a
Will Deacon19852e52010-09-03 10:44:33 +010075obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070076
Lennert Buytenhekafe4b252006-12-03 18:51:14 +010077obj-$(CONFIG_CPU_XSCALE) += xscale-cp0.o
78obj-$(CONFIG_CPU_XSC3) += xscale-cp0.o
Eric Miao40305a52009-02-26 09:34:35 +080079obj-$(CONFIG_CPU_MOHAWK) += xscale-cp0.o
Haojian Zhuangef6c8442010-11-24 11:54:25 +080080obj-$(CONFIG_CPU_PJ4) += pj4-cp0.o
Lennert Buytenhekafe4b252006-12-03 18:51:14 +010081obj-$(CONFIG_IWMMXT) += iwmmxt.o
Will Deacon5505b202012-07-29 13:09:14 +010082obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o perf_event_cpu.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070083AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt
Vincent Guittotc9018aa2011-08-08 13:21:59 +010084obj-$(CONFIG_ARM_CPU_TOPOLOGY) += topology.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070085
86ifneq ($(CONFIG_ARCH_EBSA110),y)
87 obj-y += io.o
88endif
89
Hyok S. Choi3b920ce2006-04-24 09:45:35 +010090head-y := head$(MMUEXT).o
Linus Torvalds1da177e2005-04-16 15:20:36 -070091obj-$(CONFIG_DEBUG_LL) += debug.o
Catalin Marinas93fd03a82009-12-09 10:02:18 +000092obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070093
Dave Martin80c59da2012-02-09 08:47:17 -080094obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o
Stefano Stabellini05774082013-05-21 14:24:11 +000095ifeq ($(CONFIG_ARM_PSCI),y)
96obj-y += psci.o
97obj-$(CONFIG_SMP) += psci_smp.o
98endif
Dave Martin80c59da2012-02-09 08:47:17 -080099
Thomas Gleixner5290dc22012-05-03 09:02:50 +0000100extra-y := $(head-y) vmlinux.lds