1 obj-$(CONFIG_SPU_FS) += spufs.o
2 spufs-y += inode.o file.o context.o switch.o syscalls.o
3 spufs-y += sched.o backing_ops.o hw_ops.o run.o
5 # Rules to build switch.o with the help of SPU tool chain
7 SPU_CC := $(SPU_CROSS)gcc
8 SPU_AS := $(SPU_CROSS)gcc
9 SPU_LD := $(SPU_CROSS)ld
10 SPU_OBJCOPY := $(SPU_CROSS)objcopy
11 SPU_CFLAGS := -O2 -Wall -I$(srctree)/include -I$(objtree)/include2
12 SPU_AFLAGS := -c -D__ASSEMBLY__ -I$(srctree)/include -I$(objtree)/include2
13 SPU_LDFLAGS := -N -Ttext=0x0
15 $(obj)/switch.o: $(obj)/spu_save_dump.h $(obj)/spu_restore_dump.h
18 cmd_spu_cc = $(SPU_CC) $(SPU_CFLAGS) -c -o $@ $<
19 quiet_cmd_spu_cc = SPU_CC $@
20 $(obj)/spu_%.o: $(src)/spu_%.c
21 $(call if_changed,spu_cc)
24 cmd_spu_as = $(SPU_AS) $(SPU_AFLAGS) -o $@ $<
25 quiet_cmd_spu_as = SPU_AS $@
26 $(obj)/spu_%.o: $(src)/spu_%.S
27 $(call if_changed,spu_as)
29 # Link SPU Executables
30 cmd_spu_ld = $(SPU_LD) $(SPU_LDFLAGS) -o $@ $^
31 quiet_cmd_spu_ld = SPU_LD $@
32 $(obj)/spu_%: $(obj)/spu_%_crt0.o $(obj)/spu_%.o
33 $(call if_changed,spu_ld)
35 # Copy into binary format
36 cmd_spu_objcopy = $(SPU_OBJCOPY) -O binary $< $@
37 quiet_cmd_spu_objcopy = OBJCOPY $@
38 $(obj)/spu_%.bin: $(src)/spu_%
39 $(call if_changed,spu_objcopy)
41 # create C code from ELF executable
44 echo " * $*_dump.h: Copyright (C) 2005 IBM." ; \
45 echo " * Hex-dump auto generated from $*.c." ; \
46 echo " * Do not edit!" ; \
48 echo "static unsigned int $*_code[] __page_aligned = {" ; \
49 hexdump -v -e '"0x" 4/1 "%02x" "," "\n"' $< ; \
52 quiet_cmd_hexdump = HEXDUMP $@
53 $(obj)/%_dump.h: $(obj)/%.bin
54 $(call if_changed,hexdump)