Mercurial > sdl-ios-xcode
comparison src/video/ps3/spulibs/Makefile @ 3257:94fb40a4a9a7
Merged Martin's code changes from Google Summer of Code 2009
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 07 Sep 2009 04:51:29 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3256:83c87f2b2aab | 3257:94fb40a4a9a7 |
---|---|
1 # This Makefile is for building the CELL BE SPU libs | |
2 # libfb_writer_spu.so, libyuv2rgb_spu.so, libbilin_scaler_spu.so | |
3 | |
4 # Toolchain | |
5 PPU_LD=/usr/bin/ld | |
6 SPU_SRCDIR=$(srcdir)/src/video/ps3/spulibs | |
7 SPU_LIBDIR=$(srcdir)/src/video/ps3/spulibs/libs | |
8 SPU_CFLAGS=-g -W -Wall -Winline -Wno-main -I. -I /usr/spu/include -I /opt/cell/sdk/usr/spu/include -finline-limit=10000 -Winline -ftree-vectorize -funroll-loops -fmodulo-sched -ffast-math -fPIC -O2 | |
9 | |
10 DEPS = $(SPU_SRCDIR)/spu_common.h | |
11 LIBS= fb_writer yuv2rgb bilin_scaler | |
12 | |
13 OBJLIBS = $(foreach lib,$(LIBS),lib$(lib)_spu.a) | |
14 SHALIBS = $(foreach lib,$(LIBS),lib$(lib)_spu.so) | |
15 | |
16 | |
17 ps3libs: $(foreach lib,$(OBJLIBS),$(SPU_LIBDIR)/$(lib)) $(foreach lib,$(SHALIBS),$(SPU_LIBDIR)/$(lib)) | |
18 | |
19 | |
20 $(SPU_LIBDIR)/lib%_spu.a: $(SPU_LIBDIR)/%-embed.o | |
21 $(AR) -qcs $@ $< | |
22 | |
23 $(SPU_LIBDIR)/lib%_spu.so: $(SPU_LIBDIR)/%-embed.o | |
24 $(PPU_LD) -o $@ -shared -soname=$(notdir $@) $< | |
25 | |
26 $(SPU_LIBDIR)/%-embed.o: $(SPU_LIBDIR)/%.o | |
27 $(EMBEDSPU) -m32 $(subst -embed.o,,$(notdir $@))_spu $< $@ | |
28 | |
29 $(SPU_LIBDIR)/%.o: $(SPU_SRCDIR)/%.c $(DEPS) | |
30 $(SPU_GCC) $(SPU_CFLAGS) -o $@ $< -lm | |
31 | |
32 | |
33 ps3libs-install: $(foreach obj,$(OBJLIBS),$(SPU_LIBDIR)/$(obj)) $(foreach obj,$(SHALIBS),$(SPU_LIBDIR)/$(obj)) | |
34 for file in $(OBJLIBS); do \ | |
35 $(INSTALL) -c -m 0655 $(SPU_LIBDIR)/$$file $(DESTDIR)$(libdir)/$$file; \ | |
36 done | |
37 for file in $(SHALIBS); do \ | |
38 $(INSTALL) -c -m 0755 $(SPU_LIBDIR)/$$file $(DESTDIR)$(libdir)/$$file; \ | |
39 done | |
40 | |
41 ps3libs-uninstall: | |
42 for file in $(OBJLIBS) $(SHALIBS); do \ | |
43 rm -f $(DESTDIR)$(libdir)/$$file; \ | |
44 done | |
45 | |
46 ps3libs-clean: | |
47 rm -f $(SPU_LIBDIR)/* |