TIP: Click on subject to list as thread! ANSI
echo: muffin
to: Wes Garland
from: Roy J. Tellason
date: 2003-06-20 04:05:52
subject: Maximus at UNIX

Wes Garland wrote in a message to Roy J. Tellason:

 RJT> I have a book on c programming around here someplace that actually 
 RJT> talks about dealing with c under the unix 
 RJT> environment,  and that's where I'd heard of a.out 
 RJT> in the first place.  Dunno where that book is,  
 RJT> offhand,  though.  I was thinking that the ELF 
 RJT> binary thing sorta obsoleted that,  but I guess I 
 RJT> still have a lot to learn about doing things on 
 RJT> that platform.

 WG> It's possible that you're thinking of "The C Programming Language"
 WG> by Brian W. Kerninghan and Dennis M. Ritchie (aka K&R, aka The 
 WG> Bible). It has a chapter (11?) on programming in C under UNIX. At
 WG> least my edition does (2nd edition, updated to reflect the first
 WG> ANSI draft).

Nope,  that one's been on my list for quite some time,  but I never have
gotten around to snagging a copy...

 WG> I think it's more likely that you're referring to "Programming in
 WG> the UNIX Environment" (or something similar -- white softcover with
 WG> cyan lettering) by Kerninghan & Pike.

Don't think that Kernighan was on the one I'm thinking of.  Keep this up
and I'm gonna have to go digging through boxes...   :-)

 WG> Anyhow, the fact that a.out is still around actually makes sense
 WG> given the origin of the name; it stood for "assembler output" and
 WG> was only later used to reference a particular type of binary --
 WG> incorrectly, IMHO. That type of binary is properly called COFF,
 WG> Common Object File Format, a variant of which is still used by
 WG> Microsoft today -- and of course, most unices.

I've heard that term before somewhere.

WG> TO specify the name of your output file, use '-o filename'.

RJT> Noted.  I went all through man cc and didn't catch that one.  

WG> Here's one you won't find in the manual:
WG>  
WG> # touch Makefile
WG> # make myprogram
WG>  
WG> This will build "myprogram" from "myprogram.c",
assuming you have
WG> GNU Make and a reasonable system configuration.

A reasonable assumption,  since I've been able to build stuff on the box before.

WG> Touching the Makefile merely creates a Makefile with no rules, so 
WG> the implicity rules kick in.

And where are those documented?

I was surprised that this went the whole way through the link process and
everything and ended up giving me an executable,  I thought it would've
stopped before it got to that point.

--- 
* Origin: TANSTAAFL BBS 717-838-8539 (1:270/615)
SEEN-BY: 633/267 270
@PATH: 270/615 150/220 379/1 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.