1From be007b01e7d91f5f83518c0388c16db8dab31d2e Mon Sep 17 00:00:00 2001
2From: Andrei Gherzan <andrei.gherzan@windriver.com>
3Date: Sun, 25 Jan 2015 11:13:51 +0200
4Subject: [PATCH] Add FFMPEG_EXTRA_CFLAGS and FFMPEG_EXTRA_LDFLAGS
5
6In this way we can inject flags to LD and CC using
7--extra-cflags and --extra-ldflags.
8
9Upstream-Status: Inappropriate [embedded specific]
10Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
11
12---
13 Makefile.ffmpeg | 5 ++++-
14 1 file changed, 4 insertions(+), 1 deletion(-)
15
16Index: git/Makefile.ffmpeg
17===================================================================
18--- git.orig/Makefile.ffmpeg
19+++ git/Makefile.ffmpeg
20@@ -1,5 +1,7 @@
21 CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG  -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT
22
23+FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT)
24+
25 WORK=$(PWD)
26
27 .PHONY : all
28@@ -20,7 +22,8 @@ configure:
29 	CFLAGS="$(CFLAGS) ${INCLUDES}" \
30 	LDFLAGS="" \
31   ./configure \
32-			--extra-cflags="-mfpu=vfp -mfloat-abi=hard" \
33+			--extra-cflags="$(FFMPEG_EXTRA_CFLAGS)" \
34+			--extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \
35 			--enable-shared \
36 			--disable-static \
37 			--arch=arm \
38