Hello guys,
If somebody of you has a small time can assist me please to understand the basic basic basic writing makefile methods ?
Articles, books and tips are welcome. I've already gave a look at some of them.
Obviously it is not easy write makefile. My apologize in advance for my basic question.
Because It's not clear the "starting point", please, can you show in which a way the makefile of the following two cases should be written ?
____________________________________________________________________________
FIRST (The famous "Hello world" program - single file).
________________________________________________________________________
SECOND (Multiple source files) .
File: main.c
File: function_hello.c
File: hello.h
__________________________________________________________________________
Thanks very much in advance for you time.
If somebody of you has a small time can assist me please to understand the basic basic basic writing makefile methods ?
Articles, books and tips are welcome. I've already gave a look at some of them.
Obviously it is not easy write makefile. My apologize in advance for my basic question.
Because It's not clear the "starting point", please, can you show in which a way the makefile of the following two cases should be written ?
____________________________________________________________________________
FIRST (The famous "Hello world" program - single file).
C++:
#include <stdio.h>
int main (void)
{
printf ("Hello GCC!\n");
return 0;
}
________________________________________________________________________
SECOND (Multiple source files) .
File: main.c
C++:
#include "hello.h"
int main (void)
{
hello ("world");
return 0;
}
File: function_hello.c
C++:
#include <stdio.h>
#include "hello.h"
void hello (const char * name)
{
printf ("Hello, %s!\n", name);
}
File: hello.h
Code:
void hello (const char * name);
__________________________________________________________________________
Thanks very much in advance for you time.