Does anyone build Intel SGX related library to OpenWrt

I want to build intel SGX related library to openwrt and use it in docker container. I dont know how to start, should i think it as a third party application and modify the makefile, then make it?
Is there any guide to modify the makefile to do the cross compile.