dim/dim_plugins/example_rust/Makefile
2024-06-17 12:16:09 +03:00

14 lines
410 B
Makefile

# Must match package name in Cargo.toml
PLUGIN_NAME=example_rust
# `target` or `debug`
TYPE=target
build: $(PLUGIN_DIR)/$(PLUGIN_NAME).dim
$(PLUGIN_DIR)/$(PLUGIN_NAME).dim: $(OBJECT_DIR)/$(PLUGIN_NAME)/$(TYPE)/lib$(PLUGIN_NAME).so
@mkdir -p $(dir $@)
cp $^ $@
$(OBJECT_DIR)/$(PLUGIN_NAME)/$(TYPE)/lib$(PLUGIN_NAME).so:
@mkdir -p $(dir $@)
cargo build --release --target-dir $(OBJECT_DIR)/$(PLUGIN_NAME)