First Support on Ginger and OMAP TI
[linux-ginger.git] / arch / powerpc / kernel / vdso32 / Makefile
blob51ead52141bd083774ed3ed13d8c71dc831f0f23
2 # List of files in the vdso, has to be asm only for now
4 obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o
6 # Build rules
8 ifeq ($(CONFIG_PPC32),y)
9 CROSS32CC := $(CC)
10 endif
12 targets := $(obj-vdso32) vdso32.so vdso32.so.dbg
13 obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
15 GCOV_PROFILE := n
17 EXTRA_CFLAGS := -shared -fno-common -fno-builtin
18 EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
19 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
20 EXTRA_AFLAGS := -D__VDSO32__ -s
22 obj-y += vdso32_wrapper.o
23 extra-y += vdso32.lds
24 CPPFLAGS_vdso32.lds += -P -C -Upowerpc
26 # Force dependency (incbin is bad)
27 $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
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)
33 # strip rule for the .so file
34 $(obj)/%.so: OBJCOPYFLAGS := -S
35 $(obj)/%.so: $(obj)/%.so.dbg FORCE
36 $(call if_changed,objcopy)
38 # assembly rules for the .S files
39 $(obj-vdso32): %.o: %.S
40 $(call if_changed_dep,vdso32as)
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 $@ $<
48 # install commands for the unstripped file
49 quiet_cmd_vdso_install = INSTALL $@
50 cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@
52 vdso32.so: $(obj)/vdso32.so.dbg
53 @mkdir -p $(MODLIB)/vdso
54 $(call cmd,vdso_install)
56 vdso_install: vdso32.so