Set executable, package, and IDE tasks in the Makefile #10

Merged
javier merged 3 commits from setup/makefile into main 2025-02-20 22:51:47 +00:00
Showing only changes of commit 15bd54042a - Show all commits

22
Makefile Normal file
View File

@ -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)"