-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.mk
60 lines (53 loc) · 2.17 KB
/
header.mk
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# **************************************************************************** #
# #
# ::: :::::::: #
# header.mk :+: :+: :+: #
# +:+ +:+ +:+ #
# By: kiroussa <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/03/25 15:29:36 by kiroussa #+# #+# #
# Updated: 2024/09/21 16:53:43 by kiroussa ### ########.fr #
# #
# **************************************************************************** #
# Colors
TPUT := tput -Txterm-256color
BLUE := $(shell $(TPUT) setaf 4)
GRAY := $(shell $(TPUT) setaf 8)
BOLD := $(shell $(TPUT) bold)
RED := $(shell $(TPUT) setaf 1)
RESET := $(shell $(TPUT) sgr0)
GREEN := $(shell $(TPUT) setaf 2)
MAGENTA := $(shell $(TPUT) setaf 135)
BOLD_WHITE := $(RESET)$(BOLD)
AUTHORS = $(shell paste -s -d ':' config/author | rev | sed -e 's/\:/ \& /' -e 's/:/ ,/g' | rev)
# multiline BANNER
COL1 = $(BOLD)$(MAGENTA)
COL2 = $(BOLD)$(RED)
COL3 = $(BOLD)$(GRAY)
COL4 = $(BOLD)$(BLUE)
define BANNER
$(COL1) __ $(COL4)__
$(COL1) / /__$(COL2)_____$(COL3)_____$(COL4)/ /_
$(COL1) / //_$(COL2)/ ___/$(COL3) ___$(COL4)/ __ \
$(COL1) / ,< $(COL2)/ /__$(COL3)(__ ) $(COL4)/ / /
$(COL1)/_/|_|$(COL2)\___/$(COL3)____/$(COL4)_/ /_/ $(RESET)v$(BOLD_WHITE)$(PROJECT_VERSION)$(RESET)
by $(RESET)$(AUTHORS)
endef
SHOW_BANNER ?= 0
DISABLE_BANNER ?= 0
ifeq ($(SHOW_BANNER), 1)
ifeq ($(DISABLE_BANNER), 0)
$(info $(BANNER))
$(info ⚙️ Compilation mode: $(COMP_MODE))
ifeq ($(KCSH_TESTS), 1)
$(info 🧪 Test runner enabled)
endif
ifeq ($(HYPERTHREADING), 1)
$(info 🚀 Hyperthreading enabled)
endif
ifeq ($(REBUILD), 1)
$(info 🔄 Rebuilding $(NAME) with $(BOLD_WHITE)$(COMP_MODE)$(RESET) mode)
endif
$(info )
endif
endif