This C++ build system generator is a simple utility that can help you create a Makefile for your C++ projects. It analyzes the source files in the current directory and generates a Makefile with dependencies and build rules. You can use this generated Makefile to build your C++ project with just one command.
Prerequisites
C++ Compiler with C++20 support (e.g., g++)
Usage
Compile the program:
make
make install
Run the program to generate a Makefile:
If you provide an output_file argument, the generated Makefile will be saved to that file.
$ mmpp
If you don't provide an output_file argument, the Makefile will be printed to the console.
$ mmpp makefile
Use the generated Makefile to build your C++ project:
make
Clean the generated object files:
make clean
Features
Generates Makefile rules for all .cpp source files in the current directory.
Automatically detects source file dependencies and includes them in the Makefile.
Provides build, run, clean, install, and uninstall targets in the generated Makefile.
Example
Suppose you have the following C++ source files in your project directory:
main.cpp
utils.cpp
utils.hpp
Running the mmpp program will generate a Makefile that includes rules for building your project, such as: