Re: gcc questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/27/05, Matthew Miller <mattdm@xxxxxxxxxx> wrote:
> On Sat, Nov 26, 2005 at 01:16:25PM +0200, Dotan Cohen wrote:
> > Also, all files that gcc outputs are of the name a.out. I want it to
> > give the .out file the original name of the file, with a .out. I have
> > manned and discovered the -o option, whereby I can specify a filename,
> > but I would prefer that it would read the original filename and use
> > that. For instance:
> > $gcc mycode.c
> > $ls
> > mycode.c    mycode.out
> > How can I encourage this behaviour? Thank you.
>
>
> Oh, hey, I missed this part of the question. There's a neat trick if you
> have GNU Make, which you do on Fedora (and just about any Linux distro).
> If you have a simple C program with just one source file and no special
> linking needs, you can do this:
>
>    make mycode
>
> Note not mycode.c -- it'll automatically figure out that it can make the
> executable mycode from mycode.c. And you don't even have to have a Makefile!
>

That looks like what I'm looking for. When I did make file (not
file.c) I was informed that the file is already up to date. I checked
man make and I didn't see any information on how to compile, although
it does say that it is dealing with C files. I tried googling for
info.make but I can't get my hands on it.

I want to say thanks again for helping me on this OT thread. I learned
more from everybody's responses than I did in class!

Dotan
http://technology-sleuth.com/long_answer/what_is_a_cellphone.html
=


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux