-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
77 lines (65 loc) · 1.83 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Copy: (c) 2023 blurryroots innovation qanat OÜ
# Author: sven freiberg
PROJECT := Eddy
BUILD_ID := "$(shell git rev-parse HEAD)"
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
Qt5_DIR_NIX := "/opt/qt/5.14.2/gcc_64/lib/cmake/Qt5"
endif
ifeq ($(UNAME_S),Darwin)
Qt5_DIR_MAC := "$(shell brew --prefix qt@5)/lib/cmake/Qt5"
endif
.PHONY: all
all: stage run
clean:
rm -rf Staging CMakeFiles Release CMakeCache.txt
.PHONY: stage
stage: linux-stage
# linux
linux-stage:
cmake -B Staging \
-DCMAKE_BUILD_TYPE=Release \
-DQt5_DIR=$(Qt5_DIR_NIX) \
-DBUILD_ID=$(BUILD_ID)\
-DBUILD_SHARED_LIBS=ON -DBUILD_MODULES=ON
linux-stage-debug:
cmake -B Staging \
-DCMAKE_BUILD_TYPE=Debug \
-DQt5_DIR=$(Qt5_DIR_NIX) \
-DBUILD_ID=$(BUILD_ID)\
-DBUILD_SHARED_LIBS=ON -DBUILD_MODULES=ON
linux-build:
cmake --build Staging
linux-compile-release-candidate:
cmake --build Staging --target Eddy_Compile_Release_Candidate
.PHONY: linux
linux: linux-stage linux-build linux-compile-release-candidate
.PHONY: linux-debug
linux-debug: linux-stage linux-build linux-compile-release-candidate
# mac
mac-stage:
cmake -B Staging \
-DCMAKE_BUILD_TYPE=Release \
-DQt5_DIR=$(Qt5_DIR_NIX) \
-DBUILD_ID=$(BUILD_ID)\
-DBUILD_SHARED_LIBS=ON -DBUILD_MODULES=ON
mac-stage-debug:
cmake -B Staging \
-DCMAKE_BUILD_TYPE=Debug \
-DQt5_DIR=$(Qt5_DIR_NIX) \
-DBUILD_ID=$(BUILD_ID)\
-DBUILD_SHARED_LIBS=ON -DBUILD_MODULES=ON
mac-build:
cmake --build Staging
mac-compile-release-candidate:
cmake --build Staging --target Eddy_Compile_Release_Candidate
.PHONY: mac
mac: mac-stage mac-build mac-compile-release-candidate
.PHONY: mac-debug
mac-debug: mac-stage mac-build mac-compile-release-candidate
debug-nix:
sudo lldb Release/./${PROJECT}
debug-mac:
leaks --atExit -- Release/./${PROJECT}
deploy-linux:
cmake --build Staging --target Eddy_Build_AppImage