Mail Archives: djgpp/1997/11/18/01:31:47
Hi ,
I just can't seem to invoke MAKE on a makefile !
The error that I got is the following :
makefile:2: *** missing separator. Stop.
What does that mean ?? It drives me crazy.. I know that make needs real
tabs in MAKEFILE . Since DOS EDIT doesn't support real tab , I had got VIM
, which is similiar to VI in UNIX , to write a makefile but the same error
still appears.
///////////////////////////////////////////////////////////////////////////
Here's how my makefile looks :
program.exe: mainsrc.o printer.o header.o
gcc -o program.exe mainsrc.o printer.o header.o
mainsrc.o: mainsrc.c printer.h header.h
gcc -c mainsrc.o mainsrc.c
printer.o: printer.c printer.h
gcc -c printer.o printer.c
header.o: header.c header.h
gcc -c header.o header.c
///////////////////////////////////////////////////////////////////////////
//mainsrc.c :
#include <stdio.h>
#include "header.h"
#include "printer.h'
void main(void) {
header1();
header2();
print1();
print2();
}
///////////////////////////////////////////////////////////////////////////
// header.h
void header1() ;
void header2();
///////////////////////////////////////////////////////////////////////////
// header.c
#include "header.h"
void header1(void) {
printf("Header 1\n");
}
void header2(void) {
printf("Header 2\n");
}
///////////////////////////////////////////////////////////////////////////
// printer.h
void print1();
void print2();
///////////////////////////////////////////////////////////////////////////
// printer.c
#include "printer.h"
void print1(void) {
printf("Print 1\n");
}
void print2(void) {
printf("Print 2\n");
}
////////////////////////////////////////////////////////////////////////////
Thanks for reading through the code !
Kean
////////////////////////////////////////////////////////////////////////////
//
Lin Oon Kean // Kean's Corner In The World Wide Web :
email : Oon DOT Lin AT jcu DOT edu DOT au // http://lionfish.jcu.edu.au/~sci-okl
//
///////////////////////////////////////////////////////////////////////////
"Computer Science is the recipe for stress and freaking out"
////////////////////////////////////////////////////////////////////////////
- Raw text -