forked from GraphBLAS/LAGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
91 lines (72 loc) · 2.33 KB
/
Makefile
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
#-------------------------------------------------------------------------------
# LAGraph/Makefile
#-------------------------------------------------------------------------------
# LAGraph, (c) 2021-2022 by The LAGraph Contributors, All Rights Reserved.
# SPDX-License-Identifier: BSD-2-Clause
# See additional acknowledgments in the LICENSE file,
# or contact [email protected] for the full terms.
#-------------------------------------------------------------------------------
# A simple Makefile for LAGraph, 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 and run the tests:
#
# make
# make test
#
# To compile with an alternate compiler:
#
# make CC=gcc CXX=g++
#
# To compile/install for system-wide usage (typically in /usr/local):
#
# make
# sudo make install
#
# To compile/install for elsewhere (for example, in /home/me/mystuff/lib
# and /home/me/mystuff/include), do not use this Makefile. Instead, do:
#
# cd build
# cmake -DCMAKE_INSTALL_PREFIX="/home/me/mystuff" ..
# make
# make install
#
# To clean up the files:
#
# make clean
#
# To uninstall:
#
# make uninstall
#
# To compile and run test coverage: use "make cov". Next, open your browser to
# your local file, LAGraph/build/test_coverage/index.html. Be sure to do "make
# clean" afterwards, and then "make" to compile without test coverage.
JOBS ?= 8
default: library
library:
( cd build && cmake $(CMAKE_OPTIONS) .. && $(MAKE) --jobs=${JOBS} )
# compile with -g for debugging
debug:
( cd build && cmake $(CMAKE_OPTIONS) -DCMAKE_BUILD_TYPE=Debug .. && $(MAKE) --jobs=${JOBS} )
all: library
test: library
( cd build && make test )
# just compile after running cmake; do not run cmake again
remake:
( cd build && $(MAKE) --jobs=${JOBS} )
# just run cmake to set things up
setup:
( cd build ; cmake $(CMAKE_OPTIONS) .. )
install:
( cd build ; $(MAKE) install )
# remove any installed libraries and #include files
uninstall:
- xargs rm < build/install_manifest.txt
# clean, compile, and run test coverage
cov: distclean
( cd build && cmake -DCOVERAGE=1 .. && $(MAKE) --jobs=${JOBS} && make test_coverage )
# remove all files not in the distribution
clean: distclean
purge: distclean
distclean:
- $(RM) -rf build/* config/*.tmp