forked from gismo/gismo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (36 loc) · 1.09 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
######################################################################
## Makefile
## This file is part of the G+Smo library.
##
## Uses CMake to configure and build G+Smo in the subfolder ./build
##
## Author: Angelos Mantzaflaris
######################################################################
SHELL := /bin/bash
RM := rm -rf
MKDIR := mkdir -p
ifndef VERBOSE
MAKEFLAGS += --no-print-directory
endif
all: ./build/Makefile
@ $(MAKE) -C build && echo "Build completed in folder ./build"
./build/Makefile:
@ $(MKDIR) build
@ (cd build >/dev/null 2>&1 && cmake ..)
cleancmake:
@- $(RM) CMakeCache.txt
@- $(RM) CMakeFiles
@- $(RM) cmake_install.cmake
distclean:
@- (cd build >/dev/null 2>&1 && cmake .. >/dev/null 2>&1)
@- $(MAKE) --silent -C build clean || true
@- $(RM) ./build/Makefile
@- $(RM) ./build/CMake*
@- $(RM) ./build/cmake.*
@- $(RM) ./build/*.cmake
ifeq ($(findstring distclean,$(MAKECMDGOALS)),)
ifeq ($(findstring cleancmake,$(MAKECMDGOALS)),)
$(MAKECMDGOALS): ./build/Makefile
@ $(MAKE) -C build $(MAKECMDGOALS) && echo "Build completed in folder ./build"
endif
endif