"Oscar Fuentes" <ofv@...> wrote in message
> "Marc Kealy" <marc@...> writes:
> > Can anyone tell me how I can use a file to specify command line options
> > without using the -specs option. Eg:-
> > g++ $(CCFLAG) -File-Options $(OBJECT) -o$(EXECFILE)
> > where -File-Options will read extra options from a given file.
> This normally is accomplished with makefiles.
> > I have looked in the docs but I can't see anything relevant appart
> > from -specs (which I don't want to use).
> Well, you know that it is possible to override the -specs file with a
> local one, but if you really don't want -specs, the way is either some
> build system (i.e. makefiles) or a shell script.
Basically, I want to write a program to generate the options during the make
procedure and then have those options included on the gcc command line.
Using a specs file over-rides the default specs (which I don't want to do).
It also means I'd have to sort through the options to determine where they
belong in the specs, which is, quite frankly, making a musical out of a song
I think the easiest way of doing it is by creating an environmental variable
and including that on the command line. I'm sure there must be a better way