Menu

Scaffold and Edit Flat Makefiles from the Terminal with MakeMaker and C++11
📰

Scaffold and Edit Flat Makefiles from the Terminal with MakeMaker and C++11

DEV Community: cpp·Fernando Paladini·9 days ago
#1lBNmPlb
#devtocpp#devto#dev#ifndef#define
Long article (1443 words) — no AI summary yet.
Reading 0:00
15s threshold

Writing a small C or C++ utility often starts with two or three source files and a few compiler commands. A full CMake or Meson setup can feel heavy for a throwaway prototype or lab exercise, yet editing a raw makefile by hand frequently introduces space-instead-of-tab errors or inconsistent flags across targets.

MakeMaker ( mm ) is an MIT-licensed C++11 command-line tool that creates, inspects, and updates flat makefile definitions from the terminal. Instead of hand-formatting tab-indented recipe blocks, you run mm set -v , mm add , mm edit , mm list , and mm remove to maintain variables and compiler targets.

This tutorial shows how to compile mm locally with g++ without root privileges, scaffold a multi-file C++ build, verify the generated makefile with GNU Make, and stay within the grammar and safety boundaries of MakeMaker's parser.

TL;DR

Compile src/Run.cpp into a local mm binary with g++ -std=c++11 , define top-level variables with mm set -v , add compiler recipes with mm add , and run make in the…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.