File: Makefile

package info (click to toggle)
suitesparse 1%3A7.12.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 258,724 kB
  • sloc: ansic: 1,156,724; cpp: 48,359; makefile: 5,047; fortran: 2,087; java: 1,826; sh: 1,456; ruby: 725; python: 676; asm: 371; sed: 166; awk: 44
file content (91 lines) | stat: -rw-r--r-- 2,261 bytes parent folder | download | duplicates (2)
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
#-------------------------------------------------------------------------------
# CSparse/Makefile
#-------------------------------------------------------------------------------

# CSparse: Copyright (c) 2006-2022, Timothy A. Davis, All Rights Reserved.
# SPDX-License-Identifier: LGPL-2.1+

#-------------------------------------------------------------------------------

# A simple Makefile for CSparse, which relies on cmake to do the
# actual build.  All the work is done in cmake so this Makefile is just for
# convenience.

# Note that there is no "make install" target.  For production use, CXSparse
# should be installed instead.

# To compile with an alternate compiler:
#
#       make CC=gcc CXX=g++
#
# To compile:
#
#       make
#
# To clean up the files:
#
#       make clean
#
# To run the demos
#
#       make demos
#
# To run test coverage:
#
#       make cov

JOBS ?= 8

default: library

library:
	( cd build && cmake $(CMAKE_OPTIONS) .. && cmake --build . --config Release -j${JOBS} )

local: library

global: library

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/cs_demo1 < ./Matrix/t1
	- ./build/cs_demo2 < ./Matrix/t1
	- ./build/cs_demo2 < ./Matrix/ash219
	- ./build/cs_demo2 < ./Matrix/bcsstk01
	- ./build/cs_demo2 < ./Matrix/fs_183_1
	- ./build/cs_demo2 < ./Matrix/mbeacxc
	- ./build/cs_demo2 < ./Matrix/west0067
	- ./build/cs_demo2 < ./Matrix/lp_afiro
	- ./build/cs_demo2 < ./Matrix/bcsstk16
	- ./build/cs_demo3 < ./Matrix/bcsstk01
	- ./build/cs_demo3 < ./Matrix/bcsstk16

install:
	- echo 'CSparse is not installed; use CXSparse instead'

# 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) .. )

# remove all files not in the distribution
clean:
	- $(RM) -rf build/* Config/*.tmp MATLAB/*.o MATLAB/*.mex* timelog.m
	- $(RM) -rf MATLAB/*/*.o MATLAB/*/*.mex*
	( cd Tcov && $(MAKE) purge )

purge: clean

distclean: clean

# test coverage
cov:
	( cd Tcov && $(MAKE) )