-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
43 lines (33 loc) · 930 Bytes
/
Makefile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
# SPDX-FileCopyrightText: 2024 The Forkbomb Company
#
# SPDX-License-Identifier: AGPL-3.0-or-later
.DEFAULT_GOAL := help
.PHONY: help
# detect the operating system
OSFLAG :=
ifneq ($(OS),Windows_NT)
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
OSFLAG += LINUX
endif
ifeq ($(UNAME_S),Darwin)
OSFLAG += OSX
endif
endif
help: ## 🛟 Show this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-7s\033[0m %s\n", $$1, $$2}'
clean: ## 🧹 Clean the project
@echo "🧹 Brooming"
@rm -fr dist && rm -f ncr
.PHONY: setup
setup: ## ⬇️ Install deps
@echo "⬇️ Install deps"
@pnpm i
build: setup clean ## 📦 Build the binary
@echo "📦 Building"
@pnpm sea
build-raspi32: setup clean ## 📦 Build the binary for Arm32
@echo "📦 Building"
@pnpm raspi32
up: ## 🚀 Run the project in development mode
@pnpm dev $@