summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2016-05-14 23:10:51 -0400
committerAnas Nashif <nashif@linux.intel.com>2016-05-16 19:43:50 +0000
commit0b2c44a7710227b2086fe4d0a2f71dd50d958d9e (patch)
tree4c5fc269ce1df3f5afc06f42152177cf21216d99 /lib
parenta0cf03b1c7038e545a412c519767b1ef69ee6820 (diff)
tinycrypt: move from lib to regular objects
tinycrypt was built using the lib- scripts without any real benefit. We also had a wrong placement of the Kconfig files under misc/ and a Kconfig file for Crypto that was never used before. Change-Id: I82d5902d92e7c06e10a95f418d9ead3cbcabcce4 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Kbuild2
-rw-r--r--lib/Kconfig (renamed from lib/crypto/Kconfig)10
-rw-r--r--lib/Makefile5
-rw-r--r--lib/crypto/Makefile2
-rw-r--r--lib/crypto/tinycrypt/Makefile29
5 files changed, 26 insertions, 22 deletions
diff --git a/lib/Kbuild b/lib/Kbuild
new file mode 100644
index 000000000..724572009
--- /dev/null
+++ b/lib/Kbuild
@@ -0,0 +1,2 @@
+obj-y += libc/
+obj-y += crypto/
diff --git a/lib/crypto/Kconfig b/lib/Kconfig
index aac98e676..088fbf4b0 100644
--- a/lib/crypto/Kconfig
+++ b/lib/Kconfig
@@ -1,7 +1,5 @@
-# Kconfig - cryptography configuration options
-
#
-# Copyright (c) 2015 Intel Corporation
+# Copyright (c) 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,8 +14,8 @@
# limitations under the License.
#
-menu "Cryptography"
-
-source "tinycrypt/Kconfig"
+menu "Cryptography"
+source "lib/crypto/tinycrypt/Kconfig"
endmenu
+
diff --git a/lib/Makefile b/lib/Makefile
index 7a484c417..11a285356 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -1 +1,4 @@
-obj-y := libc/
+
+ifeq ($(CONFIG_TINYCRYPT),y)
+ZEPHYRINCLUDE += -I$(srctree)/lib/crypto/tinycrypt/include
+endif
diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile
index b25ada5eb..f51a9e6ca 100644
--- a/lib/crypto/Makefile
+++ b/lib/crypto/Makefile
@@ -1 +1 @@
-libs-$(CONFIG_TINYCRYPT) += tinycrypt/
+obj-$(CONFIG_TINYCRYPT) += tinycrypt/
diff --git a/lib/crypto/tinycrypt/Makefile b/lib/crypto/tinycrypt/Makefile
index c4a5a7a1c..1ffccdc9e 100644
--- a/lib/crypto/tinycrypt/Makefile
+++ b/lib/crypto/tinycrypt/Makefile
@@ -1,14 +1,15 @@
-ccflags-y +=-I$(srctree)/lib/crypto/tinycrypt/include
-lib-$(CONFIG_TINYCRYPT) := source/utils.o
-lib-$(CONFIG_TINYCRYPT_ECC_DH) += source/ecc_dh.o source/ecc.o
-lib-$(CONFIG_TINYCRYPT_ECC_DSA) += source/ecc_dsa.o source/ecc.o
-lib-$(CONFIG_TINYCRYPT_AES) += source/aes_decrypt.o
-lib-$(CONFIG_TINYCRYPT_AES) += source/aes_encrypt.o
-lib-$(CONFIG_TINYCRYPT_AES_CBC) += source/cbc_mode.o
-lib-$(CONFIG_TINYCRYPT_AES_CTR) += source/ctr_mode.o
-lib-$(CONFIG_TINYCRYPT_AES_CCM) += source/ccm_mode.o
-lib-$(CONFIG_TINYCRYPT_AES_CMAC) += source/cmac_mode.o
-lib-$(CONFIG_TINYCRYPT_SHA256) += source/sha256.o
-lib-$(CONFIG_TINYCRYPT_SHA256) += source/utils.o
-lib-$(CONFIG_TINYCRYPT_SHA256_HMAC) += source/hmac.o
-lib-$(CONFIG_TINYCRYPT_SHA256_HMAC_PRNG) += source/hmac_prng.o
+subdir-ccflags-y +=-I$(srctree)/lib/crypto/tinycrypt/include
+
+obj-$(CONFIG_TINYCRYPT) := source/utils.o
+obj-$(CONFIG_TINYCRYPT_ECC_DH) += source/ecc_dh.o source/ecc.o
+obj-$(CONFIG_TINYCRYPT_ECC_DSA) += source/ecc_dsa.o source/ecc.o
+obj-$(CONFIG_TINYCRYPT_AES) += source/aes_decrypt.o
+obj-$(CONFIG_TINYCRYPT_AES) += source/aes_encrypt.o
+obj-$(CONFIG_TINYCRYPT_AES_CBC) += source/cbc_mode.o
+obj-$(CONFIG_TINYCRYPT_AES_CTR) += source/ctr_mode.o
+obj-$(CONFIG_TINYCRYPT_AES_CCM) += source/ccm_mode.o
+obj-$(CONFIG_TINYCRYPT_AES_CMAC) += source/cmac_mode.o
+obj-$(CONFIG_TINYCRYPT_SHA256) += source/sha256.o
+obj-$(CONFIG_TINYCRYPT_SHA256) += source/utils.o
+obj-$(CONFIG_TINYCRYPT_SHA256_HMAC) += source/hmac.o
+obj-$(CONFIG_TINYCRYPT_SHA256_HMAC_PRNG) += source/hmac_prng.o