-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
57 lines (47 loc) · 1.47 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
CMAKE ?= cmake
PREFIX ?= build
BUILD_TYPE ?= ReleaseWithDebug
CMAKEFLAGS ?= -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
native:
mkdir -p $(PREFIX)
$(CMAKE) . -B $(PREFIX) $(CMAKEFLAGS)
$(MAKE) -C $(PREFIX)
win-amd64:
mkdir -p $(PREFIX)-$@
$(CMAKE) . -B $(PREFIX)-$@ $(CMAKEFLAGS) -DCMAKE_TOOLCHAIN_FILE=cmake/x86_64-w64-mingw32-toolchain.cmake
$(MAKE) -C $(PREFIX)-$@
win-i686:
mkdir -p $(PREFIX)-$@
$(CMAKE) . -B $(PREFIX)-$@ $(CMAKEFLAGS) -DCMAKE_TOOLCHAIN_FILE=cmake/i686-w64-mingw32-toolchain.cmake
$(MAKE) -C $(PREFIX)-$@
lin-aarch64:
mkdir -p $(PREFIX)-$@
$(CMAKE) . -B $(PREFIX)-$@ $(CMAKEFLAGS) -DCMAKE_TOOLCHAIN_FILE=cmake/aarch64-gcc-toolchain.cmake
$(MAKE) -C $(PREFIX)-$@
android-amd64:
mkdir -p $(PREFIX)-$@
$(CMAKE) . -B $(PREFIX)-$@ $(CMAKEFLAGS) -DCMAKE_TOOLCHAIN_FILE=cmake/amd64-android-toolchain.cmake
$(MAKE) -C $(PREFIX)-$@
android-arm7a:
mkdir -p $(PREFIX)-$@
$(CMAKE) . -B $(PREFIX)-$@ $(CMAKEFLAGS) -DCMAKE_TOOLCHAIN_FILE=cmake/arm7a-android-toolchain.cmake
$(MAKE) -C $(PREFIX)-$@
android-aarch64:
mkdir -p $(PREFIX)-$@
$(CMAKE) . -B $(PREFIX)-$@ $(CMAKEFLAGS) -DCMAKE_TOOLCHAIN_FILE=cmake/aarch64-android-toolchain.cmake
$(MAKE) -C $(PREFIX)-$@
all:
$(MAKE) native
$(MAKE) win-amd64
$(MAKE) win-i686
$(MAKE) lin-aarch64
$(MAKE) android-aarch64
$(MAKE) android-arm7a
$(MAKE) android-amd64
docs:
mkdir -p $(PREFIX)
$(CMAKE) . -B $(PREFIX) $(CMAKEFLAGS) -DBUILD_DOCS=ON
$(MAKE) -C $(PREFIX) docs
install:
$(MAKE) native
$(MAKE) -C $(PREFIX) install