-
Notifications
You must be signed in to change notification settings - Fork 3
/
makefile
37 lines (31 loc) · 814 Bytes
/
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
ifdef OS
TOOLCHAIN = +stable-i686-pc-windows-msvc
BINARYNAME = {{crate_name}}.dll
OUPUTNAME = {{crate_name}}.dll
CP_RELEASE = cp .\target\release\$(BINARYNAME) .\plugins\$(OUPUTNAME)
CP_DEBUG = cp .\target\debug\$(BINARYNAME) .\plugins\$(OUPUTNAME)
else
ifeq ($(shell uname), Linux)
TOOLCHAIN = +stable-i686-unknown-linux-gnu
BINARYNAME = lib{{crate_name}}.so
OUPUTNAME = {{crate_name}}.so
CP_RELEASE = cp target/release/$(BINARYNAME) plugins/$(OUPUTNAME)
CP_DEBUG = cp target/debug/$(BINARYNAME) plugins/$(OUPUTNAME)
endif
endif
release:
cargo $(TOOLCHAIN) build --release
$(CP_RELEASE)
debug:
cargo $(TOOLCHAIN) build
$(CP_DEBUG)
setup:
sampctl package ensure
sampctl package build
ensure:
sampctl package ensure
run:
sampctl package build
sampctl package run
clean:
cargo clean