mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Add SYS_INCLUDE_DIRS to top level Makefile. (#14388)
Add directories in $(SYS_INCLUDE_DIRS) to the search path via -isystem. This allows a workaround for https://github.com/raspberrypi/pico-sdk/issues/2451 by using system headers, which are more tolerant of macro redefinitions. Co-authored-by: Matthew Selby <matthewjselby@aol.com>
This commit is contained in:
parent
144314b820
commit
b845d6dfd8
1 changed files with 3 additions and 0 deletions
3
Makefile
3
Makefile
|
@ -305,6 +305,7 @@ EXTRA_WARNING_FLAGS := -Wold-style-definition
|
|||
CFLAGS += $(ARCH_FLAGS) \
|
||||
$(addprefix -D,$(OPTIONS)) \
|
||||
$(addprefix -I,$(INCLUDE_DIRS)) \
|
||||
$(addprefix -isystem,$(SYS_INCLUDE_DIRS)) \
|
||||
$(DEBUG_FLAGS) \
|
||||
-std=gnu17 \
|
||||
-Wall -Wextra -Werror -Wunsafe-loop-optimizations -Wdouble-promotion \
|
||||
|
@ -331,6 +332,7 @@ ASFLAGS = $(ARCH_FLAGS) \
|
|||
$(DEBUG_FLAGS) \
|
||||
-x assembler-with-cpp \
|
||||
$(addprefix -I,$(INCLUDE_DIRS)) \
|
||||
$(addprefix -isystem,$(SYS_INCLUDE_DIRS)) \
|
||||
-MMD -MP
|
||||
|
||||
ifeq ($(LD_FLAGS),)
|
||||
|
@ -359,6 +361,7 @@ endif
|
|||
CPPCHECK = cppcheck $(CSOURCES) --enable=all --platform=unix64 \
|
||||
--std=c99 --inline-suppr --quiet --force \
|
||||
$(addprefix -I,$(INCLUDE_DIRS)) \
|
||||
$(addprefix -isystem,$(SYS_INCLUDE_DIRS)) \
|
||||
-I/usr/include -I/usr/include/linux
|
||||
|
||||
TARGET_NAME := $(TARGET)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue