-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (53 loc) · 1.39 KB
/
Makefile
File metadata and controls
62 lines (53 loc) · 1.39 KB
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
# Variables
TARGET_X86_64 = x86_64-pc-windows-gnu
TARGET_I686 = i686-pc-windows-gnu
PROJECT_NAME = solana-vntr-sniper # Change this to your project name
CARGO = cargo
# Target to install prerequisites
.PHONY: install
install:
sudo apt update
sudo apt install -y mingw-w64
rustup target add $(TARGET_X86_64)
rustup target add $(TARGET_I686)
# pm2 to install prerequisites
.PHONY: pm2
pm2:
pm2 start target/release/solana-vntr-sniper
# Target to build for x86_64 Windows
.PHONY: build-x86_64
build-x86_64:
$(CARGO) build --target=$(TARGET_X86_64) --release
# Target to build for i686 Windows
.PHONY: build-i686
build-i686:
$(CARGO) build --target=$(TARGET_I686) --release
# Target to clean the project
.PHONY: clean
clean:
$(CARGO) clean
# Start the server
.PHONY: start
start:
pm2 start 0
# Stop the server
.PHONY: stop
stop:
pm2 stop 0
# Stop the server
.PHONY: build
build:
$(CARGO) clean
$(CARGO) build -r
# Target to display help
.PHONY: help
help:
@echo "Makefile commands:"
@echo " install - Install necessary packages and configure Rust targets"
@echo " build-x86_64 - Build for 64-bit Windows"
@echo " build-i686 - Build for 32-bit Windows"
@echo " clean - Clean the target directory"
@echo " help - Display this help message"
@echo " start - Start the server"
@echo " stop - Stop the server"
@echo " build - Build the server"