Date: Sun, 25 Mar 2001 20:14:46 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Brian Christiansen" Message-Id: <9003-Sun25Mar2001201444+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp AT delorie DOT com In-reply-to: <0apv6.10280$P4.869113@newsread1.prod.itd.earthlink.net> (brianc23454 AT earthlink DOT net) Subject: Re: Trying to figure out makefiles References: <0apv6.10280$P4 DOT 869113 AT newsread1 DOT prod DOT itd DOT earthlink DOT net> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Brian Christiansen" > Newsgroups: comp.os.msdos.djgpp > Date: Sun, 25 Mar 2001 16:38:20 GMT > > Right now, my makefile is called proj13.mak and looks like: > > proj13.exe: video.o testmain13.o > gcc -o proj13.exe video.o testmain13.o > video.o: video.cpp > gcc -c testmain13.cpp > testmain13.o > gcc -c testmain13.cpp > > (it doesn't quite look like it, at least in my newsreader, but it is a > "tab", not just a couple of spaces before the lines call gcc) > > when I cd to the directory that this file is in (testmain13.cpp and > video.cpp are in the same directory) and type "make proj13.exe", I get the > response: > > make.exe: *** No rule to make target `proj13.exe'. Stop. Try "make -f proj13.mak" instead. By default, Make looks for a file called `Makefile' in the current directory; if you want another file name, you need to tell that to Make via the -f option. Btw, you don't need to tell Make how to create a foo.o file from a foo.cpp file: Make already knows that. Thus, the first rule in your Makefile is all you need to get this project to build correctly.