Fix issues when use linux-sgx as cmake subdirectory (#166)

1. Remove the copy of libvmlib.a and libextlib.a to ../enclave_example,
   which doesn't exist in other project.
2. Use default SGX_SDK path to avoid "source $SGX_SDK/environment".

Signed-off-by: Junxian.Xiao <junxian.xjx@antfin.com>
This commit is contained in:
Junxian Xiao
2020-02-17 11:36:17 +08:00
committed by GitHub
parent 5a10651dd0
commit 20cf199ce4
2 changed files with 17 additions and 7 deletions

View File

@ -170,6 +170,14 @@ Enclave/%.o: Enclave/%.cpp
@$(CXX) $(Enclave_Cpp_Flags) -c $< -o $@
@echo "CXX <= $<"
libvmlib.a: ../build/libvmlib.a
@cp $< $@
@echo "CP $@ <= $<"
libextlib.a: ../build/libextlib.a
@cp $< $@
@echo "CP $@ <= $<"
$(Enclave_Name): Enclave/Enclave_t.o $(Enclave_Cpp_Objects) libvmlib.a libextlib.a
@$(CXX) $^ -o $@ $(Enclave_Link_Flags)
@echo "LINK => $@"