David McCullough | f0be44f | 2012-09-07 04:17:02 +0800 | [diff] [blame] | 1 | # |
| 2 | # Arch-specific CryptoAPI modules. |
| 3 | # |
| 4 | |
| 5 | obj-$(CONFIG_CRYPTO_AES_ARM) += aes-arm.o |
Ard Biesheuvel | e4e7f10 | 2013-09-16 18:31:38 +0200 | [diff] [blame] | 6 | obj-$(CONFIG_CRYPTO_AES_ARM_BS) += aes-arm-bs.o |
David McCullough | f0be44f | 2012-09-07 04:17:02 +0800 | [diff] [blame] | 7 | obj-$(CONFIG_CRYPTO_SHA1_ARM) += sha1-arm.o |
Jussi Kivilinna | 6046825 | 2014-07-29 17:14:14 +0100 | [diff] [blame] | 8 | obj-$(CONFIG_CRYPTO_SHA1_ARM_NEON) += sha1-arm-neon.o |
Sami Tolvanen | f2f770d | 2015-04-03 18:03:40 +0800 | [diff] [blame] | 9 | obj-$(CONFIG_CRYPTO_SHA256_ARM) += sha256-arm.o |
Ard Biesheuvel | c80ae7c | 2015-05-08 10:46:21 +0200 | [diff] [blame^] | 10 | obj-$(CONFIG_CRYPTO_SHA512_ARM) += sha512-arm.o |
Ard Biesheuvel | 3abafaf | 2015-04-11 15:32:34 +0200 | [diff] [blame] | 11 | |
| 12 | ce-obj-$(CONFIG_CRYPTO_AES_ARM_CE) += aes-arm-ce.o |
| 13 | ce-obj-$(CONFIG_CRYPTO_SHA1_ARM_CE) += sha1-arm-ce.o |
| 14 | ce-obj-$(CONFIG_CRYPTO_SHA2_ARM_CE) += sha2-arm-ce.o |
| 15 | ce-obj-$(CONFIG_CRYPTO_GHASH_ARM_CE) += ghash-arm-ce.o |
| 16 | |
| 17 | ifneq ($(ce-obj-y)$(ce-obj-m),) |
| 18 | ifeq ($(call as-instr,.fpu crypto-neon-fp-armv8,y,n),y) |
| 19 | obj-y += $(ce-obj-y) |
| 20 | obj-m += $(ce-obj-m) |
| 21 | else |
| 22 | $(warning These ARMv8 Crypto Extensions modules need binutils 2.23 or higher) |
| 23 | $(warning $(ce-obj-y) $(ce-obj-m)) |
| 24 | endif |
| 25 | endif |
David McCullough | f0be44f | 2012-09-07 04:17:02 +0800 | [diff] [blame] | 26 | |
Ard Biesheuvel | e4e7f10 | 2013-09-16 18:31:38 +0200 | [diff] [blame] | 27 | aes-arm-y := aes-armv4.o aes_glue.o |
| 28 | aes-arm-bs-y := aesbs-core.o aesbs-glue.o |
| 29 | sha1-arm-y := sha1-armv4-large.o sha1_glue.o |
Jussi Kivilinna | 6046825 | 2014-07-29 17:14:14 +0100 | [diff] [blame] | 30 | sha1-arm-neon-y := sha1-armv7-neon.o sha1_neon_glue.o |
Sami Tolvanen | f2f770d | 2015-04-03 18:03:40 +0800 | [diff] [blame] | 31 | sha256-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha256_neon_glue.o |
| 32 | sha256-arm-y := sha256-core.o sha256_glue.o $(sha256-arm-neon-y) |
Ard Biesheuvel | c80ae7c | 2015-05-08 10:46:21 +0200 | [diff] [blame^] | 33 | sha512-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha512-neon-glue.o |
| 34 | sha512-arm-y := sha512-core.o sha512-glue.o $(sha512-arm-neon-y) |
Ard Biesheuvel | 864cbee | 2015-03-10 09:47:45 +0100 | [diff] [blame] | 35 | sha1-arm-ce-y := sha1-ce-core.o sha1-ce-glue.o |
Ard Biesheuvel | 006d062 | 2015-03-10 09:47:46 +0100 | [diff] [blame] | 36 | sha2-arm-ce-y := sha2-ce-core.o sha2-ce-glue.o |
Ard Biesheuvel | 8646485 | 2015-03-10 09:47:47 +0100 | [diff] [blame] | 37 | aes-arm-ce-y := aes-ce-core.o aes-ce-glue.o |
Ard Biesheuvel | f1e866b | 2015-03-10 09:47:48 +0100 | [diff] [blame] | 38 | ghash-arm-ce-y := ghash-ce-core.o ghash-ce-glue.o |
Ard Biesheuvel | e4e7f10 | 2013-09-16 18:31:38 +0200 | [diff] [blame] | 39 | |
| 40 | quiet_cmd_perl = PERL $@ |
| 41 | cmd_perl = $(PERL) $(<) > $(@) |
| 42 | |
| 43 | $(src)/aesbs-core.S_shipped: $(src)/bsaes-armv7.pl |
| 44 | $(call cmd,perl) |
| 45 | |
Sami Tolvanen | f2f770d | 2015-04-03 18:03:40 +0800 | [diff] [blame] | 46 | $(src)/sha256-core.S_shipped: $(src)/sha256-armv4.pl |
| 47 | $(call cmd,perl) |
| 48 | |
Ard Biesheuvel | c80ae7c | 2015-05-08 10:46:21 +0200 | [diff] [blame^] | 49 | $(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl |
| 50 | $(call cmd,perl) |
| 51 | |
| 52 | .PRECIOUS: $(obj)/aesbs-core.S $(obj)/sha256-core.S $(obj)/sha512-core.S |