diff --git a/mk/environ.mk b/mk/environ.mk index 7486442503..deeb8bb0eb 100644 --- a/mk/environ.mk +++ b/mk/environ.mk @@ -4,6 +4,9 @@ # SYSTYPE := $(shell uname) +GIT_VERSION := $(shell git rev-parse HEAD | cut -c1-8) +EXTRAFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\"" + # force LANG to C so awk works sanely on MacOS export LANG=C diff --git a/mk/px4_targets.mk b/mk/px4_targets.mk index 29e117ede8..7748cc12c4 100644 --- a/mk/px4_targets.mk +++ b/mk/px4_targets.mk @@ -32,7 +32,7 @@ PX4_V2_CONFIG_FILE=$(MK_DIR)/PX4/config_px4fmu-v2_APM.mk SKETCHFLAGS=$(SKETCHLIBINCLUDES) -I$(PWD) -DARDUPILOT_BUILD -DCONFIG_HAL_BOARD=HAL_BOARD_PX4 -DSKETCHNAME="\\\"$(SKETCH)\\\"" -DSKETCH_MAIN=ArduPilot_main -PX4_MAKE = make -C $(SKETCHBOOK) -f $(PX4_ROOT)/Makefile EXTRADEFINES="$(SKETCHFLAGS) "$(EXTRAFLAGS) APM_MODULE_DIR=$(SKETCHBOOK) SKETCHBOOK=$(SKETCHBOOK) PX4_ROOT=$(PX4_ROOT) NUTTX_SRC=$(NUTTX_SRC) MAXOPTIMIZATION="-Os" +PX4_MAKE = make -C $(SKETCHBOOK) -f $(PX4_ROOT)/Makefile EXTRADEFINES="$(SKETCHFLAGS) "'$(EXTRAFLAGS)' APM_MODULE_DIR=$(SKETCHBOOK) SKETCHBOOK=$(SKETCHBOOK) PX4_ROOT=$(PX4_ROOT) NUTTX_SRC=$(NUTTX_SRC) MAXOPTIMIZATION="-Os" PX4_MAKE_ARCHIVES = make -C $(PX4_ROOT) NUTTX_SRC=$(NUTTX_SRC) archives MAXOPTIMIZATION="-Os" .PHONY: module_mk