Mercurial > sdl-ios-xcode
comparison src/video/ps3/spulibs/Makefile @ 3156:4ead4cef6b7b gsoc2009_ps3
Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
author | Martin Lowinski <martin@goldtopf.org> |
---|---|
date | Fri, 14 Aug 2009 15:49:44 +0000 |
parents | abc49915ccb2 |
children |
comparison
equal
deleted
inserted
replaced
3155:abc49915ccb2 | 3156:4ead4cef6b7b |
---|---|
5 PPU_LD=/usr/bin/ld | 5 PPU_LD=/usr/bin/ld |
6 SPU_SRCDIR=$(srcdir)/src/video/ps3/spulibs | 6 SPU_SRCDIR=$(srcdir)/src/video/ps3/spulibs |
7 SPU_LIBDIR=$(srcdir)/src/video/ps3/spulibs/libs | 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 | 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 | 9 |
10 DEPS = $(SPU_SRCDIR)/spu_common.h | |
11 LIBS= fb_writer yuv2rgb bilin_scaler | |
10 | 12 |
11 ps3libs: $(SPU_LIBDIR)/libfb_writer_spu.a $(SPU_LIBDIR)/libfb_writer_spu.so \ | 13 OBJLIBS = $(foreach lib,$(LIBS),lib$(lib)_spu.a) |
12 $(SPU_LIBDIR)/libyuv2rgb_spu.so $(SPU_LIBDIR)/libyuv2rgb_spu.a \ | 14 SHALIBS = $(foreach lib,$(LIBS),lib$(lib)_spu.so) |
13 $(SPU_LIBDIR)/libbilin_scaler_spu.so $(SPU_LIBDIR)/libbilin_scaler_spu.a | |
14 | |
15 $(SPU_LIBDIR): | |
16 $(SHELL) $(auxdir)/mkinstalldirs $(SPU_LIBDIR) | |
17 | |
18 # fb_writer (basically copying from a to b) | |
19 $(SPU_LIBDIR)/fb_writer_spu-embed.o: $(SPU_LIBDIR) $(SPU_SRCDIR)/fb_writer.c $(SPU_SRCDIR)/spu_common.h | |
20 $(SPU_GCC) $(SPU_CFLAGS) -o $(SPU_LIBDIR)/fb_writer_spu $(SPU_SRCDIR)/fb_writer.c -lm | |
21 $(EMBEDSPU) -m32 fb_writer_spu $(SPU_LIBDIR)/fb_writer_spu $(SPU_LIBDIR)/fb_writer_spu-embed.o | |
22 | |
23 $(SPU_LIBDIR)/libfb_writer_spu.a: $(SPU_LIBDIR)/fb_writer_spu-embed.o | |
24 $(AR) -qcs $(SPU_LIBDIR)/libfb_writer_spu.a $(SPU_LIBDIR)/fb_writer_spu-embed.o | |
25 | |
26 $(SPU_LIBDIR)/libfb_writer_spu.so: $(SPU_LIBDIR)/fb_writer_spu-embed.o | |
27 $(PPU_LD) -o $(SPU_LIBDIR)/libfb_writer_spu.so -shared -soname=libfb_writer_spu.so $(SPU_LIBDIR)/fb_writer_spu-embed.o | |
28 | 15 |
29 | 16 |
30 # yuv2rgb_converter (converting YV12/IYUV to RGB) | 17 ps3libs: $(foreach lib,$(OBJLIBS),$(SPU_LIBDIR)/$(lib)) $(foreach lib,$(SHALIBS),$(SPU_LIBDIR)/$(lib)) |
31 $(SPU_LIBDIR)/yuv2rgb_spu-embed.o: $(SPU_LIBDIR) $(SPU_SRCDIR)/yuv2rgb_converter.c $(SPU_SRCDIR)/spu_common.h | |
32 $(SPU_GCC) $(SPU_CFLAGS) -o $(SPU_LIBDIR)/yuv2rgb_spu $(SPU_SRCDIR)/yuv2rgb_converter.c -lm | |
33 $(EMBEDSPU) -m32 yuv2rgb_spu $(SPU_LIBDIR)/yuv2rgb_spu $(SPU_LIBDIR)/yuv2rgb_spu-embed.o | |
34 | |
35 $(SPU_LIBDIR)/libyuv2rgb_spu.a: $(SPU_LIBDIR)/yuv2rgb_spu-embed.o | |
36 $(AR) -qcs $(SPU_LIBDIR)/libyuv2rgb_spu.a $(SPU_LIBDIR)/yuv2rgb_spu-embed.o | |
37 | |
38 $(SPU_LIBDIR)/libyuv2rgb_spu.so: $(SPU_LIBDIR)/yuv2rgb_spu-embed.o | |
39 $(PPU_LD) -o $(SPU_LIBDIR)/libyuv2rgb_spu.so -shared -soname=libyuv2rgb_spu.so $(SPU_LIBDIR)/yuv2rgb_spu-embed.o | |
40 | 18 |
41 | 19 |
42 # bilin_scaler (scaling bilinear YV12/IYUV pictures with resolutions /16) | 20 $(SPU_LIBDIR)/lib%_spu.a: $(SPU_LIBDIR)/%-embed.o |
43 $(SPU_LIBDIR)/bilin_scaler_spu-embed.o: $(SPU_LIBDIR) $(SPU_SRCDIR)/bilin_scaler.c $(SPU_SRCDIR)/spu_common.h | 21 $(AR) -qcs $@ $< |
44 $(SPU_GCC) $(SPU_CFLAGS) -o $(SPU_LIBDIR)/bilin_scaler_spu $(SPU_SRCDIR)/bilin_scaler.c -lm | |
45 $(EMBEDSPU) -m32 bilin_scaler_spu $(SPU_LIBDIR)/bilin_scaler_spu $(SPU_LIBDIR)/bilin_scaler_spu-embed.o | |
46 | 22 |
47 $(SPU_LIBDIR)/libbilin_scaler_spu.a: $(SPU_LIBDIR)/bilin_scaler_spu-embed.o | 23 $(SPU_LIBDIR)/lib%_spu.so: $(SPU_LIBDIR)/%-embed.o |
48 $(AR) -qcs $(SPU_LIBDIR)/libbilin_scaler_spu.a $(SPU_LIBDIR)/bilin_scaler_spu-embed.o | 24 $(PPU_LD) -o $@ -shared -soname=$(notdir $@) $< |
49 | 25 |
50 $(SPU_LIBDIR)/libbilin_scaler_spu.so: $(SPU_LIBDIR)/bilin_scaler_spu-embed.o | 26 $(SPU_LIBDIR)/%-embed.o: $(SPU_LIBDIR)/%.o |
51 $(PPU_LD) -o $(SPU_LIBDIR)/libbilin_scaler_spu.so -shared -soname=libbilin_scaler_spu.so $(SPU_LIBDIR)/bilin_scaler_spu-embed.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 | |
52 | 31 |
53 | 32 |
54 ps3libs-install: $(SPU_LIBDIR)/libfb_writer_spu.a $(SPU_LIBDIR)/libfb_writer_spu.so \ | 33 ps3libs-install: $(foreach obj,$(OBJLIBS),$(SPU_LIBDIR)/$(obj)) $(foreach obj,$(SHALIBS),$(SPU_LIBDIR)/$(obj)) |
55 $(SPU_LIBDIR)/libyuv2rgb_spu.so $(SPU_LIBDIR)/libyuv2rgb_spu.a \ | 34 for file in $(OBJLIBS); do \ |
56 $(SPU_LIBDIR)/libbilin_scaler_spu.so $(SPU_LIBDIR)/libbilin_scaler_spu.a | 35 $(INSTALL) -c -m 0655 $(SPU_LIBDIR)/$$file $(DESTDIR)$(libdir)/$$file; \ |
57 $(INSTALL) -c -m 0755 $(SPU_LIBDIR)/libfb_writer_spu.so $(DESTDIR)$(libdir)/. | 36 done |
58 $(INSTALL) -c -m 0655 $(SPU_LIBDIR)/libfb_writer_spu.a $(DESTDIR)$(libdir)/. | 37 for file in $(SHALIBS); do \ |
59 $(INSTALL) -c -m 0755 $(SPU_LIBDIR)/libyuv2rgb_spu.so $(DESTDIR)$(libdir)/. | 38 $(INSTALL) -c -m 0755 $(SPU_LIBDIR)/$$file $(DESTDIR)$(libdir)/$$file; \ |
60 $(INSTALL) -c -m 0655 $(SPU_LIBDIR)/libyuv2rgb_spu.a $(DESTDIR)$(libdir)/. | 39 done |
61 $(INSTALL) -c -m 0755 $(SPU_LIBDIR)/libbilin_scaler_spu.so $(DESTDIR)$(libdir)/. | |
62 $(INSTALL) -c -m 0655 $(SPU_LIBDIR)/libbilin_scaler_spu.a $(DESTDIR)$(libdir)/. | |
63 | 40 |
64 ps3libs-uninstall: | 41 ps3libs-uninstall: |
65 rm -f $(DESTDIR)$(libdir)/libfb_writer_spu.a | 42 for file in $(OBJLIBS) $(SHALIBS); do \ |
66 rm -f $(DESTDIR)$(libdir)/libfb_writer_spu.so | 43 rm -f $(DESTDIR)$(libdir)/$$file; \ |
67 rm -f $(DESTDIR)$(libdir)/libyuv2rgb_spu.so | 44 done |
68 rm -f $(DESTDIR)$(libdir)/libyuv2rgb_spu.a | |
69 rm -f $(DESTDIR)$(libdir)/libbilin_scaler_spu.so | |
70 rm -f $(DESTDIR)$(libdir)/libbilin_scaler_spu.a | |
71 | 45 |
72 ps3libs-clean: | 46 ps3libs-clean: |
73 rm -f $(SPU_LIBDIR)/* | 47 rm -f $(SPU_LIBDIR)/* |