[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: Optimization in gcc
SIMPLE: USE YOUE OWN RULE IN THE MAKEFILE LIKE THIS...
-------------------------------
x1:
g++ -O2 x1.cpp -o x1
-------------------------------
this should work.....
IM NOT SURE ABT ALL THE OPTIMIZATION FLAGS THOU...
HAVE FUN!
On Sat, 7 Oct 2000, Madhu M. Kurup wrote:
> Hi,
>
> I am stuck with an odd sort of problem and I was wondering if I could get some help. I need to be able to switch on optimizations without using either a makefile or using command line arguments. Is this possible, at all? the problem can be viewed as this. If I ship a file x1.cpp to a user and all he needs to type is
> make x1
> make will automatically compile it. Now I want the compiled code to use as many optimizations as it can on the target machine. This is of course the equivalent of doing a
> g++ -O2 x1.cpp -o x1
> or something similar.
>
> If this is possible, my guess is that somewhere in the preprocessor / pragma implementation should have this.
>
> All the searching that I've done is of no avail. Help!
>
> Cheerio,
> Madhu
>
> Madhu M Kurup /* Nemo Me Impune Lacessit */ madhu@xxxxxxxxxxx
>
> ---------------------------------------------
> An alpha version of a web based tool to manage
> your subscription with this mailing list is at
> http://lists.linux-india.org/cgi-bin/mj_wwwusr
>
--
Vinod
Artificial Neural Networks Lab,
CSE, IIT Madras