--- ATLAS/makes/Make.lib 2009-02-18 19:47:36.000000000 +0100 +++ ATLAS/makes/Make.lib-gil 2009-05-09 08:26:56.000000000 +0200 @@ -3,6 +3,8 @@ # # override with libatlas.so only when atlas is built to one lib # +so_ver_major=3 +so_ver = $(so_ver_major).0 DYNlibs = liblapack.so libf77blas.so libcblas.so libatlas.so PTDYNlibs = liblapack.so libptf77blas.so libptcblas.so libatlas.so CDYNlibs = liblapack.so libcblas.so libatlas.so @@ -32,38 +34,78 @@ mv $(tarnam).tar.gz $(tarnam).tgz ptshared : - - rm -f libatlas.so liblapack.so - $(MAKE) libatlas.so liblapack.so libptf77blas.so libf77blas.so \ - libptcblas.so libcblas.so liblapack.so + - rm -f libatlas.so* liblapack.so* \ + lib*blas.so* libclapack.so* + $(MAKE) libatlas.so libcblas.so libptf77blas.so libf77blas.so \ + libptcblas.so liblapack.so libclapack.so shared : - - rm -f libatlas.so liblapack.so - $(MAKE) libatlas.so liblapack.so libf77blas.so libcblas.so liblapack.so + - rm -f libatlas.so liblapack.so \ + libatlas.so.$(so_ver) liblapack.so.$(so_ver) + $(MAKE) libatlas.so libcblas.so libf77blas.so liblapack.so libclapack.so cptshared : - - rm -f libatlas.so libclapack.so - $(MAKE) libatlas.so libclapack.so libptcblas.so libcblas.so + - rm -f libatlas.so libclapack.so \ + libatlas.so.$(so_ver) libclapack.so.$(so_ver) + $(MAKE) libatlas.so libptcblas.so libcblas.so libclapack.so cshared : - - rm -f libatlas.so libclapack.so - $(MAKE) libatlas.so libclapack.so libcblas.so + - rm -f libatlas.so libclapack.so \ + libatlas.so.$(so_ver) libclapack.so.$(so_ver) + $(MAKE) libatlas.so libcblas.so libclapack.so libatlas.so : libatlas.a - ld $(LDFLAGS) -shared -soname libatlas.so -o libatlas.so \ - --whole-archive libatlas.a --no-whole-archive -lc $(LIBS) + mkdir static_libs ; cd static_libs ; ar x ../libatlas.a ; cd ../ + gcc $(LDFLAGS) -shared -Wl,-soname=libatlas.so.$(so_ver_major) \ + -o libatlas.so.$(so_ver) static_libs/*.o -lc $(LIBS) + rm -rf static_libs + ln -sf ./libatlas.so.$(so_ver) libatlas.so.$(so_ver_major) + ln -sf ./libatlas.so.$(so_ver) libatlas.so liblapack.so : liblapack.a - ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive \ - liblapack.a --no-whole-archive $(F77SYSLIB) + mkdir static_libs ; cd static_libs ; ar x ../liblapack.a ; cd ../ + gcc $(LDFLAGS) -shared -Wl,-soname=liblapack.so.$(so_ver_major) \ + -o liblapack.so.$(so_ver) static_libs/*.o $(F77SYSLIB) \ + libf77blas.so.$(so_ver_major) libcblas.so.$(so_ver_major) + rm -rf static_libs + ln -sf ./liblapack.so.$(so_ver) liblapack.so.$(so_ver_major) + ln -sf ./liblapack.so.$(so_ver) liblapack.so libclapack.so : libclapack.a - ld $(LDFLAGS) -shared -soname liblapack.so -o liblapack.so \ - --whole-archive libclapack.a + mkdir static_libs ; cd static_libs ; ar x ../libclapack.a ; cd ../ + gcc $(LDFLAGS) -shared -Wl,-soname=libclapack.so.$(so_ver_major) \ + -o libclapack.so.$(so_ver) static_libs/*.o \ + libcblas.so.$(so_ver_major) -lc $(LIBS) + rm -rf static_libs + ln -sf ./libclapack.so.$(so_ver) libclapack.so.$(so_ver_major) + ln -sf ./libclapack.so.$(so_ver) libclapack.so libptf77blas.so : libptf77blas.a - ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive libptf77blas.a \ - --no-whole-archive $(F77SYSLIB) + mkdir static_libs ; cd static_libs ; ar x ../libptf77blas.a ; cd ../ + gcc $(LDFLAGS) -shared -Wl,-soname=libptf77blas.so.$(so_ver_major) \ + -o libptf77blas.so.$(so_ver) static_libs/*.o \ + libatlas.so.$(so_ver) $(F77SYSLIB) + rm -rf static_libs + ln -sf ./libptf77blas.so.$(so_ver) libptf77blas.so.$(so_ver_major) + ln -sf ./libptf77blas.so.$(so_ver) libptf77blas.so libf77blas.so : libf77blas.a - ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive libf77blas.a \ - --no-whole-archive $(F77SYSLIB) + mkdir static_libs ; cd static_libs ; ar x ../libf77blas.a ; cd ../ + gcc $(LDFLAGS) -shared -Wl,-soname=libf77blas.so.$(so_ver_major) \ + -o libf77blas.so.$(so_ver) static_libs/*.o \ + libatlas.so.$(so_ver) $(F77SYSLIB) + rm -rf static_libs + ln -sf ./libf77blas.so.$(so_ver) libf77blas.so.$(so_ver_major) + ln -sf ./libf77blas.so.$(so_ver) libf77blas.so libptcblas.so : libptcblas.a - ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive libptcblas.a + mkdir static_libs ; cd static_libs ; ar x ../libptcblas.a ; cd ../ + gcc $(LDFLAGS) -shared -Wl,-soname=libptcblas.so.$(so_ver_major) \ + -o libptcblas.so.$(so_ver) static_libs/*.o \ + libatlas.so.$(so_ver) -lc $(LIBS) + rm -rf static_libs + ln -sf ./libptcblas.so.$(so_ver) libptcblas.so.$(so_ver_major) + ln -sf ./libptcblas.so.$(so_ver) libptcblas.so libcblas.so : libcblas.a - ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive libcblas.a + mkdir static_libs ; cd static_libs ; ar x ../libcblas.a ; cd ../ + gcc $(LDFLAGS) -shared -Wl,-soname=libcblas.so.$(so_ver_major) \ + -o libcblas.so.$(so_ver) static_libs/*.o \ + libatlas.so.$(so_ver) -lc $(LIBS) + rm -rf static_libs + ln -sf ./libcblas.so.$(so_ver) libcblas.so.$(so_ver_major) + ln -sf ./libcblas.so.$(so_ver) libcblas.so # # Builds one shared lib from all ATLAS files #