Skip to content

Commit 1d5cf4e

Browse files
author
grepwood@sucs.org
committed
Added 2.2.80-121
1 parent b4bf51a commit 1d5cf4e

142 files changed

Lines changed: 11721 additions & 178 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ edit = @sed \
4242
-e 's,@includedir@,$(includedir),g' \
4343
-e 's,@version@,$(VERSION),g'
4444

45-
all: $(libspe2_SO) $(libspe2_A) libspe12-all
45+
all: libspe2.so $(libspe2_A) libspe12-all
4646

4747
dist: $(TARBALL)
4848

@@ -92,7 +92,7 @@ elfspe-install:
9292
libspe12-install:
9393
$(MAKE) -C libspe12 install
9494

95-
tests: tests/Makefile
95+
tests: all
9696
make -C tests
9797

9898
ada : ada/Makefile
@@ -112,9 +112,13 @@ $(libspe2_SO): $(libspe2_OBJS) base-all event-all libspe2.pc
112112
$(libspe2_A): $(libspe2_OBJS) base-all event-all
113113
$(CROSS)ar -r $(libspe2_A) $(libspe2_OBJS) spebase/*.o speevent/*.o $(libspe2_OBJS)
114114

115+
$(libspe2_SONAME): $(libspe2_SO)
116+
ln -sf $< $@
117+
118+
libspe2.so: $(libspe2_SONAME)
119+
ln -sf $< $@
115120

116121
PATCHES := `cat series | grep -v ^\#`
117-
#RPMBUILD = ppc32 rpmbuild --target=ppc
118122
RPMBUILD = rpmbuild
119123

120124
PWD := $(shell pwd)
@@ -138,27 +142,22 @@ $(PWD)/.rpmmacros:
138142
mkdir -p $(SOURCES) $(RPMS) $(SRPMS) $(BUILD)
139143
echo -e \%_topdir $(RPM)\\n\%_sourcedir $(PWD)\\n\%_tmppath %_topdir/tmp\\n\%_version $(RELEASE) > $@
140144

141-
rpm: dist checkenv $(RPM)/$(PACKAGE)-stamp
142-
143-
$(RPM)/$(PACKAGE)-stamp: $(PWD)/.rpmmacros $(SOURCEFILES) $(SPEC)
144-
HOME=$(PWD) $(RPMBUILD) -ba $(SPEC) $(RPMFLAGS)
145-
touch $@
146-
147-
crossrpm: dist checkenv $(RPM)/$(PACKAGE)-cross-stamp
145+
rpm: dist checkenv $(RPM)/$(PACKAGE)-$(RPM_ARCH)-stamp
148146

149-
$(RPM)/$(PACKAGE)-cross-stamp: $(PWD)/.rpmmacros $(SOURCEFILES) $(SPEC)
150-
HOME=$(PWD) $(RPMBUILD) -ba $(SPEC) --target=noarch $(RPMFLAGS)
147+
$(RPM)/$(PACKAGE)-$(RPM_ARCH)-stamp: $(PWD)/.rpmmacros $(SOURCEFILES) $(SPEC)
148+
HOME=$(PWD) $(RPMBUILD) -ba --target=$(RPM_ARCH) $(SPEC) $(RPMFLAGS)
151149
touch $@
152150

153-
.PHONY: checkenv rpm crossrpm
151+
rpms: rpm32 rpm64
154152

155-
156-
rpms: clean rpm rpm32
157-
158-
rpm32:
159-
HOME=$(PWD) $(RPMBUILD) --target=ppc -ba $(SPEC) $(RPMFLAGS)
153+
crossrpm:
154+
$(MAKE) CROSS_COMPILE=1 rpm
155+
rpm32:
156+
$(MAKE) ARCH=ppc rpm
160157
rpm64:
161-
HOME=$(PWD) $(RPMBUILD) --target=ppc64 -ba $(SPEC) $(RPMFLAGS)
158+
$(MAKE) ARCH=ppc64 rpm
159+
160+
.PHONY: checkenv rpm crossrpm rpms rpm32 rpm64
162161

163162
$(TARBALL): clean
164163
ln -s . $(FULLNAME)
@@ -170,6 +169,7 @@ $(TARBALL): clean
170169
--exclude=$(FULLNAME)/tests_hidden \
171170
--exclude=$(FULLNAME)/patches \
172171
--exclude=.svn \
172+
--exclude=.ccache \
173173
$(FULLNAME)
174174
rm $(FULLNAME)
175175

@@ -196,9 +196,10 @@ apiref: clean
196196

197197

198198

199-
clean: base-clean event-clean elfspe-clean libspe12-clean
199+
clean: base-clean event-clean elfspe-clean libspe12-clean tests-clean
200200
rm *.diff ; true
201201
rm -rf $(libspe2_A) $(libspe2_SO) $(libspe2_OBJS)
202+
rm -f libspe2.so $(libspe2_SONAME)
202203
rm -f $(TARBALL)
203204
rm -f $(FULLNAME)
204205
rm -f doc/*.pdf
@@ -207,6 +208,7 @@ clean: base-clean event-clean elfspe-clean libspe12-clean
207208
rm -rf html
208209
rm -rf latex
209210
rm -f libspe2.pc
211+
rm -f $(PWD)/.rpmmacros
210212
make -C tests clean
211213
make -C ada clean
212214

@@ -223,9 +225,15 @@ elfspe-clean:
223225
libspe12-clean:
224226
$(MAKE) -C libspe12 clean
225227

228+
tests-clean:
229+
$(MAKE) -C tests clean
226230

227231
distclean: clean
232+
$(MAKE) -C tests distclean
228233
rm -rf latex
229234
rm -rf html
230235

231-
.PHONY: all clean tests tags
236+
check: tests
237+
$(MAKE) -C tests -s check
238+
239+
.PHONY: all clean check tests tags

libspe12/Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ CFLAGS += -I$(TOP)
77
CFLAGS += -I$(TOP)/spebase
88
CFLAGS += -D_ATFILE_SOURCE
99

10-
LDFLAGS := -m32
11-
LDLIBS := -L$(TOP) -lspe2 -lpthread
12-
1310
MAJOR_VERSION := 1
1411
MINOR_VERSION := 2.2
1512

@@ -19,14 +16,20 @@ libspe12_SONAME := libspe.so.${MAJOR_VERSION}
1916

2017
libspe12_OBJS := spe.o spethreads.o dma.o ps.o ../spebase/*.o
2118

22-
all: $(libspe12_SO) $(libspe12_A)
19+
all: libspe.so $(libspe12_A)
2320

2421
$(libspe12_A): $(libspe12_OBJS)
2522
ar -r $(libspe12_A) $(libspe12_OBJS)
2623

2724
$(libspe12_SO): $(libspe12_OBJS)
2825
$(CC) $(CFLAGS) -shared -o $@ $^ -lrt -Wl,--soname=${libspe12_SONAME}
2926

27+
$(libspe12_SONAME): $(libspe12_SO)
28+
ln -sf $< $@
29+
30+
libspe.so: $(libspe12_SONAME)
31+
ln -sf $< $@
32+
3033
install: spe.h $(libspe12_SO) $(libspe12_A)
3134
$(INSTALL_DIR) $(ROOT)$(libdir)
3235
$(INSTALL_DATA) $(libspe12_A) $(ROOT)$(libdir)/$(libspe12_A)
@@ -39,4 +42,4 @@ install: spe.h $(libspe12_SO) $(libspe12_A)
3942

4043
clean:
4144
rm -f $(libspe12_SO) $(libspe12_OBJS) $(libspe12_A)
42-
45+
rm -f libspe.so $(libspe12_SONAME)

libspe12/tests/dma/Makefile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@
1717
#* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1818
#*
1919

20-
CC := gcc
21-
SPECC := spu-gcc
22-
CTAGS = ctags
20+
TOP=../../..
2321

24-
CFLAGS := -O2 -m32 -Wall -I../.. -I../../include -g
25-
SPECFLAGS := -O2 -Wall -I../../include -Wno-main
22+
include $(TOP)/make.defines
2623

27-
LDFLAGS := -m32
24+
CFLAGS += -I../.. -I$(TOP) -I$(TOP)/spebase -g $(TEST_CFLAGS)
25+
26+
LDFLAGS := $(ARCH_CFLAGS) $(TEST_LDFLAGS)
2827
LIBS := -L../.. -lspe -lpthread
2928

3029
SPE_OBJS := spe-dma-read spe-dma-write
@@ -39,9 +38,7 @@ ppe-dma-test: ppe-dma-test.c
3938
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) $(LIBS)
4039

4140
spe-dma-read: spe-dma-read.c
42-
$(SPECC) $(SPECFLAGS) -o $@ $<
41+
$(SPU_CC) $(SPU_CFLAGS) -o $@ $<
4342

4443
spe-dma-write: spe-dma-write.c
45-
$(SPECC) $(SPECFLAGS) -o $@ $<
46-
47-
44+
$(SPU_CC) $(SPU_CFLAGS) -o $@ $<

libspe12/tests/elfspe/Makefile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@
1717
#* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1818
#*
1919

20+
TOP=../../..
2021

21-
CC := gcc
22-
SPECC := spu-gcc
22+
include $(TOP)/make.defines
2323

24-
CFLAGS := -O2 -Wall -I../.. -I../../include -g
25-
SPECFLAGS := -O2 -Wall -I../../include
26-
SPELDFLAGS := -L/usr/spu/lib
24+
CFLAGS += -I../.. -I$(TOP) -I$(TOP)/spebase -g $(TEST_CFLAGS)
2725

26+
LDFLAGS = $(TEST_CFLAGS)
2827
LIBS := -L../.. -lspe -lpthread
29-
SPELIBS := -lc -lgloss
3028

3129
SPE_OBJS := spe-helloworld
3230
OBJS := runspe
@@ -37,7 +35,7 @@ clean:
3735
rm -f $(SPE_OBJS) $(OBJS)
3836

3937
$(SPE_OBJS): %: %.c
40-
$(SPECC) $(SPECFLAGS) $(SPELDFLAGS) -o $@ $< $(SPELIBS)
38+
$(SPU_CC) $(SPU_CFLAGS) -o $@ $<
4139

4240
$(OBJS): %: %.c
43-
$(CC) $(CFLAGS) -o $@ $< $(LIBS)
41+
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)

libspe12/tests/event/Makefile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@
1717
#* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1818
#*
1919

20-
CC := gcc
21-
SPECC := spu-gcc
22-
CTAGS = ctags
20+
TOP=../../..
2321

24-
CFLAGS := -O2 -m32 -Wall -g -I../..
25-
SPECFLAGS := -O2 -Wall
22+
include $(TOP)/make.defines
2623

27-
LDFLAGS := -m32
24+
CFLAGS += -I../.. -I$(TOP) -I$(TOP)/spebase -g $(TEST_CFLAGS)
25+
26+
LDFLAGS = $(TEST_LDFLAGS)
2827
LIBS := -L ../.. -lspe -lpthread
2928

3029
SPE_OBJS := spe-start-stop
@@ -36,8 +35,7 @@ clean:
3635
rm -f $(OBJS) $(SPE_OBJS)
3736

3837
ppe-start-stop: ppe-start-stop.c ../../libspe.a
39-
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) $(LIBS)
38+
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
4039

4140
spe-start-stop: spe-start-stop.c
42-
$(SPECC) $(SPECFLAGS) -o $@ $<
43-
41+
$(SPU_CC) $(SPU_CFLAGS) -o $@ $<

libspe12/tests/ft/Makefile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717
#* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1818
#*
1919

20-
CC := gcc
21-
SPECC := spu-gcc
22-
CTAGS = ctags
20+
TOP=../../..
2321

24-
CFLAGS := -O2 -m32 -Wall -g -I../../../../head-libspe
25-
SPECFLAGS := -O2 -Wall
22+
include $(TOP)/make.defines
2623

27-
LDFLAGS := -m32
28-
LIBS := -L../../../spebase -L../.. -lspe -lspebase -lpthread
24+
CFLAGS += -I../.. -I$(TOP) -I$(TOP)/spebase -g $(TEST_CFLAGS)
25+
26+
LDFLAGS = $(TEST_LDFLAGS)
27+
LIBS := -L ../.. -lspe -lpthread
2928

3029
SPE_OBJS := spe-test-block spe-test-pause spe-test-start-stop spe-test-mboxwait
3130
SPE_OBJS += spe-test-ppedma spe-test-ibox2 spe-test-mbox-block
@@ -40,4 +39,4 @@ ft: ft.c
4039
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) $(LIBS)
4140

4241
$(SPE_OBJS): %: %.c
43-
$(SPECC) $(SPECFLAGS) -o $@ $<
42+
$(SPU_CC) $(SPU_CFLAGS) -o $@ $<

libspe12/tests/start-stop/Makefile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717
#* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1818
#*
1919

20-
CC := gcc
21-
SPECC := spu-gcc
22-
CTAGS = ctags
20+
TOP=../../..
2321

24-
CFLAGS := -O2 -m32 -Wall -g -I../../../../head-libspe
25-
SPECFLAGS := -O2 -Wall
22+
include $(TOP)/make.defines
2623

27-
LDFLAGS := -m32
28-
LIBS := -L../../../spebase -L../.. -lspe -lspebase -lpthread
24+
CFLAGS += -I../.. -I$(TOP) -I$(TOP)/spebase -g $(TEST_CFLAGS)
25+
26+
LDFLAGS = $(TEST_LDFLAGS)
27+
LIBS := -L ../.. -lspe -lpthread
2928

3029
SPE_OBJS := spe-start-stop
3130
OBJS := ppe-start-stop
@@ -36,8 +35,8 @@ clean:
3635
rm -f $(OBJS) $(SPE_OBJS)
3736

3837
ppe-start-stop: ppe-start-stop.c ../../libspe.a
39-
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) $(LIBS)
38+
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
4039

4140
spe-start-stop: spe-start-stop.c
42-
$(SPECC) $(SPECFLAGS) -o $@ $<
41+
$(SPU_CC) $(SPU_CFLAGS) -o $@ $<
4342

libspe2.spec

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Summary: SPE Runtime Management Library
4343
%endif
4444
%define _adabindingdir /usr/adainclude
4545
%define _includedir2 /usr/spu/include
46+
%define _spe_ld_dir /usr/lib/spe
4647

4748
%define _initdir /etc/init.d
4849
%define _unpackaged_files_terminate_build 0
@@ -116,17 +117,20 @@ This tool acts as a standalone loader for spe binaries.
116117
%setup
117118

118119
%build
119-
make SYSROOT=%{sysroot} %{set_optflags} prefix=%{_prefix} libdir=%{_libdir}
120+
121+
%define _make_flags ARCH=%{_target_cpu} SYSROOT=%{sysroot} %{set_optflags} prefix=%{_prefix} libdir=%{_libdir} spe_ld_dir=%{_spe_ld_dir}
122+
123+
make %{_make_flags}
120124
%if %{build_common}
121-
make elfspe-all SYSROOT=%{sysroot} %{set_optflags} prefix=%{_prefix} libdir=%{_libdir}
125+
make elfspe-all %{_make_flags}
122126
%endif
123127

124128
%install
125129
rm -rf $RPM_BUILD_ROOT%{sysroot}
126130

127-
make install DESTDIR=$RPM_BUILD_ROOT SYSROOT=%{sysroot} prefix=%{_prefix} libdir=%{_libdir} speinclude=%{_includedir2}
131+
make install DESTDIR=$RPM_BUILD_ROOT %{_make_flags}
128132
%if %{build_common}
129-
make elfspe-install DESTDIR=$RPM_BUILD_ROOT SYSROOT=%{sysroot} prefix=%{_prefix} libdir=%{_libdir} speinclude=%{_includedir2}
133+
make elfspe-install DESTDIR=$RPM_BUILD_ROOT %{_make_flags}
130134
%endif
131135

132136
mkdir -p $RPM_BUILD_ROOT%{sysroot}%{_initdir}

0 commit comments

Comments
 (0)