blob: d3a0e072ebe8cf6191913a01d66c8c269b9ca1f2 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Thomas Petazzonia988fb82013-09-11 12:32:05 +02002
David S. Millerf0e98c32008-03-03 15:01:05 -08003#
Linus Torvalds1da177e2005-04-16 15:20:36 -07004# Makefile for the linux kernel.
5#
6
Sam Ravnborgd670bd42008-12-03 03:08:37 -08007asflags-y := -ansi
8ccflags-y := -Werror
Linus Torvalds1da177e2005-04-16 15:20:36 -07009
Sam Ravnborgd670bd42008-12-03 03:08:37 -080010extra-y := head_$(BITS).o
Sam Ravnborg51b563f2009-09-20 12:28:22 +020011
12# Undefine sparc when processing vmlinux.lds - it is used
13# And teach CPP we are doing $(BITS) builds (for this case)
14CPPFLAGS_vmlinux.lds := -Usparc -m$(BITS)
15extra-y += vmlinux.lds
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
David S. Millerf8e8a8e2010-04-06 17:34:15 -070017ifdef CONFIG_FUNCTION_TRACER
18# Do not profile debug and lowlevel utilities
19CFLAGS_REMOVE_ftrace.o := -pg
20CFLAGS_REMOVE_time_$(BITS).o := -pg
21CFLAGS_REMOVE_perf_event.o := -pg
22CFLAGS_REMOVE_pcr.o := -pg
23endif
24
David S. Miller7cafc0b2016-05-28 20:41:12 -070025obj-$(CONFIG_SPARC64) += urtt_fill.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080026obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o
27obj-$(CONFIG_SPARC32) += etrap_32.o
28obj-$(CONFIG_SPARC32) += rtrap_32.o
29obj-y += traps_$(BITS).o
Al Viro5ea81762007-02-11 15:41:31 +000030
Sam Ravnborgd670bd42008-12-03 03:08:37 -080031# IRQ
32obj-y += irq_$(BITS).o
Sam Ravnborg2c1cfb22012-05-11 11:35:04 +000033obj-$(CONFIG_SPARC32) += sun4m_irq.o sun4d_irq.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070034
Sam Ravnborgd670bd42008-12-03 03:08:37 -080035obj-y += process_$(BITS).o
Christian Braunera4261d42020-05-12 19:15:26 +020036obj-y += process.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080037obj-y += signal_$(BITS).o
David S. Miller55984732011-08-20 17:14:54 -070038obj-y += sigutil_$(BITS).o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080039obj-$(CONFIG_SPARC32) += ioport.o
40obj-y += setup_$(BITS).o
Sam Ravnborg680e58f2008-12-07 00:50:29 -080041obj-y += idprom.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080042obj-y += sys_sparc_$(BITS).o
43obj-$(CONFIG_SPARC32) += systbls_32.o
44obj-y += time_$(BITS).o
45obj-$(CONFIG_SPARC32) += windows.o
Sam Ravnborgd34dd822008-12-07 00:04:30 -080046obj-y += cpu.o
Nagarathnam Muthusamy9a088622017-09-21 11:05:31 -040047obj-$(CONFIG_SPARC64) += vdso.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080048obj-$(CONFIG_SPARC32) += devices.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080049obj-y += ptrace_$(BITS).o
50obj-y += unaligned_$(BITS).o
51obj-y += una_asm_$(BITS).o
David S. Millerdfa76062008-12-04 20:28:22 -080052obj-y += prom_common.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080053obj-y += prom_$(BITS).o
Robert Reifc9f5b7e2009-06-04 02:00:02 -070054obj-y += of_device_common.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080055obj-y += of_device_$(BITS).o
David S. Miller5fce09c2008-12-05 00:43:03 -080056obj-$(CONFIG_SPARC64) += prom_irqtrans.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080057
Sam Ravnborg5561cd22012-05-25 21:20:13 +000058obj-$(CONFIG_SPARC32) += leon_kernel.o
Sam Ravnborg556626a2012-05-26 04:43:27 +000059obj-$(CONFIG_SPARC32) += leon_pmc.o
Konrad Eisele0fd7ef12009-08-17 00:13:31 +000060
Sam Ravnborga88b5ba2008-12-03 03:11:52 -080061obj-$(CONFIG_SPARC64) += reboot.o
62obj-$(CONFIG_SPARC64) += sysfs.o
Christoph Hellwig0d3fdb12018-04-03 15:34:58 +020063obj-$(CONFIG_SPARC64) += iommu.o iommu-common.o
Sam Ravnborga88b5ba2008-12-03 03:11:52 -080064obj-$(CONFIG_SPARC64) += central.o
65obj-$(CONFIG_SPARC64) += starfire.o
66obj-$(CONFIG_SPARC64) += power.o
67obj-$(CONFIG_SPARC64) += sbus.o
68obj-$(CONFIG_SPARC64) += ebus.o
69obj-$(CONFIG_SPARC64) += visemul.o
70obj-$(CONFIG_SPARC64) += hvapi.o
71obj-$(CONFIG_SPARC64) += sstate.o
72obj-$(CONFIG_SPARC64) += mdesc.o
Khalid Azizc6202ca2018-02-21 10:15:48 -070073obj-$(CONFIG_SPARC64) += adi_64.o
David S. Miller3eb80572009-01-21 21:30:23 -080074obj-$(CONFIG_SPARC64) += pcr.o
David S. Millere5553a62009-01-29 21:22:47 -080075obj-$(CONFIG_SPARC64) += nmi.o
Hong H. Pham280ff972009-06-04 02:10:11 -070076obj-$(CONFIG_SPARC64_SMP) += cpumap.o
Sam Ravnborga88b5ba2008-12-03 03:11:52 -080077
Daniel Hellstromcfe3af52011-05-23 21:04:46 +000078obj-$(CONFIG_PCIC_PCI) += pcic.o
Daniel Hellstrom26893c12011-05-23 21:04:47 +000079obj-$(CONFIG_LEON_PCI) += leon_pci.o
Daniel Hellstrom1ab0a672013-03-05 07:04:21 +000080obj-$(CONFIG_SPARC_GRPCI2)+= leon_pci_grpci2.o
Daniel Hellstromd8650102013-03-05 07:03:30 +000081obj-$(CONFIG_SPARC_GRPCI1)+= leon_pci_grpci1.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080082
83obj-$(CONFIG_SMP) += trampoline_$(BITS).o smp_$(BITS).o
Konrad Eisele84017072009-08-31 22:08:13 +000084obj-$(CONFIG_SPARC32_SMP) += sun4m_smp.o sun4d_smp.o leon_smp.o
Sam Ravnborga88b5ba2008-12-03 03:11:52 -080085obj-$(CONFIG_SPARC64_SMP) += hvtramp.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080086
87obj-y += auxio_$(BITS).o
88obj-$(CONFIG_SUN_PM) += apc.o pmc.o
89
Sam Ravnborge6b04fe2008-12-26 15:38:17 -080090obj-$(CONFIG_MODULES) += module.o
Al Virod3867f042016-01-16 21:39:30 -050091obj-$(CONFIG_MODULES) += sparc_ksyms.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080092obj-$(CONFIG_SPARC_LED) += led.o
93obj-$(CONFIG_KGDB) += kgdb_$(BITS).o
Sam Ravnborga88b5ba2008-12-03 03:11:52 -080094
95
96obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
David S. Miller9960e9e2010-04-07 04:41:33 -070097obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
Sam Ravnborga88b5ba2008-12-03 03:11:52 -080098
David S. Millerc57ec522009-11-27 17:33:43 -080099obj-$(CONFIG_EARLYFB) += btext.o
Sam Ravnborga88b5ba2008-12-03 03:11:52 -0800100obj-$(CONFIG_STACKTRACE) += stacktrace.o
101# sparc64 PCI
102obj-$(CONFIG_SPARC64_PCI) += pci.o pci_common.o psycho_common.o
103obj-$(CONFIG_SPARC64_PCI) += pci_psycho.o pci_sabre.o pci_schizo.o
104obj-$(CONFIG_SPARC64_PCI) += pci_sun4v.o pci_sun4v_asm.o pci_fire.o
Thomas Petazzonia988fb82013-09-11 12:32:05 +0200105obj-$(CONFIG_SPARC64_PCI_MSI) += pci_msi.o
Sam Ravnborga88b5ba2008-12-03 03:11:52 -0800106
107obj-$(CONFIG_COMPAT) += sys32.o sys_sparc32.o signal32.o
108
Sam Ravnborga88b5ba2008-12-03 03:11:52 -0800109obj-$(CONFIG_US3_MC) += chmc.o
110
111obj-$(CONFIG_KPROBES) += kprobes.o
112obj-$(CONFIG_SUN_LDOMS) += ldc.o vio.o viohs.o ds.o
113
114obj-$(CONFIG_AUDIT) += audit.o
115audit--$(CONFIG_AUDIT) := compat_audit.o
116obj-$(CONFIG_COMPAT) += $(audit--y)
David S. Miller59abbd12009-09-10 06:28:20 -0700117
Ingo Molnarcdd6c482009-09-21 12:02:48 +0200118pc--$(CONFIG_PERF_EVENTS) := perf_event.o
David S. Miller59abbd12009-09-10 06:28:20 -0700119obj-$(CONFIG_SPARC64) += $(pc--y)
David S. Millerdff9d3c2010-09-17 11:09:25 -0400120
Allen Paise8f4aa62016-10-13 10:06:13 +0530121obj-$(CONFIG_UPROBES) += uprobes.o
Masahiro Yamadae9666d12018-12-31 00:14:15 +0900122obj-$(CONFIG_JUMP_LABEL) += jump_label.o