-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
63 lines (51 loc) · 1.94 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
.DEFAULT_GOAL := help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
#######################################
# Docker targets
#######################################
.PHONY: dckr-image
dckr-image: ## Builds the Docker image for building, developing and testing
docker-compose build --pull 4c-project
.PHONY: dckr-shell
dckr-shell: ## Spawns a `bash` shell within a Docker container
docker-compose run --rm 4c-project shell
#######################################
# Compilation targets
#######################################
.PHONY: dckr-build
dckr-build: ## Builds application and tests executables, within a Docker container
docker-compose run --rm 4c-project build
.PHONY: build
build: ## Builds application and tests executables
./scripts/entrypoint.sh build
#######################################
# Tests targets
#######################################
.PHONY: dckr-test
dckr-test: ## Run application tests, within a Docker container
docker-compose run --rm 4c-project test
.PHONY: test
test: ## Run application tests
./scripts/entrypoint.sh test
#######################################
# Utils targets
#######################################
.PHONY: dckr-format
dckr-format:## Formats C++ code using clang-format (with Webkit style, by default), within a Docker container
docker-compose run --rm 4c-project format
.PHONY: format
format: ## Formats C++ code using clang-format (with Webkit style, by default)
./scripts/entrypoint.sh format
#######################################
# Clean-up targets
#######################################
.PHONY: dckr-clean
dckr-clean: ## Removes building artifacts, within a Docker container
docker-compose run --rm 4c-project clean
.PHONY: clean
clean: ## Removes building artifacts
./scripts/entrypoint.sh clean
.PHONY: mrproper
mrproper: clean ## Removes building artifacts and downloaded libraries
rm -rf build .conan