[FFmpeg-devel] build for Android on WIndows

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Jun 26 07:42:35 CEST 2014

On 24.06.2014, at 16:03, Alex Cohn <alexcohn at netvision.net.il> wrote:

> As I mentioned before, build in Windows (using cygwin or Mingw shell
> has some problems, due to the limited command line length.
> One manifestation is the failure of make clean. Here is a fix:

How long is the command-line, and why is it so long?
Windows has several different limits depending on how you call functions.

> diff --git a/common.mak b/common.mak
> index a493792..161a20c 100644
> --- a/common.mak
> +++ b/common.mak
> @@ -144,7 +144,10 @@ LIBSUFFIXES       = *.a *.lib *.so *.so.* *.dylib
> *.dll *.def *.dll.a
> define RULES
> clean::
> -       $(RM) $(OBJS) $(OBJS:.o=.d)
> +       $(RM) $(wordlist 1,400,$(OBJS))
> +       $(RM) $(wordlist 401,999,$(OBJS))
> +       $(RM) $(wordlist 1,400,$(OBJS:.o=.d))
> +       $(RM) $(wordlist 401,999,$(OBJS:.o=.d))

That just doesn't make sense.
If we have to limit the first half to 400, the second half should be 400 elements as well.
Also it would silently fail as soon as we get over 999.
Also isn't xargs how this is usually handled?

> I am not very happy about this patch. Using $(wordlist) is an ugly
> hack, but unfortunately `make.exe` v.3.81 that ships with Android NDK
> r9d still does not support $(file) function.

Why use the make from the NDK? I see no reason to anything from the NDK except compiler/binutils/headers/libs.

More information about the ffmpeg-devel mailing list