forked from HyDE-Project/hyde-ipc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (27 loc) · 784 Bytes
/
Makefile
File metadata and controls
33 lines (27 loc) · 784 Bytes
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
BIN_NAME = hyde-ipc
REL_TGT = target/release/$(BIN_NAME)
DBG_TGT = target/debug/$(BIN_NAME)
BIN_DIR = ./bin
INSTALL_DIR = /usr/bin
.PHONY: release debug clean install
.DEFAULT_GOAL := install
release: clean
@cargo build --frozen --release
@mkdir -p $(BIN_DIR)
@cp $(REL_TGT) $(BIN_DIR)/$(BIN_NAME)
@echo "Built release -> $(BIN_DIR)/$(BIN_NAME)"
debug:
@cargo build
@mkdir -p $(BIN_DIR)
@cp $(DBG_TGT) $(BIN_DIR)/debug-$(BIN_NAME)
@echo "Built debug -> $(BIN_DIR)/debug-$(BIN_NAME)"
clean:
@cargo clean
@rm -rf $(BIN_DIR)
@echo "Cleaned build artifacts and $(BIN_DIR)"
install: release
@echo "Installing $(BIN_DIR)/$(BIN_NAME) to $(INSTALL_DIR)..."
@sudo cp $(BIN_DIR)/$(BIN_NAME) $(INSTALL_DIR)/$(BIN_NAME)
@echo "Installed."
@hyde-ipc global -s
@$(MAKE) clean