[PATCH] uml: kludgy compilation fixes for x86-64 subarch modules support
[firefly-linux-kernel-4.4.55.git] / arch / um / sys-x86_64 / Makefile
1 #
2 # Copyright 2003 PathScale, Inc.
3 #
4 # Licensed under the GPL
5 #
6
7 #XXX: why into lib-y?
8 lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o mem.o memcpy.o \
9         ptrace.o ptrace_user.o semaphore.o sigcontext.o signal.o \
10         syscalls.o sysrq.o thunk.o syscall_table.o
11
12 obj-y := ksyms.o
13 obj-$(CONFIG_MODULES) += module.o um_module.o
14
15 USER_OBJS := ptrace_user.o sigcontext.o
16
17 include arch/um/scripts/Makefile.rules
18
19 SYMLINKS = bitops.c csum-copy.S csum-partial.c csum-wrappers.c memcpy.S \
20         semaphore.c thunk.S module.c
21
22 # this needs to be before the foreach, because clean-files does not accept
23 # complete paths like $(src)/$f.
24 clean-files := $(SYMLINKS)
25
26 targets += $(SYMLINKS)
27
28 SYMLINKS := $(foreach f,$(SYMLINKS),$(obj)/$f)
29
30 bitops.c-dir = lib
31 csum-copy.S-dir = lib
32 csum-partial.c-dir = lib
33 csum-wrappers.c-dir = lib
34 memcpy.S-dir = lib
35 semaphore.c-dir = kernel
36 thunk.S-dir = lib
37 module.c-dir = kernel
38
39 $(SYMLINKS): FORCE
40         $(call if_changed,make_link)
41
42 CFLAGS_csum-partial.o := -Dcsum_partial=arch_csum_partial