In this code drop we introduce the ODK dependency. The reference implementation has been updated to make use of the ODK and the related tests have been included. In addition, we have included an example of how a shared libraries can be created. This will allow make it easier to test and verify different implementations of the API. Most other changes introduce by this code drop were made to clean-up the reference implementation and limit dependencies.
71 lines
1.8 KiB
Plaintext
71 lines
1.8 KiB
Plaintext
# Copyright 2020 Google LLC. All Rights Reserved.
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
filegroup(
|
|
name = "odk_common_hdrs",
|
|
srcs = [
|
|
"oemcrypto/odk/src/odk_serialize.h",
|
|
"oemcrypto/odk/src/odk_structs_priv.h",
|
|
"oemcrypto/odk/src/serialization_base.h",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "core",
|
|
srcs = [
|
|
"oemcrypto/odk/src/odk.c",
|
|
"oemcrypto/odk/src/odk_assert.h",
|
|
"oemcrypto/odk/src/odk_endian.h",
|
|
"oemcrypto/odk/src/odk_overflow.c",
|
|
"oemcrypto/odk/src/odk_overflow.h",
|
|
"oemcrypto/odk/src/odk_serialize.c",
|
|
"oemcrypto/odk/src/odk_timer.c",
|
|
"oemcrypto/odk/src/odk_util.c",
|
|
"oemcrypto/odk/src/odk_util.h",
|
|
"oemcrypto/odk/src/serialization_base.c",
|
|
":odk_common_hdrs",
|
|
],
|
|
hdrs = [
|
|
"oemcrypto/odk/include/OEMCryptoCENCCommon.h",
|
|
"oemcrypto/odk/include/odk.h",
|
|
"oemcrypto/odk/include/odk_structs.h",
|
|
"oemcrypto/odk/include/odk_target.h",
|
|
],
|
|
copts = ["-std=c99"],
|
|
includes = [
|
|
"oemcrypto/odk/include",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "serialization",
|
|
srcs = [
|
|
"oemcrypto/odk/src/core_message_deserialize.cpp",
|
|
"oemcrypto/odk/src/core_message_serialize.cpp",
|
|
"oemcrypto/odk/src/core_message_serialize_proto.cpp",
|
|
":odk_common_hdrs",
|
|
],
|
|
hdrs = [
|
|
"oemcrypto/odk/include/core_message_deserialize.h",
|
|
"oemcrypto/odk/include/core_message_serialize.h",
|
|
"oemcrypto/odk/include/core_message_serialize_proto.h",
|
|
"oemcrypto/odk/include/core_message_types.h",
|
|
],
|
|
deps = [
|
|
":core",
|
|
"@//odk_deps"
|
|
],
|
|
includes = [
|
|
"oemcrypto/odk/include",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "odk",
|
|
deps = [
|
|
":core",
|
|
":serialization",
|
|
],
|
|
)
|