[FFmpeg-cvslog] r19404 - in trunk: common.mak configure

Måns Rullgård mans
Sun Jul 12 17:22:23 CEST 2009


Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:

> On date Sunday 2009-07-12 15:29:32 +0200, mru wrote:
>> Author: mru
>> Date: Sun Jul 12 15:29:32 2009
>> New Revision: 19404
>> 
>> Log:
>> Separate C preprocessor flags into CPPFLAGS variable
>> 
>> Modified:
>>    trunk/common.mak
>>    trunk/configure
>> 
>> Modified: trunk/common.mak
>> ==============================================================================
>> --- trunk/common.mak	Sun Jul 12 15:22:01 2009	(r19403)
>> +++ trunk/common.mak	Sun Jul 12 15:29:32 2009	(r19404)
>> @@ -18,16 +18,17 @@ endif
>>  
>>  ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
>>  
>> -CFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS)
>> +CPPFLAGS += -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH)
>> +CFLAGS := $(OPTFLAGS)
>>  
>>  %.o: %.c
>> -	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
>> +	$(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
>>  
>>  %.o: %.S
>> -	$(AS) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
>> +	$(AS) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
>>  
>>  %.ho: %.h
>> -	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<
>> +	$(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<
>>  
>>  %.d: %.c
>>  	$(DEPEND_CMD) > $@
>
> This is broken if the user has an installation of FFmpeg in the paths
> in CPPFLAGS, this way the pre-installed headers are accessed *before*
> the FFmpeg source headers, resulting in a compilation with the wrong
> headers.

Don't do that then.

> In particular it fails on my system, when I have:

[...]

> My proposal in attachment (BTW the changes to configure caused at
> least two more compilation errors here).

Care to elaborate?

> Index: common.mak
> ===================================================================
> --- common.mak	(revision 19415)
> +++ common.mak	(working copy)
> @@ -18,7 +18,7 @@
>  
>  ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
>  
> -CPPFLAGS += -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH)
> +CPPFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS)
>  
>  %.o: %.c
>  	$(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c $(CC_O) $<

OK.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-cvslog mailing list