On Fri, Mar 15, 2002 at 12:31:11AM -0600, mcolivier wrote: [sample makefile snipped] > My question is, I don't know what the author is saying. Dude, that's not a question! :-) > Where did main.o and aux.o come from? The .o files were built via the rules that show how to build them from the .c and .h source files. > What is CC=gcc, and why is it shown like this? It sets the variable $(CC) to the value "gcc". This is useful if you need to change the compiler you're using. > Finally, what is make, what is makefile, and what's the > difference between the two? "make" is a utility program, and a makefile is what you give "make" to tell it what to do. In short a makefile is a set of rules that tells make what to build and how. For example, the rule: foo.o: foo.c foo.h gcc -c foo.c says "foo.o" depends on foo.c and foo.h. If the timestamp on foo.h or foo.c is more recent than foo.o, I need to rebuild foo.o via the command "gcc -c foo.c". For more/better documentation see: http://www.gnu.org/software/make/make.html > I have a commercial C/C++ package (Watcom) which does the make > stuff via a button. If I do a makefile on this (which runs on > a Windows platform) will resulting program work on a Linux > platform? Beats all hell out of me. My guess is no -- my experience on the win32 platform says that they have their own incompatible make system (nmake). Could be OK though. -- johntrammell at yahoo.com | 78BA 706C C5F9 9321 E7C4 933B D063 907B A88E 924B Twin Cities Linux Users Group (TCLUG) Mailing List http://www.mn-linux.org Minneapolis/St. Paul, Minnesota irc.openprojects.net #tclug