Xref: news2.mv.net comp.os.msdos.djgpp:5047 Newsgroups: comp.os.msdos.djgpp From: rd5718 AT irix DOT bris DOT ac DOT uk (Rich Dawe) Subject: Problems with a simple makefile Message-ID: Sender: usenet AT uns DOT bris DOT ac DOT uk (Usenet news owner) Nntp-Posting-Host: irix.bris.ac.uk Organization: University of Bristol, England Date: Sun, 16 Jun 1996 11:04:13 GMT Lines: 42 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp 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/ ==============================================================================