Pull cpuidle into release branch
[linux-2.6] / arch / x86 / ia32 / Makefile
1 #
2 # Makefile for the ia32 kernel emulation subsystem.
3 #
4
5 obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o tls32.o \
6         ia32_binfmt.o fpu32.o ptrace32.o syscall32.o syscall32_syscall.o \
7         mmap32.o
8
9 sysv-$(CONFIG_SYSVIPC) := ipc32.o
10 obj-$(CONFIG_IA32_EMULATION) += $(sysv-y)
11
12 obj-$(CONFIG_IA32_AOUT) += ia32_aout.o
13
14 audit-class-$(CONFIG_AUDIT) := audit.o
15 obj-$(CONFIG_IA32_EMULATION) += $(audit-class-y)
16
17 $(obj)/syscall32_syscall.o: \
18         $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so)
19
20 # Teach kbuild about targets
21 targets := $(foreach F,$(addprefix vsyscall-,sysenter syscall),\
22                      $F.o $F.so $F.so.dbg)
23
24 # The DSO images are built using a special linker script
25 quiet_cmd_syscall = SYSCALL $@
26       cmd_syscall = $(CC) -m32 -nostdlib -shared \
27                           $(call ld-option, -Wl$(comma)--hash-style=sysv) \
28                            -Wl,-soname=linux-gate.so.1 -o $@ \
29                            -Wl,-T,$(filter-out FORCE,$^)
30
31 $(obj)/%.so: OBJCOPYFLAGS := -S
32 $(obj)/%.so: $(obj)/%.so.dbg FORCE
33         $(call if_changed,objcopy)
34
35 $(obj)/vsyscall-sysenter.so.dbg $(obj)/vsyscall-syscall.so.dbg: \
36 $(obj)/vsyscall-%.so.dbg: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE
37         $(call if_changed,syscall)
38
39 AFLAGS_vsyscall-sysenter.o = -m32 -Wa,-32
40 AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32
41
42 vdsos := vdso32-sysenter.so vdso32-syscall.so
43
44 quiet_cmd_vdso_install = INSTALL $@
45       cmd_vdso_install = cp $(@:vdso32-%.so=$(obj)/vsyscall-%.so.dbg) \
46                             $(MODLIB)/vdso/$@
47
48 $(vdsos):
49         @mkdir -p $(MODLIB)/vdso
50         $(call cmd,vdso_install)
51
52 vdso_install: $(vdsos)