For detection of SGX/non-SGX (for example in regression tests) always use the SGX environment variable. To generate launch/EINIT tokens use the new 'sgx-tokens' Make target.