-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (65 loc) · 1.88 KB
/
Makefile
File metadata and controls
79 lines (65 loc) · 1.88 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Makefile wrapper for CMake-based ColorPicker project
# This provides convenient targets for common operations
.PHONY: all build clean install uninstall run test help
# Default target
all: build
# Build the project
build:
@./build.sh
# Build in debug mode
debug:
@./build.sh --debug
# Clean build artifacts
clean:
@echo "Cleaning build directory..."
@rm -rf build/
# Build and install
install:
@./build.sh --install
# Uninstall
uninstall:
@if [ -d build ]; then \
cd build && sudo make uninstall; \
else \
echo "Build directory not found. Nothing to uninstall."; \
fi
# Run the application
run:
@./build.sh --run
# Build and run tests
test:
@./build.sh --test
# Create distribution packages
package:
@echo "Creating packages..."
@mkdir -p build
@cd build && cmake .. && make package
# Create Debian package
deb: package
@echo "Debian package created in build/"
# Create RPM package
rpm: package
@echo "RPM package created in build/"
# Format code (requires clang-format)
format:
@echo "Formatting code..."
@find src include -name '*.cpp' -o -name '*.h' | xargs clang-format -i
# Show help
help:
@echo "ColorSmith Makefile Targets:"
@echo ""
@echo " make - Build the project (default)"
@echo " make build - Build the project"
@echo " make debug - Build in debug mode"
@echo " make clean - Clean build artifacts"
@echo " make install - Build and install"
@echo " make uninstall - Uninstall the application"
@echo " make run - Build and run"
@echo " make test - Build and run tests"
@echo " make package - Create distribution packages"
@echo " make deb - Create Debian package"
@echo " make rpm - Create RPM package"
@echo " make format - Format code with clang-format"
@echo " make help - Show this help"
@echo ""
@echo "For more options, run: ./build.sh --help"