[FFmpeg-devel] [PATCH] examples/Makefile: give priority to pkg-config flags
Stefano Sabatini
stefasab at gmail.com
Thu Aug 30 20:32:32 CEST 2012
On date Friday 2012-08-24 16:52:28 +0200, Stefano Sabatini encoded:
> In case CFLAGS/LDLIBS are already defined and conflicting with the
> pkg-config flags, give priority to the latter since they are used to
> detect compilation flags.
>
> This should fix for example the case where there are many different
> instances of a library, CFLAGS=-I/foo/include and pkg-config cflags say
> -I/bar/include.
> ---
> doc/examples/Makefile | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/doc/examples/Makefile b/doc/examples/Makefile
> index 37bfb44..2c475cd 100644
> --- a/doc/examples/Makefile
> +++ b/doc/examples/Makefile
> @@ -8,8 +8,8 @@ FFMPEG_LIBS= libavdevice \
> libavutil \
>
> CFLAGS += -Wall -O2 -g
> -CFLAGS += $(shell pkg-config --cflags $(FFMPEG_LIBS))
> -LDLIBS += $(shell pkg-config --libs $(FFMPEG_LIBS))
> +CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS)
> +LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS)
>
> EXAMPLES= decoding_encoding \
> filtering_video \
Ping.
I'll apply tomorrow if I read no comments.
--
FFmpeg = Fancy & Fundamental Meaningless Pure Ecumenical Gospel
More information about the ffmpeg-devel
mailing list