 +# service library based on the value of SGX_SIM.
 +cc_library(
 +    name = "uae_service_select",
-+    deps = [":se_wrapper"] + select({
++    hdrs = PSW_COMMON_HDRS,
++    copts = PSW_COMMON_INCLUDES + [
++        "-Iexternal/linux_sgx/psw/ae/common",
++        "-Iexternal/linux_sgx/common/inc/internal",
++    ],
++    deps = [
++        ":ipc_common_proto_cc",
++        ":common_inc",
++        ":common_inc_internal",
++        ":se_wrapper",
++        ":untrusted_inc",
++        ":untrusted_inc_internal",
++        ":epid_inc",
++    ] + select({
 +        ":sgx_hw": [":uae_service_hw"],
 +        "//conditions:default": [":uae_service_sim"],
 +    }),

+# CC0 1.0 (DLMalloc),
+licenses(["reciprocal"])  # Eclipse public license
+
+exports_files([
+    "LICENSE",
+    "enclave_sim.lds",
+    "enclave_test_private.pem",
+])
+
+load(
+    ":sgx_sdk.bzl",
+    "sgx_enclave",
+    "sgx_enclave_configuration",
+)
+
+config_setting(
+    name = "dbg",

 bool is_valid_sp(uintptr_t sp);
--- /dev/null
+++ BUILD
@@ -0,0 +1,1190 @@
+# linux-sgx is the Intel SGX SDK
+
+# "notice" licenses present:
