summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2010-11-16 23:52:47 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2010-11-16 23:52:47 (GMT)
commita149a4a947ca7c2db28af473c0be5febbd118abb (patch)
treefb6e4a221d781b7eff64689edf1375145ba9ae57
parentc492fb9e539ee4bfb6b8624abb941b272163e135 (diff)
downloadmxe-a149a4a947ca7c2db28af473c0be5febbd118abb.zip
mxe-a149a4a947ca7c2db28af473c0be5febbd118abb.tar.gz
mxe-a149a4a947ca7c2db28af473c0be5febbd118abb.tar.bz2
cleanup packages: blas cblas lapack metis suitesparse
-rw-r--r--src/blas.mk19
-rw-r--r--src/cblas.mk37
-rw-r--r--src/lapack.mk29
-rw-r--r--src/metis.mk22
-rw-r--r--src/suitesparse.mk81
5 files changed, 83 insertions, 105 deletions
diff --git a/src/blas.mk b/src/blas.mk
index 3b5ec71..acfb06d 100644
--- a/src/blas.mk
+++ b/src/blas.mk
@@ -1,31 +1,26 @@
# This file is part of mingw-cross-env.
# See doc/index.html for further information.
-#
-#
# blas
PKG := blas
$(PKG)_IGNORE :=
-$(PKG)_VERSION :=
+$(PKG)_VERSION := 1
$(PKG)_CHECKSUM := 0aeca4ed45f2e5519977747ed6bcf80d1b0335d2
$(PKG)_SUBDIR := BLAS
-$(PKG)_FILE := blas.tgz
+$(PKG)_FILE := $(PKG).tgz
$(PKG)_WEBSITE := http://www.netlib.org/
-$(PKG)_URL := http://www.netlib.org/blas/blas.tgz
+$(PKG)_URL := http://www.netlib.org/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
+ echo 1
endef
define $(PKG)_BUILD
-
- $(SED) -i 's,$$(FORTRAN),$(TARGET)-gfortran,g' '$(1)/Makefile'
- make -C $(1)
- cd $(1) && $(TARGET)-ar cr libblas.a *.o
+ $(SED) -i 's,$$(FORTRAN),$(TARGET)-gfortran,g' '$(1)/Makefile'
+ $(MAKE) -C '$(1)' -j '$(JOBS)'
+ cd '$(1)' && $(TARGET)-ar cr libblas.a *.o
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
$(INSTALL) -m664 '$(1)/libblas.a' '$(PREFIX)/$(TARGET)/lib/'
-
endef
-
-
diff --git a/src/cblas.mk b/src/cblas.mk
index 2dac910..b4b1f03 100644
--- a/src/cblas.mk
+++ b/src/cblas.mk
@@ -4,31 +4,30 @@
# cblas
PKG := cblas
$(PKG)_IGNORE :=
-$(PKG)_VERSION :=
+$(PKG)_VERSION := 1
$(PKG)_CHECKSUM := a8a765ebb8d753c7ad161ccd9191be42d3dc8bd9
$(PKG)_SUBDIR := CBLAS
-$(PKG)_FILE := cblas.tgz
-$(PKG)_WEBSITE := http://www.netlib.org/blas
-$(PKG)_URL := http://www.netlib.org/blas/blast-forum/cblas.tgz
+$(PKG)_FILE := $(PKG).tgz
+$(PKG)_WEBSITE := http://www.netlib.org/blas/
+$(PKG)_URL := http://www.netlib.org/blas/blast-forum/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
+define $(PKG)_UPDATE
+ echo 1
+endef
define $(PKG)_BUILD
+ cp '$(1)/Makefile.LINUX' '$(1)/Makefile.MINGW32'
+ $(SED) -i 's,CBDIR =.*,CBDIR = $(1),g' '$(1)/Makefile.MINGW32'
+ $(SED) -i 's,FC =.*,FC = $(TARGET)-gfortran,g' '$(1)/Makefile.MINGW32'
+ ln -s '$(1)/Makefile.MINGW32' '$(1)/Makefile.in'
+ mkdir '$(1)/MINGW32'
+ $(MAKE) -C '$(1)' -j '$(JOBS)' alllib
+ cd '$(1)' && $(TARGET)-ar cr libcblas.a src/*.o
- cp $(1)/Makefile.LINUX $(1)/Makefile.MINGW32
- $(SED) -i 's,CBDIR = $$(HOME)/CBLAS,CBDIR = $(1),g' '$(1)/Makefile.MINGW32'
- $(SED) -i 's,FC = g77,FC = $(TARGET)-gfortran,g' '$(1)/Makefile.MINGW32'
- ln -s $(1)/Makefile.MINGW32 $(1)/Makefile.in
- mkdir $(1)/MINGW32
- make -C $(1) alllib
- cd $(1) && $(TARGET)-ar cr libcblas.a src/*.o
-
- $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
- $(INSTALL) -m664 '$(1)/libcblas.a' '$(PREFIX)/$(TARGET)/lib/'
- $(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
- $(INSTALL) -m664 '$(1)/src/cblas.h' '$(PREFIX)/$(TARGET)/include/'
+ $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
+ $(INSTALL) -m664 '$(1)/libcblas.a' '$(PREFIX)/$(TARGET)/lib/'
+ $(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
+ $(INSTALL) -m664 '$(1)/src/cblas.h' '$(PREFIX)/$(TARGET)/include/'
$(INSTALL) -m664 '$(1)/src/cblas_f77.h' '$(PREFIX)/$(TARGET)/include/'
-
endef
-
-
diff --git a/src/lapack.mk b/src/lapack.mk
index 343adb0..51018bd 100644
--- a/src/lapack.mk
+++ b/src/lapack.mk
@@ -1,16 +1,15 @@
# This file is part of mingw-cross-env.
# See doc/index.html for further information.
-
# lapack
PKG := lapack
$(PKG)_IGNORE :=
$(PKG)_VERSION := 3.2.2
$(PKG)_CHECKSUM := a434c45932f6affb654b3abde21dd669f5751633
-$(PKG)_SUBDIR := lapack-$($(PKG)_VERSION)
-$(PKG)_FILE := lapack-$($(PKG)_VERSION).tgz
-$(PKG)_WEBSITE := http://www.netlib.org/lapack
-$(PKG)_URL := http://www.netlib.org/lapack/$($(PKG)_FILE)
+$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
+$(PKG)_FILE := $($(PKG)_SUBDIR).tgz
+$(PKG)_WEBSITE := http://www.netlib.org/$(PKG)/
+$(PKG)_URL := http://www.netlib.org/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
@@ -20,19 +19,13 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
- cp $(1)/make.inc.example $(1)/make.inc
- $(SED) -i 's,PLAT = _LINUX,PLAT = _MINGW32,g' '$(1)/make.inc'
- $(SED) -i 's,gfortran,$(TARGET)-gfortran,g' '$(1)/make.inc'
- $(SED) -i 's, ar, $(TARGET)-ar,g' '$(1)/make.inc'
+ cp $(1)/make.inc.example $(1)/make.inc
+ $(SED) -i 's,PLAT =.*,PLAT = _MINGW32,g' '$(1)/make.inc'
+ $(SED) -i 's,gfortran,$(TARGET)-gfortran,g' '$(1)/make.inc'
+ $(SED) -i 's, ar, $(TARGET)-ar,g' '$(1)/make.inc'
$(SED) -i 's, ranlib, $(TARGET)-ranlib,g' '$(1)/make.inc'
- ## build Blas and Lapack
- make -C $(1) lapacklib blaslib
- cp $(1)/lapack_MINGW32.a $(1)/liblapack.a
- cp $(1)/blas_MINGW32.a $(1)/libblas.a
- $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
- $(INSTALL) -m664 '$(1)/libblas.a' '$(PREFIX)/$(TARGET)/lib/'
- $(INSTALL) -m664 '$(1)/liblapack.a' '$(PREFIX)/$(TARGET)/lib/'
+ $(MAKE) -C '$(1)' -j '$(JOBS)' lapacklib
+ $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
+ $(INSTALL) -m664 '$(1)/lapack_MINGW32.a' '$(PREFIX)/$(TARGET)/lib/liblapack.a'
endef
-
-
diff --git a/src/metis.mk b/src/metis.mk
index a337115..7a45e69 100644
--- a/src/metis.mk
+++ b/src/metis.mk
@@ -6,26 +6,26 @@ PKG := metis
$(PKG)_IGNORE :=
$(PKG)_VERSION := 4.0
$(PKG)_CHECKSUM := 580568308e1fa40e5a7a77cacbf27f865d6c01af
-$(PKG)_SUBDIR := metis-4.0
-$(PKG)_FILE := metis-$($(PKG)_VERSION).tar.gz
-$(PKG)_WEBSITE := http://glaros.dtc.umn.edu
-$(PKG)_URL := http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-4.0.tar.gz
+$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
+$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz
+$(PKG)_WEBSITE := http://glaros.dtc.umn.edu/
+$(PKG)_URL := http://glaros.dtc.umn.edu/gkhome/fetch/sw/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
wget -q -O- 'http://www.cise.ufl.edu/research/sparse/SuiteSparse/' | \
- $(SED) -n 's,.*metis-\([0-9]\.[0-9]\)\.tar.gz,\1,ip' | \
+ $(SED) -n 's,.*metis-\([0-9][^"]*\)\.tar.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
- $(SED) -i 's,cc,$(TARGET)-gcc,' $(1)/Makefile.in
- $(SED) -i 's,ar ,$(TARGET)-ar ,' $(1)/Makefile.in
- $(SED) -i 's,ranlib,$(TARGET)-ranlib,' $(1)/Makefile.in
- $(MAKE) -C '$(1)/Lib'
- $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
+ $(SED) -i 's,cc,$(TARGET)-gcc,' '$(1)/Makefile.in'
+ $(SED) -i 's,ar ,$(TARGET)-ar ,' '$(1)/Makefile.in'
+ $(SED) -i 's,ranlib,$(TARGET)-ranlib,' '$(1)/Makefile.in'
+ $(MAKE) -C '$(1)/Lib' -j '$(JOBS)'
+ $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
$(INSTALL) -m664 '$(1)/libmetis.a' '$(PREFIX)/$(TARGET)/lib/libmetis.a'
- $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/metis/Lib'
+ $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/metis/Lib'
$(INSTALL) -m664 '$(1)/Lib/metis.h' '$(PREFIX)/$(TARGET)/include/metis/Lib/metis.h'
$(INSTALL) -m664 '$(1)/Lib/defs.h' '$(PREFIX)/$(TARGET)/include/metis/Lib/defs.h'
$(INSTALL) -m664 '$(1)/Lib/struct.h' '$(PREFIX)/$(TARGET)/include/metis/Lib/struct.h'
diff --git a/src/suitesparse.mk b/src/suitesparse.mk
index 18064e0..5bd4084 100644
--- a/src/suitesparse.mk
+++ b/src/suitesparse.mk
@@ -9,63 +9,54 @@ $(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-$($(PKG)_VERSION).tar.gz
-$(PKG)_DEPS := gcc metis lapack
+$(PKG)_URL := http://www.cise.ufl.edu/research/sparse/SuiteSparse/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc metis blas lapack
define $(PKG)_UPDATE
wget -q -O- 'http://www.cise.ufl.edu/research/sparse/SuiteSparse/' | \
- $(SED) -n 's,.*SuiteSparse-\([0-9]\.[0-9]\.[0-9]\)\.tar.*,\1,ip' | \
+ $(SED) -n 's,.*SuiteSparse-\([0-9][^"]*\)\.tar.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
-
- # change the config to find metis
- $(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
-
+ # set path to metis
+ $(SED) -i 's,METIS_PATH =.*,METIS_PATH = $(PREFIX)/$(TARGET)/include/metis,' '$(1)/UFconfig/UFconfig.mk'
+ $(SED) -i 's,METIS =.*,METIS = $(PREFIX)/$(TARGET)/lib/libmetis.a,' '$(1)/UFconfig/UFconfig.mk'
+
# use cross tools
- $(SED) -i 's,cc,$(TARGET)-gcc,' $(1)/UFconfig/UFconfig.mk
- $(SED) -i 's,g++,$(TARGET)-g++,' $(1)/UFconfig/UFconfig.mk
- $(SED) -i 's,f77,$(TARGET)-gfortran,' $(1)/UFconfig/UFconfig.mk
- $(SED) -i 's,ar ,$(TARGET)-ar ,' $(1)/UFconfig/UFconfig.mk
- $(SED) -i 's,ranlib,$(TARGET)-ranlib,' $(1)/UFconfig/UFconfig.mk
+ $(SED) -i 's,cc,$(TARGET)-gcc,' '$(1)/UFconfig/UFconfig.mk'
+ $(SED) -i 's,g++,$(TARGET)-g++,' '$(1)/UFconfig/UFconfig.mk'
+ $(SED) -i 's,f77,$(TARGET)-gfortran,' '$(1)/UFconfig/UFconfig.mk'
+ $(SED) -i 's,ar ,$(TARGET)-ar ,' '$(1)/UFconfig/UFconfig.mk'
+ $(SED) -i 's,ranlib,$(TARGET)-ranlib,' '$(1)/UFconfig/UFconfig.mk'
+
+ # gfortran does not need libg2c
+ $(SED) -i 's,-lg2c,,' '$(1)/UFconfig/UFconfig.mk'
- # gfortran does not need libg2c
- $(SED) -i 's,-lblas -lgfortran -lgfortranbegin -lg2c,-lblas -lgfortran -lgfortranbegin,' $(1)/UFconfig/UFconfig.mk
-
- # 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
+ # 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
+ # build all
$(MAKE) -C '$(1)' -j '$(JOBS)'
- # Install library files
+ # 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/'
+ find '$(1)' -name '*.a' \
+ -exec $(INSTALL) -m664 {} '$(PREFIX)/$(TARGET)/lib/' \;
+
+ # 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/'
-
+ $(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
-
-