

Atlas provides BLAS and some basic LAPACK, not enough for jniLapack tests.

Atlas:
	Untar atlas-...tar into atlas-src.
	mkdir atlas-build
	cd atlas-build
	
	../atlas-src/configure flags
	For windows+cygwin, need to tell it bits and cores:
		-b [32/64] -t {number of cores}
	For linux, useful to build position independant code and shared libraries: 
		-Fa alg -fPIC	
	
	make build
	make check
	make test
	make time
	sudo make install
	
	Make shared libraries (so we can separate the general JNI from the local BLAS and LAPACK)
	make shared
	
	copy lib/*.so to /usr/lib/ or somewhere like that so java can find it all
	

Build clapack proper using atlas cblas.
	Untar clapack (not Lapack)
		cp INSTALL/make.inc.LINUX ./make.inc
	Edit make.inc and change the blas line use the cblas->blas wrapper and to point at the static CBLAS libs, e.g:
		BLASLIB = ../../libcblaswr.a -L/usr/local/atlas/lib/ -lcblas -latlas
		Add -fPIC to both CFLAGS and NOOPT (not for windows)
	Make the f2clibs
		make f2clib
	Make lapack source objects with both precisions 
		cd SRC
		make all
	If desired, make the shared library from the object files
		gcc -shared *.o -o libclapack.so
	Copy that library to /usr/lib/ or wherever java can find it
	

Building netliab-java

	This passes 'jint' variables diratly to clapack's 'integer' variable from f2c.
	jint is 'int' but integer is 'long int'
	Calls fail because of this.
	
	Needs conversion or regen?
	
	Add clapack static libs to Makefile.incl, e.g:
		LAPACK_LIBS=/opt/clapack-3.0/lapack_LINUX.a /opt/clapack-3.0/F2CLIBS/libF77.a /opt/clapack-3.0/libcblaswr.a
	Also modify Makefile so libs are after .o files:
		$(LIBPREPEND)jnilapack$(LIBAPPEND): org_netlib_lapack_NativeLAPACK.h org_netlib_lapack_NativeLAPACK.o f2j_jni.o
			$(LD) $(LDFLAGS) $(BLAS_LIBS) org_netlib_lapack_NativeLAPACK.o f2j_jni.o $(LAPACK_LIBS) -o $@
		$(LIBPREPEND)jniarpack$(LIBAPPEND): org_netlib_arpack_NativeARPACK.h org_netlib_arpack_NativeARPACK.o f2j_jni.o arpack.a
			$(LD) $(LDFLAGS) $(BLAS_LIBS) $(FORTRAN_LIBS) org_netlib_arpack_NativeARPACK.o f2j_jni.o arpack.a $(LAPACK_LIBS) -o $@
	
	
		
	
	  
	

Cygwin
	Atlas:
		Needs gcc + make + gfortran 