sorry, but .... not sure if any code can use eveywhere code, this is one of the strongest and weakest points of Unix .... there are so many different tastes of the OS itself and the implementation of Make Utility - GNU is only one of them, as well as an open form of diesel fuel (small differences), but they share many common functions.
there are GNU Make functions that are only available if you invoke your makefile with GNU make, the same for the other OS variables of the make .. utility, with restrictions such as these
"rigorous testing on all the possible systems you want it to work is the only solution that comes to my mind"
source share