ia64/xen-unstable

view linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile @ 6316:f7dfaa2af90c

merge?
author cl349@firebug.cl.cam.ac.uk
date Sun Aug 21 11:02:00 2005 +0000 (2005-08-21)
parents 1872e09bfba3
children 6721abf6b16d
line source
1 #
2 # Makefile for the linux kernel.
3 #
5 XENARCH := $(subst ",,$(CONFIG_XENARCH))
7 CFLAGS += -Iarch/$(XENARCH)/kernel
9 extra-y := head.o init_task.o
11 obj-y := process.o signal.o entry.o traps.o \
12 time.o ioport.o ldt.o setup.o \
13 pci-dma.o i386_ksyms.o irq.o quirks.o
15 c-obj-y := semaphore.o vm86.o \
16 ptrace.o sys_i386.o \
17 i387.o dmi_scan.o bootflag.o
18 s-obj-y :=
20 obj-y += cpu/
21 #obj-y += timers/
22 obj-$(CONFIG_ACPI_BOOT) += acpi/
23 #c-obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o
24 c-obj-$(CONFIG_MCA) += mca.o
25 c-obj-$(CONFIG_X86_MSR) += msr.o
26 c-obj-$(CONFIG_X86_CPUID) += cpuid.o
27 obj-$(CONFIG_MICROCODE) += microcode.o
28 c-obj-$(CONFIG_APM) += apm.o
29 obj-$(CONFIG_X86_SMP) += smp.o smpboot.o
30 #obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o
31 obj-$(CONFIG_X86_MPPARSE) += mpparse.o
32 obj-$(CONFIG_X86_LOCAL_APIC) += apic.o
33 c-obj-$(CONFIG_X86_LOCAL_APIC) += nmi.o
34 obj-$(CONFIG_X86_IO_APIC) += io_apic.o
35 c-obj-$(CONFIG_X86_REBOOTFIXUPS)+= reboot_fixups.o
36 c-obj-$(CONFIG_X86_NUMAQ) += numaq.o
37 c-obj-$(CONFIG_X86_SUMMIT_NUMA) += summit.o
38 c-obj-$(CONFIG_MODULES) += module.o
39 c-obj-y += sysenter.o
40 obj-y += vsyscall.o
41 c-obj-$(CONFIG_ACPI_SRAT) += srat.o
42 c-obj-$(CONFIG_HPET_TIMER) += time_hpet.o
43 c-obj-$(CONFIG_EFI) += efi.o efi_stub.o
44 c-obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
45 c-obj-$(CONFIG_SMP_ALTERNATIVES)+= smpalts.o
46 obj-$(CONFIG_SWIOTLB) += swiotlb.o
48 EXTRA_AFLAGS := -traditional
50 c-obj-$(CONFIG_SCx200) += scx200.o
52 # vsyscall.o contains the vsyscall DSO images as __initdata.
53 # We must build both images before we can assemble it.
54 # Note: kbuild does not track this dependency due to usage of .incbin
55 $(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so
56 targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)
57 targets += vsyscall-note.o vsyscall.lds
59 # The DSO images are built using a special linker script.
60 quiet_cmd_syscall = SYSCALL $@
61 cmd_syscall = $(CC) -m elf_i386 -nostdlib $(SYSCFLAGS_$(@F)) \
62 -Wl,-T,$(filter-out FORCE,$^) -o $@
64 export CPPFLAGS_vsyscall.lds += -P -C -U$(ARCH)
66 vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1
67 SYSCFLAGS_vsyscall-sysenter.so = $(vsyscall-flags)
68 SYSCFLAGS_vsyscall-int80.so = $(vsyscall-flags)
70 $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \
71 $(obj)/vsyscall-%.so: $(src)/vsyscall.lds \
72 $(obj)/vsyscall-%.o FORCE
73 $(call if_changed,syscall)
75 # We also create a special relocatable object that should mirror the symbol
76 # table and layout of the linked DSO. With ld -R we can then refer to
77 # these symbols in the kernel code rather than hand-coded addresses.
78 extra-y += vsyscall-syms.o
79 $(obj)/built-in.o: $(obj)/vsyscall-syms.o
80 $(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o
82 SYSCFLAGS_vsyscall-syms.o = -r
83 $(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \
84 $(obj)/vsyscall-sysenter.o FORCE
85 $(call if_changed,syscall)
87 c-link :=
88 s-link := vsyscall-int80.o vsyscall-sysenter.o vsyscall-sigreturn.o vsyscall.lds.o syscall_table.o
90 $(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-obj-m) $(c-link)) $(patsubst %.o,$(obj)/%.S,$(s-obj-y) $(s-link)):
91 @ln -fsn $(srctree)/arch/i386/kernel/$(notdir $@) $@
93 $(obj)/vsyscall-int80.S: $(obj)/vsyscall-sigreturn.S
95 EXTRA_AFLAGS += -I$(obj)
96 $(obj)/entry.o: $(src)/entry.S $(src)/syscall_table.S
98 obj-y += $(c-obj-y) $(s-obj-y)
99 obj-m += $(c-obj-m)
101 clean-files += $(patsubst %.o,%.c,$(c-obj-y) $(c-obj-m) $(c-obj-) $(c-link))
102 clean-files += $(patsubst %.o,%.S,$(s-obj-y) $(s-obj-) $(s-link))