From 15bd54042aaf45802777083af9f191a46674c13e Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Thu, 20 Feb 2025 23:45:12 +0100 Subject: [PATCH] Implemented the executable management tasks in the Makefile file. --- Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4d433b4 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +# VARIABLES + +BINARY_FOLDER = $(prefix)/bin +BUILD_FOLDER = .build/release +EXECUTABLE_FILE = colibri + +# INPUT ARGUMENTS + +prefix ?= /usr/local + +# EXECUTABLE MANAGEMENT + +build: ## Build the executable from source code + @swift build -c release --disable-sandbox + +install: build ## Install the built executable into the system + @install -d "$(BINARY_FOLDER)" + @install "$(BUILD_FOLDER)/$(EXECUTABLE_FILE)" "$(BINARY_FOLDER)" + +uninstall: ## Uninstall the built executable from the system + @rm -rf "$(BINARY_FOLDER)/$(EXECUTABLE_FILE)" +