Hello, I'm new to Linux development, 'make' seems to be the standard for building applications.
I'm having difficulties understanding the structure of a makefile.
Please, can you point me to good resource or documentation to look at ?
Hello, I'm new to Linux development, 'make' seems to be the standard for building applications.
I'm having difficulties understanding the structure of a makefile.
Please, can you point me to good resource or documentation to look at ?
The best tutorial that I have found for makefiles so far has been this one. One of your other options is to learn autotools and let them produce your makefiles for you, though a little outdated this is the tutorial that I found best to learn from.
You could also use this tutorial by example. It provides very easy examples that will work for simple projects.
While it is well and good that you learn how to read and write a Makefile, I strongly recommend that you use CMake for your C/C++ builds instead of writing your own Makefile. It is very difficult to craft a portable Makefile, which is why the C++ community shifted from hand-crafted makefiles to using the GNU Autotools (Automake, Autoconf, Autoheader, Autoreconf, Libtool, etc.).However, the extreme complexity of the GNU Autotools left much to be desired, resulting in the creation of CMake, which is quickly becoming the build tool of choice for the C/C++ community. It has already been adopted by a growing list of projects, including KDE.