blob: a12b19da4b59ea061d42d0491b86cb410eeff1d9 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#
2# Makefile for the ia32 kernel emulation subsystem.
3#
4
5obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_ioctl.o \
6 ia32_signal.o tls32.o \
7 ia32_binfmt.o fpu32.o ptrace32.o syscall32.o
8
9sysv-$(CONFIG_SYSVIPC) := ipc32.o
10obj-$(CONFIG_IA32_EMULATION) += $(sysv-y)
11
12obj-$(CONFIG_IA32_AOUT) += ia32_aout.o
13
14$(obj)/syscall32.o: $(src)/syscall32.c \
15 $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so)
16
17# Teach kbuild about targets
18targets := $(foreach F,sysenter syscall,vsyscall-$F.o vsyscall-$F.so)
19
20# The DSO images are built using a special linker script
21quiet_cmd_syscall = SYSCALL $@
22 cmd_syscall = $(CC) -m32 -nostdlib -shared -s \
23 -Wl,-soname=linux-gate.so.1 -o $@ \
24 -Wl,-T,$(filter-out FORCE,$^)
25
26$(obj)/vsyscall-sysenter.so $(obj)/vsyscall-syscall.so: \
27$(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE
28 $(call if_changed,syscall)
29
30AFLAGS_vsyscall-sysenter.o = -m32
31AFLAGS_vsyscall-syscall.o = -m32
32CFLAGS_ia32_ioctl.o += -Ifs/