Commit 2575b191 authored by Diego Biurrun's avatar Diego Biurrun

build: Add separate flags for checkheaders targets

This allows filtering out some warning noise.
parent 984e50e7
...@@ -33,6 +33,7 @@ ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR) ...@@ -33,6 +33,7 @@ ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)
SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-) SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%) SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
HOBJS = $(filter-out $(SKIPHEADERS:.h=.h.o),$(ALLHEADERS:.h=.h.o)) HOBJS = $(filter-out $(SKIPHEADERS:.h=.h.o),$(ALLHEADERS:.h=.h.o))
$(HOBJS): CCFLAGS += $(CFLAGS_HEADERS)
checkheaders: $(HOBJS) checkheaders: $(HOBJS)
.SECONDARY: $(HOBJS:.o=.c) .SECONDARY: $(HOBJS:.o=.c)
......
...@@ -4851,6 +4851,14 @@ check_disable_warning -Wno-switch ...@@ -4851,6 +4851,14 @@ check_disable_warning -Wno-switch
check_disable_warning -Wno-format-zero-length check_disable_warning -Wno-format-zero-length
check_disable_warning -Wno-pointer-sign check_disable_warning -Wno-pointer-sign
check_disable_warning_headers(){
warning_flag=-W${1#-Wno-}
test_cflags $warning_flag && append cflags_headers $1
}
check_disable_warning_headers -Wno-deprecated-declarations
check_disable_warning_headers -Wno-unused-variable
# add some linker flags # add some linker flags
check_ldflags -Wl,--warn-common check_ldflags -Wl,--warn-common
check_ldflags -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample check_ldflags -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
...@@ -5315,6 +5323,7 @@ TARGET_EXEC=$target_exec $target_exec_args ...@@ -5315,6 +5323,7 @@ TARGET_EXEC=$target_exec $target_exec_args
TARGET_PATH=$target_path TARGET_PATH=$target_path
TARGET_SAMPLES=${target_samples:-\$(SAMPLES)} TARGET_SAMPLES=${target_samples:-\$(SAMPLES)}
CFLAGS-avplay=$sdl_cflags CFLAGS-avplay=$sdl_cflags
CFLAGS_HEADERS=$cflags_headers
ZLIB=$($ldflags_filter -lz) ZLIB=$($ldflags_filter -lz)
LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
EXTRALIBS=$extralibs EXTRALIBS=$extralibs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment