Skip to content

This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!

GNU Make

GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files.


Table of contents


# emerge -a sys-devel/make
# pacman -S make
# nix-env -iA nixos.gnumake
# nix-env -iA nixpkgs.gnumake
# apt install make
# yum install make
# dnf install make





$ make clean && make CFLAGS="-fPIC" CXXFLAGS="-fpermissive -fPIC".
  • c++98 or c++03 for "ISO C++ 1998 with amendments" standard
  • gnu++98 or gnu++03 for "ISO C++ 1998 with amendments and GNU extensions" standard
  • c++11 for "ISO C++ 2011 with amendments" standard
  • gnu++11 for "ISO C++ 2011 with amendments and GNU extensions" standard
  • c++14 for "ISO C++ 2014 with amendments" standard
  • gnu++14 for "ISO C++ 2014 with amendments and GNU extensions" standard
  • c++17 for "ISO C++ 2017 with amendments" standard
  • gnu++17 for "ISO C++ 2017 with amendments and GNU extensions" standard
  • c++20 for "ISO C++ 2020 DIS" standard
  • gnu++20 for "ISO C++ 2020 DIS with GNU extensions" standard
  • c89, c90, or iso9899:1990 for "ISO C 1990" standard
  • iso9899:199409 for "ISO C 1990 with amendment 1" standard
  • gnu89 or gnu90 for "ISO C 1990 with GNU extensions" standard
  • c99 or iso9899:1999 for "ISO C 1999" standard
  • gnu99 for "ISO C 1999 with GNU extensions" standard
  • c11 or iso9899:2011 for "ISO C 2011" standard
  • gnu11 for "ISO C 2011 with GNU extensions" standard
  • c17, iso9899:2017, c18, or iso9899:2018 for "ISO C 2017" standard
  • gnu17 or gnu18 for "ISO C 2017 with GNU extensions" standard


$ make clean && make CFLAGS="-std=gnu90 -fPIC" CXXFLAGS="-std=c++14 -fpermissive -fPIC"


If this cheat sheet has been useful to you, then please consider leaving a star here.