This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: adding specific C flags for a SINGLE source file
- From: Stepan Kasal <kasal at ucw dot cz>
- To: Bruce Allen <ballen at gravity dot phys dot uwm dot edu>
- Cc: automake at gnu dot org
- Date: Thu, 9 Dec 2004 09:37:55 +0100
- Subject: Re: adding specific C flags for a SINGLE source file
- References: <Pine.GSO.4.21.0412080307160.21179-100000@dirac.phys.uwm.edu>
Hello,
On Wed, Dec 08, 2004 at 03:15:55AM -0600, Bruce Allen wrote:
> There is a single routine (that lives by itself in dhrystone.C)
> which must ALWAYS be compiled to an object with -O3, regardless of the
> user specified compilation options, CFLAGS, CPPFLAGS, etc.
I think that the easiest way is to redefine the rule to compile that file.
To find the command to execute for compiling, inspect the Makefile.in
that automake has created for you.
I guess the following should work:
re.$(OBJEXT): this.h that.h
re.o: re.C
$(CXXCOMPILE) -O3 -c -o $@ $<
re.obj: re.C
$(CXXCOMPILE) -O3 -c -o $@ `$(CYGPATH_W) '$<'`
HTH,
Stepan Kasal