xref: /linux/arch/x86/kernel/Makefile (revision 8cbd9cc6254065c97c4bac42daa55ba1abe73a8e)
1#
2# Makefile for the linux kernel.
3#
4
5extra-y                := head_$(BITS).o head$(BITS).o head.o vmlinux.lds
6
7CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
8
9ifdef CONFIG_FUNCTION_TRACER
10# Do not profile debug and lowlevel utilities
11CFLAGS_REMOVE_tsc.o = -pg
12CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
13CFLAGS_REMOVE_pvclock.o = -pg
14CFLAGS_REMOVE_kvmclock.o = -pg
15CFLAGS_REMOVE_ftrace.o = -pg
16CFLAGS_REMOVE_early_printk.o = -pg
17endif
18
19obj-y			:= process_$(BITS).o signal.o entry_$(BITS).o
20obj-y			+= traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
21obj-y			+= time.o ioport.o ldt.o dumpstack.o nmi.o
22obj-y			+= setup.o x86_init.o i8259.o irqinit.o jump_label.o
23obj-$(CONFIG_IRQ_WORK)  += irq_work.o
24obj-y			+= probe_roms.o
25obj-$(CONFIG_X86_32)	+= i386_ksyms_32.o
26obj-$(CONFIG_X86_64)	+= sys_x86_64.o x8664_ksyms_64.o
27obj-y			+= syscall_$(BITS).o
28obj-$(CONFIG_X86_64)	+= vsyscall_64.o
29obj-$(CONFIG_X86_64)	+= vsyscall_emu_64.o
30obj-y			+= bootflag.o e820.o
31obj-y			+= pci-dma.o quirks.o topology.o kdebugfs.o
32obj-y			+= alternative.o i8253.o pci-nommu.o hw_breakpoint.o
33obj-y			+= tsc.o io_delay.o rtc.o
34obj-y			+= pci-iommu_table.o
35obj-y			+= resource.o
36
37obj-y				+= process.o
38obj-y				+= i387.o xsave.o
39obj-y				+= ptrace.o
40obj-$(CONFIG_X86_32)		+= tls.o
41obj-$(CONFIG_IA32_EMULATION)	+= tls.o
42obj-y				+= step.o
43obj-$(CONFIG_INTEL_TXT)		+= tboot.o
44obj-$(CONFIG_ISA_DMA_API)	+= i8237.o
45obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
46obj-y				+= cpu/
47obj-y				+= acpi/
48obj-y				+= reboot.o
49obj-$(CONFIG_X86_MSR)		+= msr.o
50obj-$(CONFIG_X86_CPUID)		+= cpuid.o
51obj-$(CONFIG_PCI)		+= early-quirks.o
52apm-y				:= apm_32.o
53obj-$(CONFIG_APM)		+= apm.o
54obj-$(CONFIG_SMP)		+= smp.o
55obj-$(CONFIG_SMP)		+= smpboot.o
56obj-$(CONFIG_SMP)		+= tsc_sync.o
57obj-$(CONFIG_SMP)		+= setup_percpu.o
58obj-$(CONFIG_X86_MPPARSE)	+= mpparse.o
59obj-y				+= apic/
60obj-$(CONFIG_X86_REBOOTFIXUPS)	+= reboot_fixups_32.o
61obj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o
62obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
63obj-$(CONFIG_FTRACE_SYSCALLS)	+= ftrace.o
64obj-$(CONFIG_X86_TSC)		+= trace_clock.o
65obj-$(CONFIG_KEXEC)		+= machine_kexec_$(BITS).o
66obj-$(CONFIG_KEXEC)		+= relocate_kernel_$(BITS).o crash.o
67obj-$(CONFIG_CRASH_DUMP)	+= crash_dump_$(BITS).o
68obj-$(CONFIG_KPROBES)		+= kprobes.o
69obj-$(CONFIG_OPTPROBES)		+= kprobes-opt.o
70obj-$(CONFIG_MODULES)		+= module.o
71obj-$(CONFIG_DOUBLEFAULT) 	+= doublefault_32.o
72obj-$(CONFIG_KGDB)		+= kgdb.o
73obj-$(CONFIG_VM86)		+= vm86_32.o
74obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
75
76obj-$(CONFIG_HPET_TIMER) 	+= hpet.o
77obj-$(CONFIG_APB_TIMER)		+= apb_timer.o
78
79obj-$(CONFIG_AMD_NB)		+= amd_nb.o
80obj-$(CONFIG_DEBUG_RODATA_TEST)	+= test_rodata.o
81obj-$(CONFIG_DEBUG_NX_TEST)	+= test_nx.o
82obj-$(CONFIG_DEBUG_NMI_SELFTEST) += nmi_selftest.o
83
84obj-$(CONFIG_KVM_GUEST)		+= kvm.o kvmclock.o
85obj-$(CONFIG_PARAVIRT)		+= paravirt.o paravirt_patch_$(BITS).o
86obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= paravirt-spinlocks.o
87obj-$(CONFIG_PARAVIRT_CLOCK)	+= pvclock.o
88
89obj-$(CONFIG_PCSPKR_PLATFORM)	+= pcspeaker.o
90
91microcode-y				:= microcode_core.o
92microcode-$(CONFIG_MICROCODE_INTEL)	+= microcode_intel.o
93microcode-$(CONFIG_MICROCODE_AMD)	+= microcode_amd.o
94obj-$(CONFIG_MICROCODE)			+= microcode.o
95
96obj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o
97
98obj-$(CONFIG_SWIOTLB)			+= pci-swiotlb.o
99obj-$(CONFIG_OF)			+= devicetree.o
100obj-$(CONFIG_UPROBES)			+= uprobes.o
101
102obj-$(CONFIG_PERF_EVENTS)		+= perf_regs.o
103
104###
105# 64 bit specific files
106ifeq ($(CONFIG_X86_64),y)
107	obj-$(CONFIG_AUDIT)		+= audit_64.o
108
109	obj-$(CONFIG_GART_IOMMU)	+= amd_gart_64.o aperture_64.o
110	obj-$(CONFIG_CALGARY_IOMMU)	+= pci-calgary_64.o tce_64.o
111
112	obj-$(CONFIG_PCI_MMCONFIG)	+= mmconf-fam10h_64.o
113	obj-y				+= vsmp_64.o
114endif
115