annotate src/suitesparse.mk @ 3014:b6c7244a2f66

Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
author John W. Eaton <jwe@octave.org>
date Sun, 02 Jun 2013 16:59:24 -0400
parents 4f9b72cf7ee7
children 951da75fd09c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2333
f653602a0500 Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents: 2240
diff changeset
1 # This file is part of MXE.
2353
99516e73b368 Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents: 2349
diff changeset
2 # See index.html for further information.
1371
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
3
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
4 PKG := suitesparse
2726
d242b96f3650 fix suitesparse checksum
Tony Theodore <tonyt@logyst.com>
parents: 2670
diff changeset
5 $(PKG)_CHECKSUM := 46b24a28eef4b040ea5a02d2c43e82e28b7d6195
1371
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
6 $(PKG)_SUBDIR := SuiteSparse
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
7 $(PKG)_FILE := SuiteSparse-$($(PKG)_VERSION).tar.gz
1385
08b296ec290e cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1377
diff changeset
8 $(PKG)_URL := http://www.cise.ufl.edu/research/sparse/SuiteSparse/$($(PKG)_FILE)
2738
3b14416f4c51 package suitesparse: add secondary url
Tony Theodore <tonyt@logyst.com>
parents: 2726
diff changeset
9 $(PKG)_URL_2 := https://distfiles.macports.org/SuiteSparse/$($(PKG)_FILE)
1440
30fed101654f remove package metis because it is not (yet) Free Software
Volker Grabsch <vog@notjusthosting.com>
parents: 1439
diff changeset
10 $(PKG)_DEPS := gcc blas lapack
1372
4c3f4e0e3194 improvements for packages: metis suitesparse
Tony Theodore <tonyt@logyst.com>
parents: 1371
diff changeset
11
1371
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
12 define $(PKG)_UPDATE
2525
4d0f3a9da57e all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents: 2483
diff changeset
13 $(WGET) -q -O- 'http://www.cise.ufl.edu/research/sparse/SuiteSparse/' | \
1385
08b296ec290e cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1377
diff changeset
14 $(SED) -n 's,.*SuiteSparse-\([0-9][^"]*\)\.tar.*,\1,p' | \
1371
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
15 head -1
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
16 endef
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
17
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
18 $(PKG)_STATICLIBS_1 := \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
19 SuiteSparse_config/libsuitesparseconfig.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
20 SuiteSparse_config/xerbla/libcerbla.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
21 AMD/Lib/libamd.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
22 CAMD/Lib/libcamd.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
23 COLAMD/Lib/libcolamd.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
24 CCOLAMD/Lib/libccolamd.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
25 CSparse/Lib/libcsparse.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
26 CXSparse/Lib/libcxsparse.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
27 SPQR/Lib/libspqr.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
28 BTF/Lib/libbtf.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
29 LDL/Lib/libldl.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
30 KLU/Lib/libklu.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
31 RBio/Lib/librbio.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
32 CHOLMOD/Lib/libcholmod.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
33 UMFPACK/Lib/libumfpack.a
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
34
1371
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
35 define $(PKG)_BUILD
1386
0f61e783e13a fix build issues of packages: lapack suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1385
diff changeset
36 # exclude demos
0f61e783e13a fix build issues of packages: lapack suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1385
diff changeset
37 find '$(1)' -name 'Makefile' \
0f61e783e13a fix build issues of packages: lapack suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1385
diff changeset
38 -exec $(SED) -i 's,( cd Demo,#( cd Demo,' {} \;
1385
08b296ec290e cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1377
diff changeset
39
08b296ec290e cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1377
diff changeset
40 # build all
1439
b505b699c280 cleanup package: suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1390
diff changeset
41 $(MAKE) -C '$(1)' -j '$(JOBS)' \
2997
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
42 CC='$(MXE_CC)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
43 CXX='$(MXE_CXX)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
44 CPLUSPLUS='$(MXE_CXX)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
45 F77='$(MXE_F77)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
46 FFLAGS='$(MXE_FFLAGS)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
47 CFLAGS='$(MXE_CFLAGS)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
48 CXXFLAGS='$(MXE_CXXFLAGS)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
49 AR='$(MXE_AR)' \
1439
b505b699c280 cleanup package: suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1390
diff changeset
50 RANLIB='$(TARGET)-ranlib' \
b505b699c280 cleanup package: suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1390
diff changeset
51 BLAS='-lblas -lgfortran -lgfortranbegin' \
1440
30fed101654f remove package metis because it is not (yet) Free Software
Volker Grabsch <vog@notjusthosting.com>
parents: 1439
diff changeset
52 CHOLMOD_CONFIG='-DNPARTITION'
1372
4c3f4e0e3194 improvements for packages: metis suitesparse
Tony Theodore <tonyt@logyst.com>
parents: 1371
diff changeset
53
1385
08b296ec290e cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1377
diff changeset
54 # install library files
3014
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
55 $(INSTALL) -d '$(HOST_LIBDIR)'
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
56
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
57 for f in $(addprefix $(1)/, $($(PKG)_STATICLIBS_1)); do \
2868
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
58 if [ $(BUILD_SHARED) = yes ]; then \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
59 lib=`basename $$f .a`; \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
60 dir=`dirname $$f`; \
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
61 echo "building and installing shared libraries for $$lib"; \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
62 deplibs=""; \
2868
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
63 case $$lib in \
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
64 libcholmod) \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
65 deplibs="-lamd -lcolamd -lsuitesparseconfig -llapack -lblas"; \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
66 ;; \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
67 libklu) \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
68 deplibs="-lbtf -lamd -lcolamd -lsuitesparseconfig"; \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
69 ;; \
2868
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
70 librbio) \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
71 deplibs="-lsuitesparseconfig"; \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
72 ;; \
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
73 libspqr) \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
74 deplibs="-lcholmod -lsuitesparseconfig -llapack -lblas"; \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
75 ;; \
2868
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
76 libumfpack) \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
77 deplibs="-lcholmod -lamd -lsuitesparseconfig -lblas"; \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
78 ;; \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
79 esac; \
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
80 if [ -n "$deplibs" ]; then \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
81 echo " deplibs = $$deplibs"; \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
82 fi; \
3014
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
83 $(MAKE_SHARED_FROM_STATIC) --ar '$(MXE_AR)' --ld '$(MXE_CXX)' $$f --install '$(INSTALL)' --libdir '$(HOST_LIBDIR)' --bindir '$(HOST_BINDIR)' $$deplibs; \
2868
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
84 fi; \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
85 done
1376
896bc60de2a9 improvements for packages: cblas lapack suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents: 1375
diff changeset
86
1385
08b296ec290e cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1377
diff changeset
87 # install include files
3014
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
88 $(INSTALL) -d '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
89 $(INSTALL) -m644 '$(1)/SuiteSparse_config/'*.h '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
90 $(INSTALL) -m644 '$(1)/AMD/Include/'*.h '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
91 $(INSTALL) -m644 '$(1)/BTF/Include/'*.h '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
92 $(INSTALL) -m644 '$(1)/CAMD/Include/'*.h '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
93 $(INSTALL) -m644 '$(1)/CCOLAMD/Include/'*.h '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
94 $(INSTALL) -m644 '$(1)/CHOLMOD/Include/'*.h '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
95 $(INSTALL) -m644 '$(1)/COLAMD/Include/'*.h '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
96 $(INSTALL) -m644 '$(1)/CSparse/Include/'*.h '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
97 $(INSTALL) -m644 '$(1)/CXSparse/Include/'*.h '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
98 $(INSTALL) -m644 '$(1)/KLU/Include/'*.h '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
99 $(INSTALL) -m644 '$(1)/LDL/Include/'*.h '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
100 $(INSTALL) -m644 '$(1)/SPQR/Include/'* '$(HOST_INCDIR)/suitesparse/'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
101 $(INSTALL) -m644 '$(1)/UMFPACK/Include/'*.h '$(HOST_INCDIR)/suitesparse/'
1371
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
102 endef