1#------------------------------------------------------------------------------- 2# GraphBLAS/Makefile 3#------------------------------------------------------------------------------- 4 5# SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 6# SPDX-License-Identifier: Apache-2.0 7 8#------------------------------------------------------------------------------- 9 10# simple Makefile for GraphBLAS, relies on cmake to do the actual build. Use 11# the CMAKE_OPTIONS argument to this Makefile to pass options to cmake. 12 13JOBS ?= 8 14 15default: library 16 17# just build the dynamic library, not the demos 18library: 19 ( cd build ; cmake $(CMAKE_OPTIONS) .. ; $(MAKE) --jobs=$(JOBS) ) 20 21# build the dynamic library and the demos 22all: 23 ( cd build ; cmake $(CMAKE_OPTIONS) -DDEMO=1 .. ; $(MAKE) --jobs=$(JOBS) ) 24 25# just run the demos 26run: all 27 ( cd Demo ; ./demo ) 28 29# just do 'make' in build; do not rerun the cmake script 30remake: 31 ( cd build ; $(MAKE) --jobs=$(JOBS) ) 32 33# just run cmake; do not compile 34cmake: 35 ( cd build ; cmake $(CMAKE_OPTIONS) .. ; ) 36 37# build both the static and dynamic libraries; do not run the demo 38static: 39 ( cd build ; cmake $(CMAKE_OPTIONS) -DBUILD_GRB_STATIC_LIBRARY=1 .. ; $(MAKE) --jobs=$(JOBS) ) 40 41# installs GraphBLAS to the install location defined by cmake, usually 42# /usr/local/lib and /usr/local/include 43install: 44 ( cd build ; $(MAKE) install ) 45 46# create the Doc/GraphBLAS_UserGuide.pdf 47docs: 48 ( cd Doc ; $(MAKE) ) 49 50# compile the CUDA kernels 51gpu: 52 ( cd CUDA ; $(MAKE) ) 53 54# remove any installed libraries and #include files 55uninstall: 56 - xargs rm < build/install_manifest.txt 57 58clean: distclean 59 60purge: distclean 61 62# remove all files not in the distribution 63distclean: 64 rm -rf build/* Demo/*.out Demo/complex_demo_out*.m Tcov/log.txt 65 rm -rf Config/*.tmp Source/control.m4 66 rm -rf Doc/html/* Doc/*.tmp 67 ( cd GraphBLAS ; $(MAKE) distclean ) 68 ( cd Test ; $(MAKE) distclean ) 69 ( cd Tcov ; $(MAKE) distclean ) 70 ( cd Doc ; $(MAKE) distclean ) 71 ( cd alternative ; $(MAKE) distclean ) 72 73