This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: command line options


Abdul wrote:

> How to put all the command line options in a file, so that I need
> not type it every time?

Depending on which system you're using, you could write a shell script or
batch file to perform the compile. (I saw a discussion about adding
'@inputfile' to read the contents of inputfile as command line arguments
c.f. DJGPP but I haven't seen that implemented yet.)

However, probably the best thing to do is to write a makefile. See 'info
make' or 'man make' on your system. You tell make which source files are
used in your project, how to compile them (CFLAGS) and how to link them and
then run make; it will recompile only the source files that have changed,
etc. It's very useful for large projects.

Rup.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]