How to invoke /usr/local/bin/g++-X instead of XcodeDefault.xctoolchain/usr/bin/c++

{MacOS 10.14.1 Mojave, Xcode 10.1}

I’m working on building the POPF planner under MacOS and I’m stuck on a system library include problem that I’m not sure how to overcome.

I have exported export CC=gcc-8 CXX=g++8 in my terminal, yet when I invoke make VERBOSE=1, the /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ compiler is still used rather than /usr/local/bin/gcc-8. This is causing the wrong system includes to be used:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ 

instead of

/usr/local/Cellar/gcc/8.3.0/include/c++/8.3.0/ 

What have I missed? Thanks in advance.