-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (39 loc) · 1.58 KB
/
Copy pathMakefile
File metadata and controls
47 lines (39 loc) · 1.58 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
# Makefile for mkarchiso colorful C wrapper
# SPDX-License-Identifier: GPL-3.0-or-later
CC = gcc
CFLAGS = -Wall -Wextra -O2 -std=c11
TARGET = mkarchiso_wrapper
SOURCE = mkarchiso.c
PREFIX = /usr/local
.PHONY: all clean install uninstall
all: $(TARGET)
$(TARGET): $(SOURCE)
@echo -e "\033[1;36m[BUILD]\033[0m Compiling colorful mkarchiso wrapper..."
$(CC) $(CFLAGS) -o $(TARGET) $(SOURCE)
@echo -e "\033[1;32m[SUCCESS]\033[0m ✓ Build complete! Binary: $(TARGET)"
clean:
@echo -e "\033[1;33m[CLEAN]\033[0m Removing build artifacts..."
rm -f $(TARGET)
@echo -e "\033[1;32m[SUCCESS]\033[0m ✓ Clean complete!"
install: $(TARGET)
@echo -e "\033[1;36m[INSTALL]\033[0m Installing $(TARGET) to $(PREFIX)/bin/..."
install -Dm755 $(TARGET) $(PREFIX)/bin/$(TARGET)
@echo -e "\033[1;32m[SUCCESS]\033[0m ✓ Installed to $(PREFIX)/bin/$(TARGET)"
uninstall:
@echo -e "\033[1;33m[UNINSTALL]\033[0m Removing $(TARGET) from $(PREFIX)/bin/..."
rm -f $(PREFIX)/bin/$(TARGET)
@echo -e "\033[1;32m[SUCCESS]\033[0m ✓ Uninstall complete!"
help:
@echo -e "\033[1;35mAcreetionOS mkarchiso Wrapper - Build System\033[0m"
@echo ""
@echo -e "\033[1;36mTargets:\033[0m"
@echo " all - Build the mkarchiso wrapper (default)"
@echo " clean - Remove build artifacts"
@echo " install - Install to $(PREFIX)/bin/"
@echo " uninstall - Remove from $(PREFIX)/bin/"
@echo " help - Show this help message"
@echo ""
@echo -e "\033[1;36mUsage:\033[0m"
@echo " make # Build the wrapper"
@echo " make install # Install (may require sudo)"
@echo " make clean # Clean up"