-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 1.04 KB
/
Copy pathMakefile
File metadata and controls
38 lines (28 loc) · 1.04 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
# SPDX-License-Identifier: MIT
CXX ?= c++
PYTHON ?= python3
BUILD_DIR := build
CPPFLAGS := -Iinclude
CXXFLAGS := -std=c++17 -O2 -g -Wall -Wextra -Wpedantic -Werror
.PHONY: all check clean test-portable test-python policy macos-build
all: macos-build
$(BUILD_DIR)/tests/test_abi: tests/test_abi.cpp include/rtxdarwin/abi.h include/rtxdarwin/state_machine.h
@mkdir -p $(BUILD_DIR)/tests
$(CXX) $(CPPFLAGS) $(CXXFLAGS) tests/test_abi.cpp -o $@
test-portable: $(BUILD_DIR)/tests/test_abi test-python policy
$(BUILD_DIR)/tests/test_abi
test-python:
$(PYTHON) -m unittest -v tests/test_tools.py
policy:
$(PYTHON) tools/check_driver_policy.py
$(PYTHON) tools/check_spdx.py
$(PYTHON) -m json.tool DEPENDENCIES.lock.json >/dev/null
$(PYTHON) -m json.tool config/hardware.example.json >/dev/null
$(PYTHON) -m json.tool config/hardware.gigabyte-2487-40e2.json >/dev/null
macos-build:
@if [ "$$(uname -s)" != Darwin ]; then echo "macos-build requires macOS" >&2; exit 1; fi
./scripts/build_macos.sh
check:
./scripts/check.sh
clean:
rm -rf "$(CURDIR)/build"