only add the local-cflags override if we have something to override

tmp/arduino-cli-pre-rebase
Jesse Vincent 4 years ago
parent 75adceb7a1
commit 1dc5a5839c
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -124,6 +124,12 @@ clean:
rm -rf -- "${OUTPUT_PATH}/*" rm -rf -- "${OUTPUT_PATH}/*"
ifneq ($(LOCAL_CFLAGS),)
local_cflags_property = --build-properties "compiler.cpp.extra_flags=${LOCAL_CFLAGS}"
else
local_cflags_property =
endif
compile: compile:
@install -d "${OUTPUT_PATH}" @install -d "${OUTPUT_PATH}"
@echo "Building ${SKETCH_FILE_PATH}" @echo "Building ${SKETCH_FILE_PATH}"
@ -132,8 +138,7 @@ compile:
--build-path "${BUILD_PATH}" \ --build-path "${BUILD_PATH}" \
--output-dir "${OUTPUT_PATH}" \ --output-dir "${OUTPUT_PATH}" \
--build-cache-path "${CORE_CACHE_PATH}" \ --build-cache-path "${CORE_CACHE_PATH}" \
--build-properties "compiler.cpp.extra_flags=${LOCAL_CFLAGS}" \ --warnings all ${ccache_wrapper_property} ${local_cflags_property} \
--warnings all ${ccache_wrapper_property} \
"${SKETCH_FILE_PATH}" "${SKETCH_FILE_PATH}"
ifeq ($(LIBONLY),) ifeq ($(LIBONLY),)
@cp "${BUILD_PATH}/${SKETCH_FILE_NAME}.hex" "${HEX_FILE_PATH}" @cp "${BUILD_PATH}/${SKETCH_FILE_NAME}.hex" "${HEX_FILE_PATH}"

Loading…
Cancel
Save