Mail Archives: djgpp/2001/03/26/15:02:33
Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> wrote:
> Brian Christiansen <brianc23454 AT earthlink DOT net> wrote:
> > I tried the following, and got the following results:
>
> > C:\djgpp\bin\projects>make -f proj13.mak proj13.exe
> > proj13.mak:5: *** missing separator. Stop.
>
> This message means that your claim there really are <Tab>s in your
> makefile, almost certainly is wrong. Look at line 5 of proj13.mak.
More likely, the makefile was exactly as he said, and with tabbed
indents. The missing colon on line 5 would cause that error.
This is probably the makefile Brian is attempting to write:
proj13.exe: video.o testmain13.o
gcc -o proj13.exe video.o testmain13.o
video.o: video.cpp
gcc -c video.cpp
testmain13.o: testmain13.cpp
gcc -c testmain13.cpp
but at Eli has pointed out, the last 4 lines are redundant because make
already knows how to compile source files to objects.
Of course, make can do more than this, and I can't help but point out too
that Brian probably wants to turn warnings on since this so easy to do in
a makefile. Here's a slightly more advanced version (but not more
advanced than a beginner could cope with after browsing the info pages, I
think):
CFLAGS = -Wall
proj13.exe: video.o testmain13.o
gcc -o $@ $^
- Raw text -