annotate 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
rev   line source
3141
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
1 # This Makefile is for building the CELL BE SPU libs
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
2 # libfb_writer_spu.so, libyuv2rgb_spu.so, libbilin_scaler_spu.so
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
3
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
4 # Toolchain
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
5 PPU_LD=/usr/bin/ld
3154
95e48f7a3a93 Added Makefile rule for spu programs. Added Readme.
Martin Lowinski <martin@goldtopf.org>
parents: 3148
diff changeset
6 SPU_SRCDIR=$(srcdir)/src/video/ps3/spulibs
95e48f7a3a93 Added Makefile rule for spu programs. Added Readme.
Martin Lowinski <martin@goldtopf.org>
parents: 3148
diff changeset
7 SPU_LIBDIR=$(srcdir)/src/video/ps3/spulibs/libs
3146
9e902f423497 YUV-Textures with SPU-support working.
Martin Lowinski <martin@goldtopf.org>
parents: 3144
diff changeset
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
3141
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
9
3156
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
10 DEPS = $(SPU_SRCDIR)/spu_common.h
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
11 LIBS= fb_writer yuv2rgb bilin_scaler
3141
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
12
3156
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
13 OBJLIBS = $(foreach lib,$(LIBS),lib$(lib)_spu.a)
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
14 SHALIBS = $(foreach lib,$(LIBS),lib$(lib)_spu.so)
3141
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
15
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
16
3156
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
17 ps3libs: $(foreach lib,$(OBJLIBS),$(SPU_LIBDIR)/$(lib)) $(foreach lib,$(SHALIBS),$(SPU_LIBDIR)/$(lib))
3141
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
18
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
19
3156
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
20 $(SPU_LIBDIR)/lib%_spu.a: $(SPU_LIBDIR)/%-embed.o
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
21 $(AR) -qcs $@ $<
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
22
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
23 $(SPU_LIBDIR)/lib%_spu.so: $(SPU_LIBDIR)/%-embed.o
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
24 $(PPU_LD) -o $@ -shared -soname=$(notdir $@) $<
3154
95e48f7a3a93 Added Makefile rule for spu programs. Added Readme.
Martin Lowinski <martin@goldtopf.org>
parents: 3148
diff changeset
25
3156
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
26 $(SPU_LIBDIR)/%-embed.o: $(SPU_LIBDIR)/%.o
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
27 $(EMBEDSPU) -m32 $(subst -embed.o,,$(notdir $@))_spu $< $@
3154
95e48f7a3a93 Added Makefile rule for spu programs. Added Readme.
Martin Lowinski <martin@goldtopf.org>
parents: 3148
diff changeset
28
3156
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
29 $(SPU_LIBDIR)/%.o: $(SPU_SRCDIR)/%.c $(DEPS)
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
30 $(SPU_GCC) $(SPU_CFLAGS) -o $@ $< -lm
3141
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
31
3df74541339b Added ps3 video driver based on the dummy driver.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
32
3156
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
33 ps3libs-install: $(foreach obj,$(OBJLIBS),$(SPU_LIBDIR)/$(obj)) $(foreach obj,$(SHALIBS),$(SPU_LIBDIR)/$(obj))
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
34 for file in $(OBJLIBS); do \
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
35 $(INSTALL) -c -m 0655 $(SPU_LIBDIR)/$$file $(DESTDIR)$(libdir)/$$file; \
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
36 done
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
37 for file in $(SHALIBS); do \
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
38 $(INSTALL) -c -m 0755 $(SPU_LIBDIR)/$$file $(DESTDIR)$(libdir)/$$file; \
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
39 done
3154
95e48f7a3a93 Added Makefile rule for spu programs. Added Readme.
Martin Lowinski <martin@goldtopf.org>
parents: 3148
diff changeset
40
95e48f7a3a93 Added Makefile rule for spu programs. Added Readme.
Martin Lowinski <martin@goldtopf.org>
parents: 3148
diff changeset
41 ps3libs-uninstall:
3156
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
42 for file in $(OBJLIBS) $(SHALIBS); do \
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
43 rm -f $(DESTDIR)$(libdir)/$$file; \
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
44 done
3154
95e48f7a3a93 Added Makefile rule for spu programs. Added Readme.
Martin Lowinski <martin@goldtopf.org>
parents: 3148
diff changeset
45
95e48f7a3a93 Added Makefile rule for spu programs. Added Readme.
Martin Lowinski <martin@goldtopf.org>
parents: 3148
diff changeset
46 ps3libs-clean:
3156
4ead4cef6b7b Rewritten Makefile (fixed bug) and cleanup for yuv2rgb.
Martin Lowinski <martin@goldtopf.org>
parents: 3155
diff changeset
47 rm -f $(SPU_LIBDIR)/*