www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/18/01:31:47

From: Oon Lin <sci-okl AT jcu DOT edu DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: Can't MAKE
Date: Tue, 18 Nov 1997 15:36:45 +1000
Organization: University of Queensland
Lines: 105
Message-ID: <Pine.OSF.3.96.971118152537.22706C-100000@barra.jcu.edu.au>
References: <ABcb0PqSO6 AT rsuzi DOT pgu DOT karelia DOT ru>
NNTP-Posting-Host: cuda.jcu.edu.au
Mime-Version: 1.0
In-Reply-To: <ABcb0PqSO6@rsuzi.pgu.karelia.ru>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019