[Openal-devel] How to set CFLAGS for specific files?

Prakash Punnoor prakash at punnoor.de
Fri Oct 27 01:40:49 PDT 2006


Am Freitag 27 Oktober 2006 10:06 schrieb Prakash Punnoor:
> Am Freitag 27 Oktober 2006 09:22 schrieb Sven Panne:
> > Am Freitag, 27. Oktober 2006 07:31 schrieb Prakash Punnoor:
> > > I changed the SIMD enabling routines in CMake to make it possible to
> > > generate portable code with gcc. For that it was needed that the SIMD
> > > CFLAGS only get applied to the c source files which contain SIMD and
> > > not to the rest of the source files. Because otherwise (esp with SSE2)
> > > gcc could emit SSE code for float maths...  Now I want to do the same
> > > for the autotools project, but I don't know an easy way. Any advise?
> >
> > The relevant documentation is here:
> > http://sources.redhat.com/automake/automake.html#Program-and-Library-Vari
> >ab les
> >
> > In a nutshell: If you want special CFLAGS for foo.c, add
> >
> >    foo_CFLAGS = -my -special -CFLAGS
>
> This doesn't work for me (as a test):
>
> libopenal_la_SOURCES += arch/i386/mixaudio16_sse2_prk.c
> arch/i386/mixaudio16_sse2_prk.h
> mixaudio16_sse2_prk_CFLAGS = $(AM_CFLAGS) -msse3
>
> The flags stay the same. Above link also only lists the command for adding
> per target flags, not per source.

Oh great, I think I found th solution/workaround: See above link at 27.8. If 
seems I have to build a convenience lib for every damn file with seperate 
flags. Geeeez, I loooove automake...not....

Cheers,
-- 
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://opensource.creative.com/pipermail/openal-devel/attachments/20061027/bb27a6db/attachment.bin


More information about the Openal-devel mailing list