-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (35 loc) · 1.46 KB
/
Makefile
File metadata and controls
45 lines (35 loc) · 1.46 KB
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
PWD = $(shell pwd)
default: help
.PHONY: all # Build all sub-projects
all: piuio piubtn
.PHONY: clean # Clean all build output of all sub-projects
clean:
$(MAKE) -C $(PWD)/piuio clean
.PHONY: piuio # Build the piuio sub-project
piuio:
$(MAKE) -C $(PWD)/piuio all
.PHONY: piubtn # Build the piubtn sub-project
pipiubtnuio:
$(MAKE) -C $(PWD)/piubtn all
.PHONY: package # Create distribution packages (zip-files) of the sub-projects
package:
$(MAKE) -C $(PWD)/piuio package
$(MAKE) -C $(PWD)/piubtn package
.PHONY: code-format # Run clang-format over the entire code base using the provided code style in .clang-format
code-format:
@echo "Applying clang-format..."
@find . -name '*.c' -o -name '*.h' | xargs clang-format -i -style=file
# -----------------------------------------------------------------------------
# Utility, combo and alias targets
# -----------------------------------------------------------------------------
# Help screen note:
# Variables that need to be displayed in the help screen need to strictly
# follow the pattern "^[A-Z_]+ \?= .* # .*".
# Targets that need to be displayed in the help screen need to add a separate
# phony definition strictly following the pattern "^\.PHONY\: .* # .*".
.PHONY: help # Default target, print help screen
help:
@echo pumpio utility library project makefile.
@echo
@echo "Targets:"
@grep '^.PHONY: .* #' Makefile | gawk 'match($$0, /\.PHONY: (.*) # (.*)/, a) { printf(" \033[0;32m%-25s \033[0;0m%s\n", a[1], a[2]) }'