Opted to use a shell script because it's simpler to manipulate environment variables than in makefiles.