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
|
#-------------------------------------------------------------------------------
# SuiteSparse/AMD/Makefile
#-------------------------------------------------------------------------------
# AMD: Copyright (c) 2009-2022, Timothy A. Davis, Patrick Amestoy, Iain Duff.
# All Rights Reserved.
# SPDX-License-Identifier: BSD-3-clause
#-------------------------------------------------------------------------------
# A simple Makefile for AMD, which relies on cmake to do the
# actual build. All the work is done in cmake so this Makefile is just for
# convenience.
# To compile with an alternate compiler:
#
# make CC=gcc CXX=g++
#
# To compile/install for system-wide usage:
#
# make
# sudo make install
#
# To compile/install for local usage (SuiteSparse/lib and SuiteSparse/include):
#
# make local
# make install
#
# To clean up the files:
#
# make clean
JOBS ?= 8
default: library
# default is to install only in /usr/local
library:
( cd build && cmake $(CMAKE_OPTIONS) .. && cmake --build . --config Release -j${JOBS} )
# install only in SuiteSparse/lib and SuiteSparse/include
local:
( cd build && cmake $(CMAKE_OPTIONS) -USUITESPARSE_PKGFILEDIR -DSUITESPARSE_LOCAL_INSTALL=1 .. && cmake --build . --config Release -j${JOBS} )
# install only in /usr/local (default)
global:
( cd build && cmake $(CMAKE_OPTIONS) -USUITESPARSE_PKGFILEDIR -DSUITESPARSE_LOCAL_INSTALL=0 .. && cmake --build . --config Release -j${JOBS} )
debug:
( cd build && cmake $(CMAKE_OPTIONS) -DCMAKE_BUILD_TYPE=Debug .. && cmake --build . --config Debug -j${JOBS} )
all: library
demos: library
( cd build && cmake $(CMAKE_OPTIONS) -DSUITESPARSE_DEMOS=1 .. && cmake --build . --config Release -j${JOBS} )
./build/amd_demo > build/amd_demo.out && ( command -v d2u && d2u ./build/amd_demo.out || true )
- diff Demo/amd_demo.out build/amd_demo.out
./build/amd_l_demo > build/amd_l_demo.out && ( command -v d2u && d2u ./build/amd_l_demo.out || true )
- diff Demo/amd_l_demo.out build/amd_l_demo.out
./build/amd_demo2 > build/amd_demo2.out && ( command -v d2u && d2u ./build/amd_demo2.out || true )
- diff Demo/amd_demo2.out build/amd_demo2.out
./build/amd_simple > build/amd_simple.out && ( command -v d2u && d2u ./build/amd_simple.out || true )
- diff Demo/amd_simple.out build/amd_simple.out
# Fortran demos will fail if no Fortran compiler is available
- ./build/amd_f77simple > build/amd_f77simple.out && ( command -v d2u && d2u ./build/amd_f77simple.out || true )
- diff Demo/amd_f77simple.out build/amd_f77simple.out
- ./build/amd_f77demo > build/amd_f77demo.out && ( command -v d2u && d2u ./build/amd_f77demo.out || true )
- diff Demo/amd_f77demo.out build/amd_f77demo.out
# just compile after running cmake; do not run cmake again
remake:
( cd build && cmake --build . -j${JOBS} )
# just run cmake to set things up
setup:
( cd build && cmake $(CMAKE_OPTIONS) .. )
install:
( cd build && cmake --install . )
# remove any installed libraries and #include files
uninstall:
- xargs rm < build/install_manifest.txt
# remove all files not in the distribution
clean:
- $(RM) -rf build/* Config/*.tmp MATLAB/*.o MATLAB/*.mex*
purge: clean
distclean: clean
docs:
( cd Doc && $(MAKE) )
|