forked from nymtech/nym-vpn-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (43 loc) · 1.54 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
# Detect the OS and architecture
OS := $(shell uname -s)
ARCH := $(shell uname -m)
# Adjust the ARCH variable based on detected values
ifeq ($(OS),Linux)
ifeq ($(ARCH),x86_64)
ARCH := x86_64-unknown-linux-gnu
else ifeq ($(ARCH),aarch64)
ARCH := aarch64-unknown-linux-gnu
# Add more architectures as needed
endif
endif
ifeq ($(OS),Darwin)
ifeq ($(ARCH),x86_64)
ARCH := x86_64-apple-darwin
else ifeq ($(ARCH),arm64)
ARCH := aarch64-apple-darwin
# Add more architectures as needed
endif
endif
DESKTOP_RUST_DIR=nym-vpn-desktop/src-tauri
DESKTOP_PUBLIC_DIR=nym-vpn-desktop/public
all: build-wireguard build-cli local-install
build-wireguard:
./wireguard/build-wireguard-go.sh
build-cli:
RUSTFLAGS="-L $(CURDIR)/build/lib/$(ARCH)" cargo build --release
build-desktop:
npm install --prefix nym-vpn-desktop
npm run --prefix nym-vpn-desktop tauri build
dev-desktop:
npm run --prefix nym-vpn-desktop dev:app
local-install:
mkdir -p bin
cp -f target/release/nym-vpn-cli bin/nym-vpn-cli
generate-licenses: generate-licenses-cli generate-licenses-cli-json generate-licenses-desktop generate-licenses-desktop-json
generate-licenses-cli:
cargo about generate --all-features about.hbs -o all_licenses_cli.html
generate-licenses-cli-json:
cargo about generate --all-features --format json -o all_licenses_cli.json
generate-licenses-desktop-json:
cargo about generate --all-features -m $(DESKTOP_RUST_DIR)/Cargo.toml --format json -o $(DESKTOP_PUBLIC_DIR)/licenses-rust.json
.PHONY: build-wireguard build-cli build-desktop local-install