Convert wslpath to makefile
This commit is contained in:
16
src/Tools/Common.mk
Normal file
16
src/Tools/Common.mk
Normal file
@@ -0,0 +1,16 @@
|
||||
BUILD_PROFILE ?= debug
|
||||
CARGO_CMD ?= build
|
||||
WINDOWS_TARGET ?= x86_64-pc-windows-gnu
|
||||
UNIX_TARGET ?= x86_64-unknown-linux-gnu
|
||||
|
||||
WINDOWS_ARTIFACT = ./target/$(WINDOWS_TARGET)/$(BUILD_PROFILE)/$(ARTIFACT).exe
|
||||
UNIX_ARTIFACT = ./target/$(UNIX_TARGET)/$(BUILD_PROFILE)/$(ARTIFACT)
|
||||
|
||||
define cp_artifact
|
||||
$(if $(findstring build,$(CARGO_CMD)),
|
||||
@mkdir -p $(dir $(1))
|
||||
@cp $(1) $(2)
|
||||
)
|
||||
endef
|
||||
|
||||
# Windows build requires "rustup target add x86_64-pc-windows-gnu" and "sudo apt-get install mingw-w64"
|
||||
Reference in New Issue
Block a user