A project setup tool for C/C++ projects using make and criterion.


Clone for first installation. You can delete the directory afterwards.

$ git clone
$ cd metamake
$ make install
$ rm -rf ../metamake

if this doesn’t work it means you probably don’t have a $HOME/.local/bin directory and you don’t have access to /usr/bin. Just create $HOME/.local/bin and rerun

To update simply do

$ metamake --update


metamake [options] <empty_target_dir>
  -n --name <executable_name>
  -c --compiler <compiler>
metamake [options]

Project Setup Overview

├── Makefile
├── bin
├── include
├── libs
│   ├── Makefile
│   └── some_library    
├── src
│   └── main.c
└── tests
    ├── Makefile
    ├── criterion-v2.3.2
    └── tests.c

Makefile has basic $(NAME), all, clean, fclean and re rules

All source files in src are compiled. Build files are kept in a temporary build directory. Binaries are kept in bin directory

release rule recompiles all with -O3 and -march=native flags

libs directory is where libraries live. Each library should have its own directory with same exact name (excluding lib and .a). Each of these directories should have a Makfile with a default rule that compiles the lib or no Makefile but an .a file. They need also to have .h/.hpp files located in ./include

tests dir is where tests are run and criterion lives. If you do make tests all *.c/.cpp files in the tests directory will be compiled and ran one after the other. An example file with Test is present, but you should check out the criterion repo.

run rule runs the binary. all compiles, tests and then runs.


This is a one and done kind of utility. It is not a build tool. It just sets up Makefiles and directories, maintenance and changes are up to you.


Libs implementation might be untested

Only works with static libs (.a archives)


GNU Make manual

Criterion Youtube Tutorial

Criterion documentation




View Github