diff src/ffmpeg.mk @ 4026:28fa86d2cf21

ffmpeg: mods for native linux build of ffmpeg * src/ffmpeg.mk: add native build rule * src/libvpx-1-fixes.patch: update patch from mxe.cc * src/libvpx.mk: update to version 1.4.0, add native build rule * src/sdl-1-xdata.patch" new patch file * src/sdl.mk: add native build rule * src/xvidcore.mk: add native build rule
author John D
date Sat, 12 Sep 2015 20:35:11 -0400
parents 8114d05101dc
children c4a341e3e014
line wrap: on
line diff
--- a/src/ffmpeg.mk	Sat Sep 12 01:56:42 2015 -0400
+++ b/src/ffmpeg.mk	Sat Sep 12 20:35:11 2015 -0400
@@ -13,28 +13,19 @@
 
 $(PKG)_CONFIG_OPTS :=
 
-ifeq ($(MXE_SYSTEM),mingw)
-    $(PKG)_CONFIG_OPTS += \
-        --target-os=mingw32
-endif
-
-ifneq ($(MXE_NATIVE_BUILD),yes)
-    $(PKG)_CONFIG_OPTS += \
-        --cross-prefix='$(MXE_TOOL_PREFIX)' \
-        --enable-cross-compile 
-endif
-
-
 define $(PKG)_UPDATE
     $(WGET) -q -O- 'http://www.ffmpeg.org/download.html' | \
     $(SED) -n 's,.*ffmpeg-\([0-9][^>]*\)\.tar.*,\1,p' | \
     head -1
 endef
 
+ifeq ($(MXE_NATIVE_BUILD),no)
 define $(PKG)_BUILD
     '$(SED)' -i "s^[-]lvpx^`'$(MXE_PKG_CONFIG)' --libs-only-l vpx`^g;" $(1)/configure
     cd '$(1)' && ./configure \
-        $($(PKG)_CONFIG_OPTS) \
+        --cross-prefix='$(MXE_TOOL_PREFIX)' \
+        --enable-cross-compile  \
+        --target-os=mingw32 \
         --arch=$(firstword $(subst -, ,$(TARGET))) \
         --prefix='$(HOST_PREFIX)' \
         $(ENABLE_SHARED_OR_STATIC) \
@@ -61,3 +52,32 @@
     $(MAKE) -C '$(1)' -j '$(JOBS)'
     $(MAKE) -C '$(1)' -j 1 install
 endef
+else
+define $(PKG)_BUILD
+    '$(SED)' -i "s^[-]lvpx^`'$(MXE_PKG_CONFIG)' --libs-only-l vpx`^g;" $(1)/configure
+    cd '$(1)' && CPPFLAGS=-I$(HOST_INCDIR) LDFLAGS=-L$(HOST_LIBDIR) ./configure \
+        --prefix='$(HOST_PREFIX)' \
+        $(ENABLE_SHARED_OR_STATIC) \
+        --disable-debug \
+        --disable-doc \
+        --enable-memalign-hack \
+        --enable-gpl \
+        --enable-version3 \
+        --disable-nonfree \
+        --enable-postproc \
+        --enable-avisynth \
+        --enable-libspeex \
+        --enable-libtheora \
+        --enable-libvorbis \
+        --enable-libmp3lame \
+        --enable-libxvid \
+        --disable-libfaac \
+        --enable-libopencore-amrnb \
+        --enable-libopencore-amrwb \
+        --enable-libx264 \
+        --enable-libvpx
+    $(MAKE) -C '$(1)' -j '$(JOBS)'
+    $(MAKE) -C '$(1)' -j 1 install
+endef
+
+endif