source: trunk/packages/xen-common/xen-common/linux-2.6-xen-sparse/arch/i386/kernel/Makefile @ 34

Last change on this file since 34 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

File size: 3.5 KB
Line 
1#
2# Makefile for the linux kernel.
3#
4
5extra-y := head.o init_task.o vmlinux.lds
6
7obj-y   := process.o semaphore.o signal.o entry.o traps.o irq.o \
8                ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
9                pci-dma.o i386_ksyms.o i387.o bootflag.o \
10                quirks.o i8237.o topology.o alternative.o i8253.o tsc.o
11
12obj-$(CONFIG_STACKTRACE)        += stacktrace.o
13obj-y                           += cpu/
14obj-y                           += acpi/
15obj-$(CONFIG_X86_BIOS_REBOOT)   += reboot.o
16obj-$(CONFIG_MCA)               += mca.o
17obj-$(CONFIG_X86_MSR)           += msr.o
18obj-$(CONFIG_X86_CPUID)         += cpuid.o
19obj-$(CONFIG_MICROCODE)         += microcode.o
20obj-$(CONFIG_APM)               += apm.o
21obj-$(CONFIG_X86_SMP)           += smp.o smpboot.o
22obj-$(CONFIG_X86_TRAMPOLINE)    += trampoline.o
23obj-$(CONFIG_X86_MPPARSE)       += mpparse.o
24obj-$(CONFIG_X86_LOCAL_APIC)    += apic.o nmi.o
25obj-$(CONFIG_X86_IO_APIC)       += io_apic.o
26obj-$(CONFIG_X86_REBOOTFIXUPS)  += reboot_fixups.o
27obj-$(CONFIG_KEXEC)             += machine_kexec.o relocate_kernel.o crash.o
28obj-$(CONFIG_CRASH_DUMP)        += crash_dump.o
29obj-$(CONFIG_X86_NUMAQ)         += numaq.o
30obj-$(CONFIG_X86_SUMMIT_NUMA)   += summit.o
31obj-$(CONFIG_KPROBES)           += kprobes.o
32obj-$(CONFIG_MODULES)           += module.o
33obj-y                           += sysenter.o vsyscall.o
34obj-$(CONFIG_ACPI_SRAT)         += srat.o
35obj-$(CONFIG_HPET_TIMER)        += time_hpet.o
36obj-$(CONFIG_EFI)               += efi.o efi_stub.o
37obj-$(CONFIG_DOUBLEFAULT)       += doublefault.o
38obj-$(CONFIG_VM86)              += vm86.o
39obj-$(CONFIG_EARLY_PRINTK)      += early_printk.o
40obj-$(CONFIG_HPET_TIMER)        += hpet.o
41obj-$(CONFIG_K8_NB)             += k8.o
42
43EXTRA_AFLAGS   := -traditional
44
45obj-$(CONFIG_SCx200)            += scx200.o
46
47ifdef CONFIG_XEN
48vsyscall_note := vsyscall-note-xen.o
49else
50vsyscall_note := vsyscall-note.o
51endif
52
53# vsyscall.o contains the vsyscall DSO images as __initdata.
54# We must build both images before we can assemble it.
55# Note: kbuild does not track this dependency due to usage of .incbin
56$(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so
57targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)
58targets += vsyscall-note.o vsyscall.lds
59
60# The DSO images are built using a special linker script.
61quiet_cmd_syscall = SYSCALL $@
62      cmd_syscall = $(CC) -m elf_i386 -nostdlib $(SYSCFLAGS_$(@F)) \
63                          -Wl,-T,$(filter-out FORCE,$^) -o $@
64
65export CPPFLAGS_vsyscall.lds += -P -C -U$(ARCH)
66
67vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 \
68                 $(call ld-option, -Wl$(comma)--hash-style=sysv)
69SYSCFLAGS_vsyscall-sysenter.so  = $(vsyscall-flags)
70SYSCFLAGS_vsyscall-int80.so     = $(vsyscall-flags)
71
72$(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \
73$(obj)/vsyscall-%.so: $(src)/vsyscall.lds \
74                      $(obj)/vsyscall-%.o $(obj)/$(vsyscall_note) FORCE
75        $(call if_changed,syscall)
76
77# We also create a special relocatable object that should mirror the symbol
78# table and layout of the linked DSO.  With ld -R we can then refer to
79# these symbols in the kernel code rather than hand-coded addresses.
80extra-y += vsyscall-syms.o
81$(obj)/built-in.o: $(obj)/vsyscall-syms.o
82$(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o
83
84SYSCFLAGS_vsyscall-syms.o = -r
85$(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \
86                        $(obj)/vsyscall-sysenter.o $(obj)/$(vsyscall_note) FORCE
87        $(call if_changed,syscall)
88
89k8-y                      += ../../x86_64/kernel/k8.o
90
91ifdef CONFIG_XEN
92include $(srctree)/scripts/Makefile.xen
93
94obj-y += fixup.o
95microcode-$(subst m,y,$(CONFIG_MICROCODE)) := microcode-xen.o
96n-obj-xen := i8259.o timers/ reboot.o smpboot.o trampoline.o
97
98obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
99obj-y := $(call cherrypickxen, $(obj-y))
100extra-y := $(call cherrypickxen, $(extra-y))
101%/head-xen.o %/head-xen.s: EXTRA_AFLAGS :=
102endif
Note: See TracBrowser for help on using the repository browser.