1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
|
#-------------------------------------------------------------------------------
# Makefile for all SuiteSparse packages
#-------------------------------------------------------------------------------
SUITESPARSE = $(CURDIR)
export SUITESPARSE
default: go
include SuiteSparse_config/SuiteSparse_config.mk
# Compile the default rules for each package
go: metis
( cd SuiteSparse_config && $(MAKE) )
( cd GraphBLAS && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' )
( cd Mongoose && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' )
( cd AMD && $(MAKE) )
( cd BTF && $(MAKE) )
( cd CAMD && $(MAKE) )
( cd CCOLAMD && $(MAKE) )
( cd COLAMD && $(MAKE) )
( cd CHOLMOD && $(MAKE) )
( cd CSparse && $(MAKE) )
( cd CXSparse && $(MAKE) )
( cd LDL && $(MAKE) )
( cd KLU && $(MAKE) )
( cd UMFPACK && $(MAKE) )
( cd RBio && $(MAKE) )
ifneq ($(GPU_CONFIG),)
( cd SuiteSparse_GPURuntime && $(MAKE) )
( cd GPUQREngine && $(MAKE) )
endif
( cd SPQR && $(MAKE) )
# ( cd PIRO_BAND && $(MAKE) )
# ( cd SKYLINE_SVD && $(MAKE) )
# install all packages in /usr/local/lib and /usr/local/include
# (note that CSparse is not installed; CXSparse is installed instead)
install: metisinstall
( cd SuiteSparse_config && $(MAKE) install )
( cd GraphBLAS && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' install )
( cd Mongoose && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' install )
( cd AMD && $(MAKE) install )
( cd BTF && $(MAKE) install )
( cd CAMD && $(MAKE) install )
( cd CCOLAMD && $(MAKE) install )
( cd COLAMD && $(MAKE) install )
( cd CHOLMOD && $(MAKE) install )
( cd CXSparse && $(MAKE) install )
( cd LDL && $(MAKE) install )
( cd KLU && $(MAKE) install )
( cd UMFPACK && $(MAKE) install )
( cd RBio && $(MAKE) install )
ifneq (,$(GPU_CONFIG))
( cd SuiteSparse_GPURuntime && $(MAKE) install )
( cd GPUQREngine && $(MAKE) install )
endif
( cd SPQR && $(MAKE) install )
# ( cd PIRO_BAND && $(MAKE) install )
# ( cd SKYLINE_SVD && $(MAKE) install )
$(CP) README.txt $(INSTALL_DOC)/SuiteSparse_README.txt
chmod 644 $(INSTALL_DOC)/SuiteSparse_README.txt
metisinstall: metis
ifeq (,$(MY_METIS_LIB))
# install METIS from SuiteSparse/metis-5.1.0
@mkdir -p $(INSTALL_LIB)
@mkdir -p $(INSTALL_INCLUDE)
@mkdir -p $(INSTALL_DOC)
- $(CP) lib/libmetis.* $(INSTALL_LIB)
- $(CP) metis-5.1.0/manual/manual.pdf $(INSTALL_DOC)/METIS_manual.pdf
- $(CP) metis-5.1.0/README.txt $(INSTALL_DOC)/METIS_README.txt
# the following is needed only on the Mac, so *.dylib is hardcoded:
$(SO_INSTALL_NAME) $(INSTALL_LIB)/libmetis.dylib $(INSTALL_LIB)/libmetis.dylib
- $(CP) include/metis.h $(INSTALL_INCLUDE)
chmod 755 $(INSTALL_LIB)/libmetis.*
chmod 644 $(INSTALL_INCLUDE)/metis.h
chmod 644 $(INSTALL_DOC)/METIS_manual.pdf
chmod 644 $(INSTALL_DOC)/METIS_README.txt
endif
# uninstall all packages
uninstall:
$(RM) $(INSTALL_DOC)/SuiteSparse_README.txt
( cd SuiteSparse_config && $(MAKE) uninstall )
- ( cd metis-5.1.0 && $(MAKE) uninstall )
- ( cd GraphBLAS && $(MAKE) uninstall )
- ( cd Mongoose && $(MAKE) uninstall )
( cd AMD && $(MAKE) uninstall )
( cd CAMD && $(MAKE) uninstall )
( cd COLAMD && $(MAKE) uninstall )
( cd BTF && $(MAKE) uninstall )
( cd KLU && $(MAKE) uninstall )
( cd LDL && $(MAKE) uninstall )
( cd CCOLAMD && $(MAKE) uninstall )
( cd UMFPACK && $(MAKE) uninstall )
( cd CHOLMOD && $(MAKE) uninstall )
( cd CSparse && $(MAKE) uninstall )
( cd CXSparse && $(MAKE) uninstall )
( cd RBio && $(MAKE) uninstall )
( cd SuiteSparse_GPURuntime && $(MAKE) uninstall )
( cd GPUQREngine && $(MAKE) uninstall )
( cd SPQR && $(MAKE) uninstall )
# ( cd PIRO_BAND && $(MAKE) uninstall )
# ( cd SKYLINE_SVD && $(MAKE) uninstall )
ifeq (,$(MY_METIS_LIB))
# uninstall METIS, which came from SuiteSparse/metis-5.1.0
$(RM) $(INSTALL_LIB)/libmetis.*
$(RM) $(INSTALL_INCLUDE)/metis.h
$(RM) $(INSTALL_DOC)/METIS_manual.pdf
$(RM) $(INSTALL_DOC)/METIS_README.txt
endif
$(RM) -r $(INSTALL_DOC)
# compile the dynamic libraries. For GraphBLAS and Mongoose, this also builds
# the static library
library: metis
( cd SuiteSparse_config && $(MAKE) )
( cd GraphBLAS && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' library )
( cd Mongoose && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' library )
( cd AMD && $(MAKE) library )
( cd BTF && $(MAKE) library )
( cd CAMD && $(MAKE) library )
( cd CCOLAMD && $(MAKE) library )
( cd COLAMD && $(MAKE) library )
( cd CHOLMOD && $(MAKE) library )
( cd KLU && $(MAKE) library )
( cd LDL && $(MAKE) library )
( cd UMFPACK && $(MAKE) library )
( cd CSparse && $(MAKE) library )
( cd CXSparse && $(MAKE) library )
( cd RBio && $(MAKE) library )
ifneq (,$(GPU_CONFIG))
( cd SuiteSparse_GPURuntime && $(MAKE) library )
( cd GPUQREngine && $(MAKE) library )
endif
( cd SPQR && $(MAKE) library )
# ( cd PIRO_BAND && $(MAKE) library )
# ( cd SKYLINE_SVD && $(MAKE) library )
# compile the static libraries (except for metis, GraphBLAS, and Mongoose).
# metis is only dynamic, and the 'make static' for GraphBLAS and Mongoose makes
# both the dynamic and static libraries.
static: metis
( cd SuiteSparse_config && $(MAKE) static )
( cd AMD && $(MAKE) static )
( cd BTF && $(MAKE) static )
( cd CAMD && $(MAKE) static )
( cd CCOLAMD && $(MAKE) static )
( cd COLAMD && $(MAKE) static )
( cd CHOLMOD && $(MAKE) static )
( cd KLU && $(MAKE) static )
( cd LDL && $(MAKE) static )
( cd UMFPACK && $(MAKE) static )
( cd CSparse && $(MAKE) static )
( cd CXSparse && $(MAKE) static )
( cd RBio && $(MAKE) static )
ifneq (,$(GPU_CONFIG))
( cd SuiteSparse_GPURuntime && $(MAKE) static )
( cd GPUQREngine && $(MAKE) static )
endif
( cd SPQR && $(MAKE) static )
# ( cd PIRO_BAND && $(MAKE) static )
# ( cd SKYLINE_SVD && $(MAKE) static )
# Remove all files not in the original distribution
purge:
- ( cd SuiteSparse_config && $(MAKE) purge )
- ( cd metis-5.1.0 && $(MAKE) distclean )
- ( cd AMD && $(MAKE) purge )
- ( cd GraphBLAS && $(MAKE) purge )
- ( cd Mongoose && $(MAKE) purge )
- ( cd CAMD && $(MAKE) purge )
- ( cd COLAMD && $(MAKE) purge )
- ( cd BTF && $(MAKE) purge )
- ( cd KLU && $(MAKE) purge )
- ( cd LDL && $(MAKE) purge )
- ( cd CCOLAMD && $(MAKE) purge )
- ( cd UMFPACK && $(MAKE) purge )
- ( cd CHOLMOD && $(MAKE) purge )
- ( cd CSparse && $(MAKE) purge )
- ( cd CXSparse && $(MAKE) purge )
- ( cd RBio && $(MAKE) purge )
- ( cd MATLAB_Tools/SuiteSparseCollection && $(RM) *.mex* )
- ( cd MATLAB_Tools/SSMULT && $(RM) *.mex* )
- ( cd SuiteSparse_GPURuntime && $(MAKE) purge )
- ( cd GPUQREngine && $(MAKE) purge )
- ( cd SPQR && $(MAKE) purge )
# - ( cd PIRO_BAND && $(MAKE) purge )
# - ( cd SKYLINE_SVD && $(MAKE) purge )
- $(RM) MATLAB_Tools/*/*.mex* MATLAB_Tools/spok/private/*.mex*
- $(RM) -r include/* bin/* lib/* share/*
# Remove all files not in the original distribution, but keep the libraries
clean:
- ( cd SuiteSparse_config && $(MAKE) clean )
- ( cd metis-5.1.0 && $(MAKE) clean )
- ( cd GraphBLAS && $(MAKE) clean )
- ( cd Mongoose && $(MAKE) clean )
- ( cd AMD && $(MAKE) clean )
- ( cd CAMD && $(MAKE) clean )
- ( cd COLAMD && $(MAKE) clean )
- ( cd BTF && $(MAKE) clean )
- ( cd KLU && $(MAKE) clean )
- ( cd LDL && $(MAKE) clean )
- ( cd CCOLAMD && $(MAKE) clean )
- ( cd UMFPACK && $(MAKE) clean )
- ( cd CHOLMOD && $(MAKE) clean )
- ( cd CSparse && $(MAKE) clean )
- ( cd CXSparse && $(MAKE) clean )
- ( cd RBio && $(MAKE) clean )
- ( cd SuiteSparse_GPURuntime && $(MAKE) clean )
- ( cd GPUQREngine && $(MAKE) clean )
- ( cd SPQR && $(MAKE) clean )
# - ( cd PIRO_BAND && $(MAKE) clean )
# - ( cd SKYLINE_SVD && $(MAKE) clean )
# Create the PDF documentation
docs:
( cd GraphBLAS && $(MAKE) docs )
( cd Mongoose && $(MAKE) docs )
( cd AMD && $(MAKE) docs )
( cd CAMD && $(MAKE) docs )
( cd KLU && $(MAKE) docs )
( cd LDL && $(MAKE) docs )
( cd UMFPACK && $(MAKE) docs )
( cd CHOLMOD && $(MAKE) docs )
( cd SPQR && $(MAKE) docs )
# ( cd PIRO_BAND && $(MAKE) docs )
# ( cd SKYLINE_SVD && $(MAKE) docs )
distclean: purge
# Create CXSparse from CSparse
# Note that the CXSparse directory should initially not exist.
cx:
( cd CSparse ; $(MAKE) purge )
( cd SuiteSparse_config && $(MAKE) )
( cd CXSparse_newfiles ; tar cfv - * | gzip -9 > ../CXSparse_newfiles.tar.gz )
./CSparse_to_CXSparse CSparse CXSparse CXSparse_newfiles.tar.gz
( cd CXSparse/Demo ; $(MAKE) )
( cd CXSparse/Demo ; $(MAKE) > cs_demo.out )
( cd CXSparse ; $(MAKE) purge )
$(RM) -f CXSparse_newfiles.tar.gz
# statement coverage (Linux only); this requires a lot of time.
# The umfpack tcov requires a lot of disk space in /tmp
cov: purge
( cd CXSparse && $(MAKE) cov )
( cd CSparse && $(MAKE) cov )
( cd CHOLMOD && $(MAKE) cov )
( cd KLU && $(MAKE) cov )
( cd SPQR && $(MAKE) cov )
( cd UMFPACK && $(MAKE) cov )
# ( cd PIRO_BAND && $(MAKE) cov )
# ( cd SKYLINE_SVD && $(MAKE) cov )
# configure and compile METIS, placing the libmetis.* library in
# SuiteSparse/lib and the metis.h include file in SuiteSparse/include.
metis: include/metis.h
# Install the shared version of METIS in SuiteSparse/lib.
# The SO_INSTALL_NAME commmand is only needed on the Mac, so *.dylib is
# hardcoded below.
include/metis.h:
ifeq (,$(MY_METIS_LIB))
- ( cd metis-5.1.0 && $(MAKE) config shared=1 prefix=$(SUITESPARSE) cc=$(CC) )
- ( cd metis-5.1.0 && $(MAKE) )
- ( cd metis-5.1.0 && $(MAKE) install )
- $(SO_INSTALL_NAME) $(SUITESPARSE)/lib/libmetis.dylib \
$(SUITESPARSE)/lib/libmetis.dylib
else
@echo 'Using pre-installed METIS 5.1.0 library at ' '[$(MY_METIS_LIB)]'
endif
# just compile GraphBLAS
gb:
echo $(CMAKE_OPTIONS)
( cd GraphBLAS && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' )
# just install GraphBLAS
gbinstall:
echo $(CMAKE_OPTIONS)
( cd GraphBLAS && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' install )
|