[FFmpeg-devel] [PATCH] Support building dependency files with non-GCC compilers
Diego Biurrun
diego
Fri Oct 3 21:52:32 CEST 2008
On Thu, Oct 02, 2008 at 06:00:21PM +0200, Diego 'Flameeyes' Petten? wrote:
> When not building with GCC, the dependency creation command has to be
> adapted to the compiler used.
>
> When using the Intel C Compiler no further editing through sed of the
> output is needed.
>
> When using the Sun Studio compiler, a different command-line syntax
> has to be used.
>
> --- a/configure
> +++ b/configure
> @@ -1133,6 +1130,17 @@ TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
> TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
> TMPSH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh"
>
> +if $cc -v 2>&1 | grep -q gcc; then
> + # gcc stupidly only outputs the basename of targets with -MM
> + DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/," -e "s,\\([[:space:]]\\)\\(version\\.h\\),\\1\$$(BUILD_ROOT_REL)/\\2,"'
> +elif $cc --version 2>&1 | grep -q Intel; then
> + DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $<'
> +elif $cc -V 2>&1 | grep -q Sun; then
> + DEPEND_CMD='$(CC) $(CFLAGS) -xM1 $<'
At least for suncc, the output has to be run through sed as well since
it outputs only the basename of object files.
Diego
More information about the ffmpeg-devel
mailing list