summaryrefslogtreecommitdiffstats
path: root/src/suitesparse.mk
diff options
context:
space:
mode:
authorAlois Schlögl <alois.schloegl@gmail.com>2010-11-16 18:13:33 (GMT)
committerAlois Schlögl <alois.schloegl@gmail.com>2010-11-16 18:13:33 (GMT)
commit66de4ee9ec029405130624dd903343e32f0f90b1 (patch)
treefc92c11bc4d92903fb2392d16623d9357c022ea8 /src/suitesparse.mk
parent2ae67527a82fd8fbd4f2564d739ae657410542b0 (diff)
downloadmxe-66de4ee9ec029405130624dd903343e32f0f90b1.zip
mxe-66de4ee9ec029405130624dd903343e32f0f90b1.tar.gz
mxe-66de4ee9ec029405130624dd903343e32f0f90b1.tar.bz2
improvements for packages: cblas lapack suitesparse
Diffstat (limited to 'src/suitesparse.mk')
-rw-r--r--src/suitesparse.mk40
1 files changed, 33 insertions, 7 deletions
diff --git a/src/suitesparse.mk b/src/suitesparse.mk
index 0fffcde..5244c7d 100644
--- a/src/suitesparse.mk
+++ b/src/suitesparse.mk
@@ -9,7 +9,7 @@ $(PKG)_CHECKSUM := 6de027d48a573659b40ddf57c10e32b39ab034c6
$(PKG)_SUBDIR := SuiteSparse
$(PKG)_FILE := SuiteSparse-$($(PKG)_VERSION).tar.gz
$(PKG)_WEBSITE := http://www.cise.ufl.edu/
-$(PKG)_URL := http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-3.4.0.tar.gz
+$(PKG)_URL := http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-$($(PKG)_VERSION).tar.gz
$(PKG)_DEPS := gcc metis lapack
define $(PKG)_UPDATE
@@ -29,8 +29,8 @@ define $(PKG)_BUILD
$(MAKE) -C '$(1)/$(metis_SUBDIR)/Lib' -j '$(JOBS)'
# Otherwise hack the config so it can find metis
- #$(SED) -i 's,\(METIS_PATH = \)\(../../metis-4.0\),\1'$(PREFIX)/$(TARGET)/include/metis',' $(1)/UFconfig/UFconfig.mk
- #$(SED) -i 's,\(METIS = \)\(../../metis-4.0/libmetis.a\),\1'$(PREFIX)/$(TARGET)/lib/libmetis.a',' $(1)/UFconfig/UFconfig.mk
+ #$(SED) -i 's,\(METIS_PATH = \)\(. $(INSTALL) -m664 '$(1)/. $(INSTALL) -m664 '$(1)/metis-4.0\),\1'$(PREFIX)/$(TARGET)/include/metis',' $(1)/UFconfig/UFconfig.mk
+ #$(SED) -i 's,\(METIS = \)\(. $(INSTALL) -m664 '$(1)/. $(INSTALL) -m664 '$(1)/metis-4.0/libmetis.a\),\1'$(PREFIX)/$(TARGET)/lib/libmetis.a',' $(1)/UFconfig/UFconfig.mk
# use cross tools
$(SED) -i 's,cc,$(TARGET)-gcc,' $(1)/UFconfig/UFconfig.mk
@@ -39,14 +39,40 @@ define $(PKG)_BUILD
$(SED) -i 's,ar ,$(TARGET)-ar ,' $(1)/UFconfig/UFconfig.mk
$(SED) -i 's,ranlib,$(TARGET)-ranlib,' $(1)/UFconfig/UFconfig.mk
- # use BLAS from GSL since it's already part of mingw-cross-env
+ # gfortran does not need libg2c
$(SED) -i 's,-lblas -lgfortran -lgfortranbegin -lg2c,-lblas -lgfortran -lgfortranbegin,' $(1)/UFconfig/UFconfig.mk
- # however, we get linking errros
+ # Missing _drand48 and _srand48 cause problems in demos
+ #$(TARGET)-gcc -c $(1)/CHOLMOD/MATLAB/Windows/rand48.c -o $(1)/CHOLMOD/Lib/rand48.o
+ #$(SED) -i 's,libcholmod.a: $$(OBJ),libcholmod.a: $$(OBJ) rand48.o,' $(1)/CHOLMOD/Lib/Makefile
+ #$(SED) -i 's,$$(AR) libcholmod.a $$(OBJ),$$(AR) libcholmod.a $$(OBJ) rand48.o,' $(1)/CHOLMOD/Lib/Makefile
+ # Here we choose to exclude the demos from building in order to avoid the _rand48 problems
+ $(SED) -i 's,( cd Demo ; $$(MAKE) ),#( cd Demo ; $$(MAKE) ),' $(1)/CHOLMOD/Makefile
+ $(SED) -i 's,( cd Demo ; $$(MAKE) ),#( cd Demo ; $$(MAKE) ),' $(1)/SPQR/Makefile
+
+ # Built all
$(MAKE) -C '$(1)' -j '$(JOBS)'
- # CHOLMOD has no errors on it's own though, but seems to be missing a link step
- $(MAKE) -C '$(1)/CHOLMOD/Lib' -j '$(JOBS)'
+ # Install library files
+ $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
+ for i in `cd $(1) && find . -name *.a`; do \
+ $(INSTALL) -m664 '$(1)/'$$i '$(PREFIX)/$(TARGET)/lib/' ; \
+ done;
+
+ # Install include files
+ $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/suitesparse/'
+ $(INSTALL) -m664 '$(1)/AMD/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/'
+ $(INSTALL) -m664 '$(1)/BTF/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/'
+ $(INSTALL) -m664 '$(1)/CAMD/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/'
+ $(INSTALL) -m664 '$(1)/CCOLAMD/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/'
+ $(INSTALL) -m664 '$(1)/CHOLMOD/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/'
+ $(INSTALL) -m664 '$(1)/COLAMD/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/'
+ $(INSTALL) -m664 '$(1)/CXSparse/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/'
+ $(INSTALL) -m664 '$(1)/KLU/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/'
+ $(INSTALL) -m664 '$(1)/LDL/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/'
+ $(INSTALL) -m664 '$(1)/SPQR/Include/'* '$(PREFIX)/$(TARGET)/include/suitesparse/'
+ $(INSTALL) -m664 '$(1)/UFconfig/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/'
+ $(INSTALL) -m664 '$(1)/UMFPACK/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/'
endef