.PHONY: help build release install uninstall clean test
help:
@echo "๐ฆ Corrode - Available Commands"
@echo ""
@echo " make build - Build debug binary"
@echo " make release - Build optimized release binary"
@echo " make install - Install corrode to /usr/local/bin"
@echo " make uninstall - Remove corrode from /usr/local/bin"
@echo " make clean - Clean build artifacts"
@echo " make test - Run tests"
@echo ""
build:
@echo "๐จ Building debug binary..."
cargo build
release:
@echo "๐ Building release binary..."
cargo build --release
@echo "โ Binary at: ./target/release/corrode"
install: release
@echo "๐ฆ Installing corrode..."
@if [ ! -w /usr/local/bin ]; then \
echo "๐ Requesting sudo for installation..."; \
sudo cp target/release/corrode /usr/local/bin/corrode; \
sudo chmod +x /usr/local/bin/corrode; \
else \
cp target/release/corrode /usr/local/bin/corrode; \
chmod +x /usr/local/bin/corrode; \
fi
@echo "โ Corrode installed to /usr/local/bin/corrode"
@echo "โ You can now run: corrode"
uninstall:
@echo "๐๏ธ Uninstalling corrode..."
@if [ -f /usr/local/bin/corrode ]; then \
if [ ! -w /usr/local/bin ]; then \
sudo rm /usr/local/bin/corrode; \
else \
rm /usr/local/bin/corrode; \
fi; \
echo "โ Corrode uninstalled"; \
else \
echo "โ ๏ธ Corrode not found in /usr/local/bin"; \
fi
clean:
@echo "๐งน Cleaning build artifacts..."
cargo clean
@echo "โ Clean complete"
test:
@echo "๐งช Running tests..."
cargo test