Magic does understand the environment variable $CAD_ROOT and will look there for subdirctory magic/. However, it is sort of expecting magic to be installed there, not as a place just to find a PDK. I think it can be made to work with just a bit of cleaning up, so that you could run magic on a .mag file and have it figure out where to find the tech file and the startup script.