Merge tag 'locks-v3.16-2' of git://git.samba.org/jlayton/linux
[linux/fpc-iii.git] / arch / powerpc / kernel / vdso32 / Makefile
blob53e6c9b979ec6bd44d4892f62b281e5a4c0906b3
2 # List of files in the vdso, has to be asm only for now
4 obj-vdso32-$(CONFIG_PPC64) = getcpu.o
5 obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o \
6 $(obj-vdso32-y)
8 # Build rules
10 ifeq ($(CONFIG_PPC32),y)
11 CROSS32CC := $(CC)
12 endif
14 targets := $(obj-vdso32) vdso32.so vdso32.so.dbg
15 obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
17 GCOV_PROFILE := n
19 ccflags-y := -shared -fno-common -fno-builtin
20 ccflags-y += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
21 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
22 asflags-y := -D__VDSO32__ -s
24 obj-y += vdso32_wrapper.o
25 extra-y += vdso32.lds
26 CPPFLAGS_vdso32.lds += -P -C -Upowerpc
28 # Force dependency (incbin is bad)
29 $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
31 # link rule for the .so file, .lds has to be first
32 $(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32)
33 $(call if_changed,vdso32ld)
35 # strip rule for the .so file
36 $(obj)/%.so: OBJCOPYFLAGS := -S
37 $(obj)/%.so: $(obj)/%.so.dbg FORCE
38 $(call if_changed,objcopy)
40 # assembly rules for the .S files
41 $(obj-vdso32): %.o: %.S
42 $(call if_changed_dep,vdso32as)
44 # actual build commands
45 quiet_cmd_vdso32ld = VDSO32L $@
46 cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $^ -o $@
47 quiet_cmd_vdso32as = VDSO32A $@
48 cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $<
50 # install commands for the unstripped file
51 quiet_cmd_vdso_install = INSTALL $@
52 cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@
54 vdso32.so: $(obj)/vdso32.so.dbg
55 @mkdir -p $(MODLIB)/vdso
56 $(call cmd,vdso_install)
58 vdso_install: vdso32.so