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