blob: d2936d0600bd8f913a8f06cc5d8f7420e3f98273 [file] [log] [blame]
David S. Millerf0e98c32008-03-03 15:01:05 -08001#
Linus Torvalds1da177e2005-04-16 15:20:36 -07002# Makefile for the linux kernel.
3#
4
Sam Ravnborgd670bd42008-12-03 03:08:37 -08005asflags-y := -ansi
6ccflags-y := -Werror
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
Sam Ravnborgd670bd42008-12-03 03:08:37 -08008extra-y := head_$(BITS).o
Sam Ravnborg51b563f2009-09-20 12:28:22 +02009
10# Undefine sparc when processing vmlinux.lds - it is used
11# And teach CPP we are doing $(BITS) builds (for this case)
12CPPFLAGS_vmlinux.lds := -Usparc -m$(BITS)
13extra-y += vmlinux.lds
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
David S. Millerf8e8a8e2010-04-06 17:34:15 -070015ifdef CONFIG_FUNCTION_TRACER
16# Do not profile debug and lowlevel utilities
17CFLAGS_REMOVE_ftrace.o := -pg
18CFLAGS_REMOVE_time_$(BITS).o := -pg
19CFLAGS_REMOVE_perf_event.o := -pg
20CFLAGS_REMOVE_pcr.o := -pg
21endif
22
Sam Ravnborgd670bd42008-12-03 03:08:37 -080023obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o
24obj-$(CONFIG_SPARC32) += etrap_32.o
25obj-$(CONFIG_SPARC32) += rtrap_32.o
26obj-y += traps_$(BITS).o
Al Viro5ea81762007-02-11 15:41:31 +000027
Sam Ravnborgd670bd42008-12-03 03:08:37 -080028# IRQ
29obj-y += irq_$(BITS).o
Sam Ravnborg2c1cfb22012-05-11 11:35:04 +000030obj-$(CONFIG_SPARC32) += sun4m_irq.o sun4d_irq.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
Sam Ravnborgd670bd42008-12-03 03:08:37 -080032obj-y += process_$(BITS).o
33obj-y += signal_$(BITS).o
David S. Miller55984732011-08-20 17:14:54 -070034obj-y += sigutil_$(BITS).o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080035obj-$(CONFIG_SPARC32) += ioport.o
36obj-y += setup_$(BITS).o
Sam Ravnborg680e58f2008-12-07 00:50:29 -080037obj-y += idprom.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080038obj-y += sys_sparc_$(BITS).o
39obj-$(CONFIG_SPARC32) += systbls_32.o
40obj-y += time_$(BITS).o
41obj-$(CONFIG_SPARC32) += windows.o
Sam Ravnborgd34dd822008-12-07 00:04:30 -080042obj-y += cpu.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080043obj-$(CONFIG_SPARC32) += devices.o
44obj-$(CONFIG_SPARC32) += tadpole.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080045obj-y += ptrace_$(BITS).o
46obj-y += unaligned_$(BITS).o
47obj-y += una_asm_$(BITS).o
David S. Millerdfa76062008-12-04 20:28:22 -080048obj-y += prom_common.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080049obj-y += prom_$(BITS).o
Robert Reifc9f5b7e2009-06-04 02:00:02 -070050obj-y += of_device_common.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080051obj-y += of_device_$(BITS).o
David S. Miller5fce09c2008-12-05 00:43:03 -080052obj-$(CONFIG_SPARC64) += prom_irqtrans.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080053
Sam Ravnborg5561cd22012-05-25 21:20:13 +000054obj-$(CONFIG_SPARC32) += leon_kernel.o
Sam Ravnborg556626a2012-05-26 04:43:27 +000055obj-$(CONFIG_SPARC32) += leon_pmc.o
Konrad Eisele0fd7ef12009-08-17 00:13:31 +000056
Sam Ravnborga88b5ba2008-12-03 03:11:52 -080057obj-$(CONFIG_SPARC64) += reboot.o
58obj-$(CONFIG_SPARC64) += sysfs.o
59obj-$(CONFIG_SPARC64) += iommu.o
60obj-$(CONFIG_SPARC64) += central.o
61obj-$(CONFIG_SPARC64) += starfire.o
62obj-$(CONFIG_SPARC64) += power.o
63obj-$(CONFIG_SPARC64) += sbus.o
64obj-$(CONFIG_SPARC64) += ebus.o
65obj-$(CONFIG_SPARC64) += visemul.o
66obj-$(CONFIG_SPARC64) += hvapi.o
67obj-$(CONFIG_SPARC64) += sstate.o
68obj-$(CONFIG_SPARC64) += mdesc.o
David S. Miller3eb80572009-01-21 21:30:23 -080069obj-$(CONFIG_SPARC64) += pcr.o
David S. Millere5553a62009-01-29 21:22:47 -080070obj-$(CONFIG_SPARC64) += nmi.o
Hong H. Pham280ff972009-06-04 02:10:11 -070071obj-$(CONFIG_SPARC64_SMP) += cpumap.o
Sam Ravnborga88b5ba2008-12-03 03:11:52 -080072
FUJITA Tomonori451d7402009-08-10 11:53:17 +090073obj-y += dma.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080074
Daniel Hellstromcfe3af52011-05-23 21:04:46 +000075obj-$(CONFIG_PCIC_PCI) += pcic.o
Daniel Hellstrom26893c12011-05-23 21:04:47 +000076obj-$(CONFIG_LEON_PCI) += leon_pci.o
Daniel Hellstrom1ab0a672013-03-05 07:04:21 +000077obj-$(CONFIG_SPARC_GRPCI2)+= leon_pci_grpci2.o
Daniel Hellstromd8650102013-03-05 07:03:30 +000078obj-$(CONFIG_SPARC_GRPCI1)+= leon_pci_grpci1.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080079
80obj-$(CONFIG_SMP) += trampoline_$(BITS).o smp_$(BITS).o
Konrad Eisele84017072009-08-31 22:08:13 +000081obj-$(CONFIG_SPARC32_SMP) += sun4m_smp.o sun4d_smp.o leon_smp.o
Sam Ravnborga88b5ba2008-12-03 03:11:52 -080082obj-$(CONFIG_SPARC64_SMP) += hvtramp.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080083
84obj-y += auxio_$(BITS).o
85obj-$(CONFIG_SUN_PM) += apc.o pmc.o
86
Sam Ravnborge6b04fe2008-12-26 15:38:17 -080087obj-$(CONFIG_MODULES) += module.o
Sam Ravnborgd670bd42008-12-03 03:08:37 -080088obj-$(CONFIG_MODULES) += sparc_ksyms_$(BITS).o
89obj-$(CONFIG_SPARC_LED) += led.o
90obj-$(CONFIG_KGDB) += kgdb_$(BITS).o
Sam Ravnborga88b5ba2008-12-03 03:11:52 -080091
92
93obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
David S. Miller9960e9e2010-04-07 04:41:33 -070094obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
Sam Ravnborga88b5ba2008-12-03 03:11:52 -080095
David S. Millerc57ec522009-11-27 17:33:43 -080096obj-$(CONFIG_EARLYFB) += btext.o
Sam Ravnborga88b5ba2008-12-03 03:11:52 -080097obj-$(CONFIG_STACKTRACE) += stacktrace.o
98# sparc64 PCI
99obj-$(CONFIG_SPARC64_PCI) += pci.o pci_common.o psycho_common.o
100obj-$(CONFIG_SPARC64_PCI) += pci_psycho.o pci_sabre.o pci_schizo.o
101obj-$(CONFIG_SPARC64_PCI) += pci_sun4v.o pci_sun4v_asm.o pci_fire.o
102obj-$(CONFIG_PCI_MSI) += pci_msi.o
103
104obj-$(CONFIG_COMPAT) += sys32.o sys_sparc32.o signal32.o
105
106# sparc64 cpufreq
107obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o
108obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o
109obj-$(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
121obj-$(CONFIG_SPARC64) += jump_label.o