The BASETOOLS variable as shown above is a prefix: it has to be on the same line and used every single time. This is a basic shell feature, there is no Galileo-specific magic at all here.
The HelloWorld.efi demo has absolutely nothing related to the SPI Flash tools makefile.