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
|
#-------------------------------------------------------------------------------
# Mongoose/Makefile
#-------------------------------------------------------------------------------
# Mongoose, Timothy A. Davis, Scott P. Kolodziej, William W. Hager,
# S. Nuri Yeralan, (c) 2017-2018, All Rights Reserved.
# http://suitesparse.com See Mongoose/Doc/License.txt for license.
#-------------------------------------------------------------------------------
# simple Makefile for Mongoose, relies on cmake to do the actual build. Use
# the CMAKE_OPTIONS argument to this Makefile to pass options to cmake.
# 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} )
# build the Mongoose library (static and dynamic) and run a quick test
demos: library
( cd build && ./demo )
( cd build && ctest . || ctest . --rerun-failed --output-on-failure )
# the same as "make library"
static: library
# installs Mongoose to the install location defined by cmake, usually
# /usr/local/lib and /usr/local/include
install:
( cd build && cmake --install . )
# create the Doc/Mongoose_UserGuide.pdf
docs:
( cd build && cmake $(CMAKE_OPTIONS) .. ; cmake --build . --target userguide )
# remove any installed libraries and #include files
uninstall:
- xargs rm < build/install_manifest.txt
# run the extensive tests
test:
( cd build && cmake $(CMAKE_OPTIONS) .. ; ctest . )
clean: distclean
purge: distclean
# remove all files not in the distribution
distclean:
- $(RM) -rf build/* Version/*.tmp MATLAB/*.o MATLAB/*.mex*
- $(RM) -r Doc/*.out Doc/*.aux Doc/*.log Doc/*.bbl Doc/*.blg Doc/*.toc Doc/*.idx
|