What is the role of makefile in a program?

Recommended Answers

In a program? None. makefiles are not used by programs, they tell the compiler how to compile the program.

Jump to Post

A script to automate building, it sets compiler flags, defined environment variables etc... required for the build.

I do cross-compiling on x86 for ARM under Linux, so i need quite a few such settings. Therefore, I have a CMAKE file which does all this for me when I type …

Jump to Post

All 5 Replies

In a program? None. makefiles are not used by programs, they tell the compiler how to compile the program.

A script to automate building, it sets compiler flags, defined environment variables etc... required for the build.

I do cross-compiling on x86 for ARM under Linux, so i need quite a few such settings. Therefore, I have a CMAKE file which does all this for me when I type make, much easier than typing out every time.

I much prefer CMAKE's syntax to the GNU autotools one.

Can you tell me how to make a makefile and what are its contents?
I basically can't understand the concept of makefile but it would be very helpful if you could give me some links that explain about "Makefile".

thank u!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.