I don't even know how to compile it...
urmm..the complete version is like this.
Code:
/* headers.h */
#include <stdio.h>
void function_a(void);
void function_b(void);
void function_c(void);
Code:
/* main.c */
#include "headers.h"
main()
{
printf("In the main program\n");
function_a();
function_b();
printf("All done\n");
}
Code:
/* fun_a.c*/
#include "headers.h"
void function_a(void) {
printf(" In function_a() \n");
}
Code:
/* fun_b.c*/
#include "headers.h"
void function_b(void) {
printf(" In function_b() \n");
function_c();
}
Code:
/* fun_c.c */
#include "headers.h"
void function_c(void) {
printf(" In function_c() \n");
}
And then I have this program to type in as my "MakeFile"
Code:
CC=bcc32
HEADERS=headers.h
silly.exe: main.obj fun_a.obj fun_b.obj fun_c.obj
$(CC) -esilly.exe main.obj fun_a.obj fun_b.obj fun_c.obj
main.obj: $(HEADERS) main.c
$(CC) -I. -c main.c
fun_a.obj: $(HEADERS) fun_a.c
$(CC) -I. -c fun_a.c
fun_b.obj: $(HEADERS) fun_b.c fun_c.obj
$(CC) -I. -c fun_b.c
fun_c.obj: $(HEADERS) fun_c.c
$(CC) -I. -c fun_c.c
clean:
del silly *.obj *.tds
tidy:
del *.tds
-----------------------------------------------------
what type of file should I save that "MakeFile"...is it just MakeFile or MakeFile.exe .......or any other extension...
and in my lecture notes, it said that I have to type in command to build the program. But when I type in the command.....I got msg >>>
Code:
Fatal: 'silly.exe' does not exist - don't know how to make it