update Makefile

This commit is contained in:
2026-07-13 16:53:48 +02:00
parent 1867a4c0a6
commit ed01251ca5
+5 -5
View File
@@ -2,7 +2,7 @@
#
# Usage: make <target>
BIN_DIR := $(HOME)/.local/bin
BIN_DIR := /usr/local/bin
BUILD_DIR := .build/release
BINARIES := phbar
@@ -14,7 +14,7 @@ all: build
build:
swift build -c release
# Build and install binaries to ~/.local/bin
# Build and install binaries to /usr/local/bin
install: build
@mkdir -p $(BIN_DIR)
@for bin in $(BINARIES); do \
@@ -37,7 +37,7 @@ run: install
which $$bin > /dev/null && echo "$$bin: $(shell which $$bin)" || echo "$$bin: not found"; \
done
# Uninstall binaries from ~/.local/bin
# Uninstall binaries from /usr/local/bin
uninstall:
@for bin in $(BINARIES); do \
rm -f $(BIN_DIR)/$$bin; \
@@ -51,9 +51,9 @@ reinstall: clean install
help:
@echo "Available targets:"
@echo " make build - Build in release mode"
@echo " make install - Build and install to ~/.local/bin"
@echo " make install - Build and install to /usr/local/bin"
@echo " make clean - Clean build artifacts"
@echo " make test - Run tests"
@echo " make run - Build, install, and verify"
@echo " make uninstall - Remove binaries from ~/.local/bin"
@echo " make uninstall - Remove binaries from /usr/local/bin"
@echo " make reinstall - Clean and reinstall"