-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (27 loc) · 724 Bytes
/
Makefile
File metadata and controls
35 lines (27 loc) · 724 Bytes
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
# Shim Makefile - CMake now handles the build for most part.
# You probably want to run ./configure --help if you're looking at this.
# We use git to clean
GIT := /bin/git
# Check if build directory exists
BUILD_DIR_EXISTS := $(shell test -d build && echo yes)
define check_build_dir
@if [ ! -d build ]; then \
echo "Error: build/ directory not found."; \
echo "Please run './configure --help' to see configuration options."; \
exit 1; \
fi
endef
prod:
$(check_build_dir)
@$(MAKE) -C build
install:
$(check_build_dir)
@$(MAKE) -C build install
tests:
$(check_build_dir)
@cd build && ctest --output-on-failure
clean:
$(check_build_dir)
@$(MAKE) -C build clean
distclean:
@$(GIT) clean -fdx || false