mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
a38d350502
The rule to generate mavgen headers need to depend on the rule to check the submodules, otherwise they can execute in parallel and the (mavlink) submodule be updated while the headers are generated.
13 lines
988 B
Makefile
13 lines
988 B
Makefile
|
|
# mavlink header generation
|
|
MAVLINK_DIR := $(SKETCHBOOK)/modules/mavlink/
|
|
MESSAGE_DEFINITIONS := $(SKETCHBOOK)/modules/mavlink/message_definitions/v1.0
|
|
MAVLINK_HEADERS := $(BUILDROOT)/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink.h $(wildcard $(BUILDROOT)/libraries/GCS_MAVLink/include/mavlink/v1.0/,*.h) $(wildcard $(BUILDROOT)/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega,*.h)
|
|
MAVLINK_OUTPUT_DIR := $(BUILDROOT)/libraries/GCS_MAVLink/include/mavlink/v1.0
|
|
|
|
$(MAVLINK_HEADERS): CHECK_MODULES $(MESSAGE_DEFINITIONS)/ardupilotmega.xml $(MESSAGE_DEFINITIONS)/common.xml
|
|
echo "Generating MAVLink headers..."
|
|
#goto mavlink module directory and run the most recent generator script
|
|
echo "Generating C code using mavgen.py located at" $(SKETCHBOOK)/modules/mavlink/
|
|
-PYTHONPATH=$(MAVLINK_DIR) python $(MAVLINK_DIR)/pymavlink/tools/mavgen.py --lang=C --wire-protocol=1.0 --output=$(MAVLINK_OUTPUT_DIR) $(MAVLINK_DIR)/message_definitions/v1.0/ardupilotmega.xml
|