xref: /openbmc/linux/arch/arm/crypto/Makefile (revision c0c74acb)
1#
2# Arch-specific CryptoAPI modules.
3#
4
5obj-$(CONFIG_CRYPTO_AES_ARM) += aes-arm.o
6obj-$(CONFIG_CRYPTO_AES_ARM_BS) += aes-arm-bs.o
7obj-$(CONFIG_CRYPTO_SHA1_ARM) += sha1-arm.o
8obj-$(CONFIG_CRYPTO_SHA1_ARM_NEON) += sha1-arm-neon.o
9obj-$(CONFIG_CRYPTO_SHA256_ARM) += sha256-arm.o
10obj-$(CONFIG_CRYPTO_SHA512_ARM) += sha512-arm.o
11obj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha20-neon.o
12
13ce-obj-$(CONFIG_CRYPTO_AES_ARM_CE) += aes-arm-ce.o
14ce-obj-$(CONFIG_CRYPTO_SHA1_ARM_CE) += sha1-arm-ce.o
15ce-obj-$(CONFIG_CRYPTO_SHA2_ARM_CE) += sha2-arm-ce.o
16ce-obj-$(CONFIG_CRYPTO_GHASH_ARM_CE) += ghash-arm-ce.o
17ce-obj-$(CONFIG_CRYPTO_CRCT10DIF_ARM_CE) += crct10dif-arm-ce.o
18crc-obj-$(CONFIG_CRYPTO_CRC32_ARM_CE) += crc32-arm-ce.o
19
20ifneq ($(crc-obj-y)$(crc-obj-m),)
21ifeq ($(call as-instr,.arch armv8-a\n.arch_extension crc,y,n),y)
22ce-obj-y += $(crc-obj-y)
23ce-obj-m += $(crc-obj-m)
24else
25$(warning These CRC Extensions modules need binutils 2.23 or higher)
26$(warning $(crc-obj-y) $(crc-obj-m))
27endif
28endif
29
30ifneq ($(ce-obj-y)$(ce-obj-m),)
31ifeq ($(call as-instr,.fpu crypto-neon-fp-armv8,y,n),y)
32obj-y += $(ce-obj-y)
33obj-m += $(ce-obj-m)
34else
35$(warning These ARMv8 Crypto Extensions modules need binutils 2.23 or higher)
36$(warning $(ce-obj-y) $(ce-obj-m))
37endif
38endif
39
40aes-arm-y	:= aes-cipher-core.o aes-cipher-glue.o
41aes-arm-bs-y	:= aes-neonbs-core.o aes-neonbs-glue.o
42sha1-arm-y	:= sha1-armv4-large.o sha1_glue.o
43sha1-arm-neon-y	:= sha1-armv7-neon.o sha1_neon_glue.o
44sha256-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha256_neon_glue.o
45sha256-arm-y	:= sha256-core.o sha256_glue.o $(sha256-arm-neon-y)
46sha512-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha512-neon-glue.o
47sha512-arm-y	:= sha512-core.o sha512-glue.o $(sha512-arm-neon-y)
48sha1-arm-ce-y	:= sha1-ce-core.o sha1-ce-glue.o
49sha2-arm-ce-y	:= sha2-ce-core.o sha2-ce-glue.o
50aes-arm-ce-y	:= aes-ce-core.o aes-ce-glue.o
51ghash-arm-ce-y	:= ghash-ce-core.o ghash-ce-glue.o
52crct10dif-arm-ce-y	:= crct10dif-ce-core.o crct10dif-ce-glue.o
53crc32-arm-ce-y:= crc32-ce-core.o crc32-ce-glue.o
54chacha20-neon-y := chacha20-neon-core.o chacha20-neon-glue.o
55
56quiet_cmd_perl = PERL    $@
57      cmd_perl = $(PERL) $(<) > $(@)
58
59$(src)/sha256-core.S_shipped: $(src)/sha256-armv4.pl
60	$(call cmd,perl)
61
62$(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl
63	$(call cmd,perl)
64
65.PRECIOUS: $(obj)/sha256-core.S $(obj)/sha512-core.S
66