[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Optimization in gcc
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 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!
Madhu M Kurup /* Nemo Me Impune Lacessit */ madhu@xxxxxxxxxxx