Skip to content

Commit

Permalink
Merge commit '2575b1917b2703fae41a4b4901ad85c888374dfd'
Browse files Browse the repository at this point in the history
* commit '2575b1917b2703fae41a4b4901ad85c888374dfd':
  build: Add separate flags for checkheaders targets

Merged-by: Clément Bœsch <u@pkh.me>
  • Loading branch information
ubitux committed Apr 8, 2017
2 parents 3d0475e + 2575b19 commit d14a1bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions common.mak
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)
SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
HOBJS = $(filter-out $(SKIPHEADERS:.h=.h.o),$(ALLHEADERS:.h=.h.o))
$(HOBJS): CCFLAGS += $(CFLAGS_HEADERS)
checkheaders: $(HOBJS)
.SECONDARY: $(HOBJS:.o=.c)

Expand Down
9 changes: 9 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -6143,6 +6143,14 @@ check_disable_warning -Wno-format-zero-length
check_disable_warning -Wno-pointer-sign
check_disable_warning -Wno-unused-const-variable

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
check_ldflags -Wl,--warn-common
check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
Expand Down Expand Up @@ -6742,6 +6750,7 @@ TARGET_EXEC=$target_exec $target_exec_args
TARGET_PATH=$target_path
TARGET_SAMPLES=${target_samples:-\$(SAMPLES)}
CFLAGS-ffplay=${sdl2_cflags}
CFLAGS_HEADERS=$cflags_headers
ZLIB=$($ldflags_filter -lz)
LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
EXTRALIBS=$extralibs
Expand Down

0 comments on commit d14a1bd

Please sign in to comment.