[FFmpeg-devel] [PATCH] Support building dependency files with non-GCC compilers
Diego Biurrun
diego
Sat Oct 4 11:02:18 CEST 2008
On Fri, Oct 03, 2008 at 09:52:32PM +0200, Diego Biurrun wrote:
> 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.
To be a bit more explicit: Make sure it does the right thing for object
files in subdirectories.
Diego
More information about the ffmpeg-devel
mailing list