Two is Too Many
  • Home
  • About

make

Make Wildcard Patterns AKA build all the files you find

The Problem You want Make to automatically build all sources in a given folder without having to specify them each time in the Makefile. The Solution You can combine a wildcard to match all the sources, then use a patsubst to name the targets from these, and finally use a
Michael Twomey Jul 27, 2020

Automatically Making Build Directories in Make

The Problem There are times in a Makefile where you need a common dependency built first. The most obvious one is the output directories. There are a bunch of options for this, including sticking a mkdir -p $(BUILDDIR) in every target or adding it as a dependency. This can result
Michael Twomey Jul 23, 2020
  • Sign up
Two is Too Many © 2025. Powered by Ghost