Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
[pandora-kernel.git] / arch / powerpc / kernel / vdso64 / Makefile
1 # List of files in the vdso, has to be asm only for now
2
3 obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o
4
5 # Build rules
6
7 targets := $(obj-vdso64) vdso64.so vdso64.so.dbg
8 obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64))
9
10 GCOV_PROFILE := n
11
12 ccflags-y := -shared -fno-common -fno-builtin
13 ccflags-y += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
14                 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
15 asflags-y := -D__VDSO64__ -s
16
17 obj-y += vdso64_wrapper.o
18 extra-y += vdso64.lds
19 CPPFLAGS_vdso64.lds += -P -C -U$(ARCH)
20
21 # Force dependency (incbin is bad)
22 $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so
23
24 # link rule for the .so file, .lds has to be first
25 $(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64)
26         $(call if_changed,vdso64ld)
27
28 # strip rule for the .so file
29 $(obj)/%.so: OBJCOPYFLAGS := -S
30 $(obj)/%.so: $(obj)/%.so.dbg FORCE
31         $(call if_changed,objcopy)
32
33 # assembly rules for the .S files
34 $(obj-vdso64): %.o: %.S
35         $(call if_changed_dep,vdso64as)
36
37 # actual build commands
38 quiet_cmd_vdso64ld = VDSO64L $@
39       cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@
40 quiet_cmd_vdso64as = VDSO64A $@
41       cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $<
42
43 # install commands for the unstripped file
44 quiet_cmd_vdso_install = INSTALL $@
45       cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@
46
47 vdso64.so: $(obj)/vdso64.so.dbg
48         @mkdir -p $(MODLIB)/vdso
49         $(call cmd,vdso_install)
50
51 vdso_install: vdso64.so