-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Expand file tree
/
Copy pathMakefile
More file actions
101 lines (81 loc) · 2.78 KB
/
Makefile
File metadata and controls
101 lines (81 loc) · 2.78 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# QGroundControl Development Makefile
# Convenience wrapper for common development commands
.PHONY: help configure build test clean lint format analyze coverage docs docker submodules deps run check release
# Default target
help:
@echo "QGroundControl Development Commands"
@echo ""
@echo "Setup:"
@echo " make deps - Install system dependencies (Debian/Ubuntu)"
@echo " make submodules - Initialize git submodules"
@echo ""
@echo "Build:"
@echo " make configure - Configure CMake build (Debug)"
@echo " make build - Build the project"
@echo " make release - Configure and build Release"
@echo " make clean - Remove build directory"
@echo " make rebuild - Clean, configure, and build"
@echo ""
@echo "Quality:"
@echo " make test - Run unit tests"
@echo " make lint - Run pre-commit checks"
@echo " make format - Format code (check mode)"
@echo " make format-fix - Format code (apply fixes)"
@echo " make analyze - Run static analysis"
@echo " make coverage - Generate coverage report"
@echo " make check - Run lint + test"
@echo ""
@echo "Other:"
@echo " make run - Launch QGroundControl"
@echo " make docs - Build documentation"
@echo " make docker - Build using Docker (Ubuntu)"
@echo ""
@echo "Environment variables:"
@echo " QT_DIR - Qt installation directory (default: ~/Qt/$(QT_VERSION)/gcc_64)"
@echo " BUILD_TYPE - CMake build type (default: Debug)"
@echo ""
@echo "Configuration from .github/build-config.json:"
@echo " Qt version: $(QT_VERSION)"
# Configuration - reads from centralized config
QT_VERSION := $(shell python3 ./tools/setup/read_config.py --get qt_version 2>/dev/null || echo "6.10.1")
QT_DIR ?= $(HOME)/Qt/$(QT_VERSION)/gcc_64
BUILD_TYPE ?= Debug
BUILD_DIR := build
# Setup targets
submodules:
git submodule update --init --recursive
deps:
@echo "Installing dependencies (requires sudo)..."
python3 ./tools/setup/install_dependencies.py --platform debian
# Build targets
configure: submodules
python3 ./tools/configure.py -B $(BUILD_DIR) -t $(BUILD_TYPE) --testing
build:
cmake --build $(BUILD_DIR) --config $(BUILD_TYPE) --parallel
release:
python3 ./tools/configure.py -B $(BUILD_DIR) --release
cmake --build $(BUILD_DIR) --config Release --parallel
clean:
rm -rf $(BUILD_DIR)
rebuild: clean configure build
# Quality targets
test:
cd $(BUILD_DIR) && ctest --output-on-failure
lint:
pre-commit run --all-files
format:
python3 ./tools/analyze.py --tool clang-format
format-fix:
python3 ./tools/analyze.py --tool clang-format --fix
analyze:
python3 ./tools/analyze.py
coverage:
python3 ./tools/coverage.py
check: lint test
# Other targets
run:
./$(BUILD_DIR)/$(BUILD_TYPE)/QGroundControl
docs:
npm run docs:build
docker:
./deploy/docker/run-docker-ubuntu.sh