Mail Archives: djgpp/1998/09/26/19:35:01
Sahab Yazdani wrote:
>
> I'm having enourmous amounts of problems trying to compile my programs
> using the MAKE command of DJGPP! My makefile looks something like this:
>
> Now I'm rather new to the field of MAKE so I just want to make sure that
> this is the right method of doing it:
>
> // (Not part of code) Will attempt to compile gamelib.a from object.o
> (if object.o is new)
>
> gamelib.a : object.o
> ar rcs gamelib.a object.o
>
> // (Not part of code) if object.o is old it will re-compile!
>
> object.o : object.cc
> gcc -g -c object.cc -o object.o
That looks good, though there are better ways. For example, you could
use a pattern rule for the compilation of .o from .cc. See the Make
docs.
> Now after typing MAKE at the command prompt I get the message:
>
> makefile:2: *** missing separator. Stop.
>
> Can anybody help me get my makefile working properly
See FAQ section 22.16.
> PS. Does the name of the file have to be: MAKEFILE?
I think it can also be GNUMakefile. Those are the only names Make will
find by default. Otherwise, you will have to pass it the makefile name
with the `-f' option:
make -f ThisIsMyMakefileWhichHasAVeryLongAndSillyName
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -