Add these lines to the top of a Makefile to load environment variables from a file. The minus sign lets it fail silently if the file doesn't exist:
-include .env
export
export
The .env
file should look like this:
MY_ENV_VAR=1
MY_OTHER_ENV_VAR=2
MY_OTHER_ENV_VAR=2