Makefiles

Makefiles

See these projects for example usage: https://github.com/explorer436/programming-playground/tree/main/aws

Reading material

  1. https://www.gnu.org/software/make/manual/make.html
  2. https://makefiletutorial.com/
  3. https://opensource.com/article/18/8/what-how-makefile

Debugging

Makefile:18: *** missing separator.  Stop.

You mistyped the intendation: you have spaces where you should have a tab.

CMake

How to Install CMake on Debian

sudo apt install cmake

makeinfo

configure: error: You do not seem to have makeinfo >= 4.13, and your source tree does not seem to have pre-built manuals in the ‘info’ directory. Please install a suitable version of makeinfo.

In Debian, sudo apt install texinfo

This command will download and install the texinfo package, which includes the makeinfo utility. The system may prompt for the user’s password to proceed with the installation. Verify the installation.

makeinfo –version

What does make install do?

make install makes the newly built software available for system-wide use, integrating it into the operating system’s environment.

The make install command is used to install compiled software onto a system after it has been built using the make command. Its primary function is to copy the compiled executable files, libraries, documentation, and other associated files to their designated locations within the system’s directory structure.

Here’s a breakdown of what make install typically does:

  1. Copies Files: It copies the compiled program binaries (executables), libraries, header files, man pages, and other relevant data files from the build directory to their appropriate system-wide locations. Common installation directories include /usr/local/bin for executables, /usr/local/lib for libraries, and /usr/local/include for header files.
  2. System Integration: By placing the executable in a directory listed in the system’s PATH environment variable, it allows the program to be run from any directory in the terminal without needing to specify its full path.
  3. Permissions: make install often requires administrator privileges (e.g., using sudo) because it writes to protected system directories.
  4. Configuration: The specific installation locations can often be customized during the configure step (e.g., using –prefix=path).

Links to this note