-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (42 loc) · 1.38 KB
/
Makefile
File metadata and controls
47 lines (42 loc) · 1.38 KB
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
# Colors
GREEN := \033[32m
CYAN := \033[36m
YELLOW := \033[33m
GRAY := \033[90m
BOLD := \033[1m
RESET := \033[0m
.DEFAULT_GOAL := help
.PHONY: build test clean help
# ============================================================
# Build
# ============================================================
build:
@echo "Building CLICore..."
@swift build -c release
@echo "$(GREEN)Build complete!$(RESET)"
# ============================================================
# Test
# ============================================================
test:
@swift test
# ============================================================
# Clean
# ============================================================
clean:
@echo "Cleaning build artifacts..."
@swift package clean
@rm -rf .build
@echo "$(GREEN)Done!$(RESET)"
# ============================================================
# Help
# ============================================================
help:
@echo ""
@echo "$(BOLD)Usage:$(RESET) make $(CYAN)[target]$(RESET)"
@echo ""
@echo "$(YELLOW)Targets:$(RESET)"
@echo " $(CYAN)build$(RESET) $(GRAY)-$(RESET) $(GREEN)Build the library$(RESET)"
@echo " $(CYAN)test$(RESET) $(GRAY)-$(RESET) $(GREEN)Run tests$(RESET)"
@echo " $(CYAN)clean$(RESET) $(GRAY)-$(RESET) $(GREEN)Remove build artifacts$(RESET)"
@echo " $(CYAN)help$(RESET) $(GRAY)-$(RESET) $(GREEN)Show this help message (default)$(RESET)"
@echo ""