GNU Make environment variables

These environment variables are common across build systems as a de facto standard, and assume a compiler like GCC or Clang environment variables.

Dynamic library path:

  • Linux: LD_LIBRARY_PATH
  • macOS: LIBRARY_PATH
  • Windows: must be on environment variable PATH

Include path (where .h C header files are located):

Linux / macOS: CPATH

An example GNU Make Unix-like shell command would be like:

LD_LIBRARY_PATH=/path/to/lib CPATH=/path/to/include make