-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
29 lines (22 loc) · 673 Bytes
/
Copy pathmakefile
File metadata and controls
29 lines (22 loc) · 673 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
# Define the name of the executable
EXECUTABLE = pass-words
# Define the installation directory
INSTALL_DIR = $(HOME)/.local/bin
# Default target: build the executable
all: $(EXECUTABLE)
# Build the executable
$(EXECUTABLE):
cargo build --release
# Install the executable locally for the current user
install: $(EXECUTABLE)
@mkdir -p $(INSTALL_DIR)
@cp target/release/$(EXECUTABLE) $(INSTALL_DIR)
@echo "Installed $(EXECUTABLE) to $(INSTALL_DIR)"
# Uninstall the application
uninstall:
@rm -f $(INSTALL_DIR)/$(EXECUTABLE)
@echo "Uninstalled $(EXECUTABLE) from $(INSTALL_DIR)"
# Clean the build artifacts
clean:
cargo clean
.PHONY: all install uninstall clean