blob: ad325a8c7e1e5d1dfbad11e8846169696d36e6bc [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 \
Russell King045ab942015-04-01 17:02:45 +010019 process.o ptrace.o reboot.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
Robert Leee1689792012-03-20 15:22:42 -050033obj-$(CONFIG_CPU_IDLE) += cpuidle.o
Russell King065909b2006-01-04 15:44:16 +000034obj-$(CONFIG_ISA_DMA_API) += dma.o
Dave Martindc2eb922011-05-23 12:22:10 +010035obj-$(CONFIG_FIQ) += fiq.o fiqasm.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070036obj-$(CONFIG_MODULES) += armksyms.o module.o
Ard Biesheuvel7d485f62014-11-24 16:54:35 +010037obj-$(CONFIG_ARM_MODULE_PLTS) += module-plts.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070038obj-$(CONFIG_ISA_DMA) += dma-isa.o
Russell King863dab42006-08-28 12:47:05 +010039obj-$(CONFIG_PCI) += bios32.o isa.o
Linus Torvalds1fdb24e2011-10-28 12:02:27 -070040obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o
Sebastian Capella603fb422014-03-25 01:20:29 +010041obj-$(CONFIG_HIBERNATION) += hibernate.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
Russell King82112372014-10-28 13:26:48 +000049obj-$(CONFIG_FUNCTION_TRACER) += entry-ftrace.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
Wang Nanfca08f32015-01-09 10:19:49 +080054# Main staffs in KPROBES are in arch/arm/probes/ .
Wang Nan0dc016d2015-01-09 14:37:36 +080055obj-$(CONFIG_KPROBES) += patch.o insn.o
Nicolas Pitre687ad012006-01-14 16:35:31 +000056obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
Catalin Marinasd7f864b2008-04-18 22:43:06 +010057obj-$(CONFIG_ARM_THUMBEE) += thumbee.o
Doug Anderson23a4e402014-04-22 15:14:51 -070058obj-$(CONFIG_KGDB) += kgdb.o patch.o
Catalin Marinasadf8b372009-02-12 13:56:34 +010059obj-$(CONFIG_ARM_UNWIND) += unwind.o
Linus Walleijbc581772009-09-15 17:30:37 +010060obj-$(CONFIG_HAVE_TCM) += tcm.o
Grant Likely9eb8f672011-04-28 14:27:20 -060061obj-$(CONFIG_OF) += devtree.o
Mika Westerberg67742c82010-05-10 09:26:19 +010062obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
Leif Lindholm64d2dc32010-09-16 18:00:47 +010063obj-$(CONFIG_SWP_EMULATE) += swp_emulate.o
Russell King283a1b92010-11-08 10:11:19 +000064CFLAGS_swp_emulate.o := -Wa,-march=armv7-a
Will Deacon19852e52010-09-03 10:44:33 +010065obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070066
Lennert Buytenhekafe4b252006-12-03 18:51:14 +010067obj-$(CONFIG_CPU_XSCALE) += xscale-cp0.o
68obj-$(CONFIG_CPU_XSC3) += xscale-cp0.o
Eric Miao40305a52009-02-26 09:34:35 +080069obj-$(CONFIG_CPU_MOHAWK) += xscale-cp0.o
Haojian Zhuangef6c8442010-11-24 11:54:25 +080070obj-$(CONFIG_CPU_PJ4) += pj4-cp0.o
Sebastian Hesselbarthd93003e2014-04-24 22:58:30 +010071obj-$(CONFIG_CPU_PJ4B) += pj4-cp0.o
Lennert Buytenhekafe4b252006-12-03 18:51:14 +010072obj-$(CONFIG_IWMMXT) += iwmmxt.o
Mark Rutlandd39976f2014-09-29 17:15:32 +010073obj-$(CONFIG_PERF_EVENTS) += perf_regs.o perf_callchain.o
Mark Rutlandfa8ad782015-07-06 12:23:53 +010074obj-$(CONFIG_HW_PERF_EVENTS) += perf_event_xscale.o perf_event_v6.o \
Mark Rutland29ba0f32015-05-26 17:23:38 +010075 perf_event_v7.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070076AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt
Vincent Guittotc9018aa2011-08-08 13:21:59 +010077obj-$(CONFIG_ARM_CPU_TOPOLOGY) += topology.o
Nathan Lynche5b61de2015-03-25 19:16:05 +010078obj-$(CONFIG_VDSO) += vdso.o
Ard Biesheuvelda58fb62015-09-24 13:49:52 -070079obj-$(CONFIG_EFI) += efi.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070080
81ifneq ($(CONFIG_ARCH_EBSA110),y)
82 obj-y += io.o
83endif
Stefano Stabellini02c24332015-11-23 10:32:57 +000084obj-$(CONFIG_PARAVIRT) += paravirt.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070085
Hyok S. Choi3b920ce2006-04-24 09:45:35 +010086head-y := head$(MMUEXT).o
Linus Torvalds1da177e2005-04-16 15:20:36 -070087obj-$(CONFIG_DEBUG_LL) += debug.o
Catalin Marinas93fd03a2009-12-09 10:02:18 +000088obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070089
Dave Martin80c59da2012-02-09 08:47:17 -080090obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o
Jean-Philippe Bruckerc7edd7f2016-02-19 11:04:45 +010091AFLAGS_hyp-stub.o :=-Wa,-march=armv7-a
Stefano Stabellini05774082013-05-21 14:24:11 +000092ifeq ($(CONFIG_ARM_PSCI),y)
Stefano Stabellini05774082013-05-21 14:24:11 +000093obj-$(CONFIG_SMP) += psci_smp.o
94endif
Dave Martin80c59da2012-02-09 08:47:17 -080095
Jens Wiklanderb329f952016-01-04 15:42:55 +010096obj-$(CONFIG_HAVE_ARM_SMCCC) += smccc-call.o
97
Thomas Gleixner5290dc22012-05-03 09:02:50 +000098extra-y := $(head-y) vmlinux.lds