-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (52 loc) · 2.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
58
59
60
RELEASE_FLAGS=-static -s
LINUX_HEADER_x86_64=-I/Volumes/transcend/programs/linux-header/x86_64/include
LINUX_HEADER_arm=-I/Volumes/transcend/programs/linux-header/arm/include
LINUX_HEADER_i386=-I/Volumes/transcend/programs/linux-header/i386/include
VERBOSE=-DCMAKE_VERBOSE_MAKEFILE=ON
.PHONY: release release-mac release-linux-x86_64 release-linux-arm release-win-x86_64 direct
release: release-mac release-linux-x86_64 release-linux-arm release-win-x86_64
echo "build all"
release-mac: vpngate-connect
mkdir -p build-mac && \
cd build-mac && \
conan install .. --profile ../profiles/release-mac --build missing && \
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release && \
cmake --build .
release-linux-x86_64:
mkdir -p build-linux-x86_64 && \
cd build-linux-x86_64 && \
conan install .. --profile ../profiles/release-linux-x86_64 --build missing && \
cmake .. -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=x86_64-linux-musl-gcc \
-DCMAKE_C_FLAGS="${RELEASE_FLAGS} ${LINUX_HEADER_x86_64}" \
-DCMAKE_CXX_COMPILER=x86_64-linux-musl-g++ \
-DCMAKE_CXX_FLAGS="${RELEASE_FLAGS} ${LINUX_HEADER_x86_64}" && \
cmake --build .
release-linux-arm:
mkdir -p build-linux-arm && \
cd build-linux-arm && \
conan install .. --profile ../profiles/release-linux-arm --build missing && \
cmake .. -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=arm-linux-musleabihf-gcc \
-DCMAKE_C_FLAGS="${RELEASE_FLAGS} ${LINUX_HEADER_arm}" \
-DCMAKE_CXX_COMPILER=arm-linux-musleabihf-g++ \
-DCMAKE_CXX_FLAGS="${RELEASE_FLAGS} ${LINUX_HEADER_arm}" && \
cmake --build .
release-win-x86_64:
mkdir -p build-win-x86_64 && \
cd build-win-x86_64 && \
conan install .. --profile ../profiles/release-win-x86_64 --build missing && \
cmake .. -GNinja \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
-DCMAKE_C_FLAGS="${RELEASE_FLAGS} -DBOOST_USE_WINDOWS_H -DWIN32_LEAN_AND_MEAN" \
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
-DCMAKE_CXX_FLAGS="${RELEASE_FLAGS} -DBOOST_USE_WINDOWS_H -DWIN32_LEAN_AND_MEAN" && \
cmake --build .
raw-build: vpngate-connect.cpp
c++ -o vpngate-connect -std=c++17 $< -lboost_program_options -lboost_filesystem -lboost_system
clean:
rm -rf build-* vpngate-connect