Mail Archives: djgpp/1996/06/16/18:51:32
Hi!
I'm a newbie to DJGPP, but I've done a bit of C programming
before. I've never had to write a makefile before, and I'm having problems
getting the one I've written to work. I've read the FAQ and the info on
make, but I can't find anything that's helpful.
The following is the code in the makefile (with comments removed):
FLAGS = -Wall -m386
starship : starship.o
gcc -lalleg starship.o -o starship $(FLAGS)
starship.o : stdlib.h allegro.h
gcc -c starship.c -o starship.o $(FLAGS)
This produces the error message 'makefile:8: *** missing separator. Stop',
where line 8 is the line following 'starship : ...'.
'starship.c' just prints "Hello!\n", and '#include's stdlib.h and
allegro.h (as in the dependecies). I can compile and link the program fine
from the DOS command-line, and the program works fine (I have Allegro's
library in my library path, and the include file in the include path BTW). I
know the compiler works because I have compiled Allegro, PDCurses, GRX20
and some other programs with it. I've tried saving the makefile in Unix's
text file format rather than DOS's, but this made no difference.
I think I am missing something extremely simple here, but I cannot
see what. Thanks in advance for any help.
Rich Dawe
--
==============================================================================
"You don't have to find the solution, you've got to understand the problem,
and don't go hoping for a miracle." - 'Slight Return' by the Bluetones
Rich Dawe - 1st year Physicist @ Bristol Uni, UK
E-mail: rd5718 AT bristol DOT ac DOT uk Web pages: http://irix.bris.ac.uk/~rd5718/
==============================================================================
- Raw text -