-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
50 lines (43 loc) · 1.61 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
###############################################################################
# File : Malefile
# Description : Makefile for example
# Author : hakkadaikon
###############################################################################
#------------------------------------------------------------------------------
# Build options
#------------------------------------------------------------------------------
.PHONY: clean setup build docker-prune docker-build format
clean:
@rm -rf \
build \
meson/subprojects/yyjson \
meson/subprojects/libwebsockets \
meson/subprojects/openssl-cmake
setup: clean
meson setup meson build
build:
ninja -C build
docker-prune:
yes | docker system prune --volumes
docker-build:
DOCKER_BUILDKIT=1 docker build --progress=plain .
# format (use clang)
format:
@clang-format -i \
-style="{ \
BasedOnStyle: Google, \
AlignConsecutiveAssignments: true, \
AlignConsecutiveDeclarations: true, \
ColumnLimit: 0, \
IndentWidth: 4, \
AllowShortFunctionsOnASingleLine: None, \
AllowShortLoopsOnASingleLine: false, \
BreakBeforeBraces: Linux, \
SortIncludes: true, \
DerivePointerAlignment: false, \
AlignConsecutiveMacros: true, \
PointerAlignment: Left, \
AlignOperands: true, \
}" \
$(shell find src/ -name '*.cpp' -o -name '*.hpp') \
$(shell find src/ -name '*.c' -o -name '*.h' )