xref: /openbmc/linux/arch/arm/crypto/Makefile (revision 5d6f5267)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Arch-specific CryptoAPI modules.
4#
5
6obj-$(CONFIG_CRYPTO_AES_ARM) += aes-arm.o
7obj-$(CONFIG_CRYPTO_AES_ARM_BS) += aes-arm-bs.o
8obj-$(CONFIG_CRYPTO_SHA1_ARM) += sha1-arm.o
9obj-$(CONFIG_CRYPTO_SHA1_ARM_NEON) += sha1-arm-neon.o
10obj-$(CONFIG_CRYPTO_SHA256_ARM) += sha256-arm.o
11obj-$(CONFIG_CRYPTO_SHA512_ARM) += sha512-arm.o
12obj-$(CONFIG_CRYPTO_BLAKE2S_ARM) += blake2s-arm.o
13obj-$(if $(CONFIG_CRYPTO_BLAKE2S_ARM),y) += libblake2s-arm.o
14obj-$(CONFIG_CRYPTO_BLAKE2B_NEON) += blake2b-neon.o
15obj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha-neon.o
16obj-$(CONFIG_CRYPTO_POLY1305_ARM) += poly1305-arm.o
17obj-$(CONFIG_CRYPTO_NHPOLY1305_NEON) += nhpoly1305-neon.o
18obj-$(CONFIG_CRYPTO_CURVE25519_NEON) += curve25519-neon.o
19
20obj-$(CONFIG_CRYPTO_AES_ARM_CE) += aes-arm-ce.o
21obj-$(CONFIG_CRYPTO_SHA1_ARM_CE) += sha1-arm-ce.o
22obj-$(CONFIG_CRYPTO_SHA2_ARM_CE) += sha2-arm-ce.o
23obj-$(CONFIG_CRYPTO_GHASH_ARM_CE) += ghash-arm-ce.o
24obj-$(CONFIG_CRYPTO_CRCT10DIF_ARM_CE) += crct10dif-arm-ce.o
25obj-$(CONFIG_CRYPTO_CRC32_ARM_CE) += crc32-arm-ce.o
26
27aes-arm-y	:= aes-cipher-core.o aes-cipher-glue.o
28aes-arm-bs-y	:= aes-neonbs-core.o aes-neonbs-glue.o
29sha1-arm-y	:= sha1-armv4-large.o sha1_glue.o
30sha1-arm-neon-y	:= sha1-armv7-neon.o sha1_neon_glue.o
31sha256-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha256_neon_glue.o
32sha256-arm-y	:= sha256-core.o sha256_glue.o $(sha256-arm-neon-y)
33sha512-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha512-neon-glue.o
34sha512-arm-y	:= sha512-core.o sha512-glue.o $(sha512-arm-neon-y)
35blake2s-arm-y   := blake2s-shash.o
36libblake2s-arm-y:= blake2s-core.o blake2s-glue.o
37blake2b-neon-y  := blake2b-neon-core.o blake2b-neon-glue.o
38sha1-arm-ce-y	:= sha1-ce-core.o sha1-ce-glue.o
39sha2-arm-ce-y	:= sha2-ce-core.o sha2-ce-glue.o
40aes-arm-ce-y	:= aes-ce-core.o aes-ce-glue.o
41ghash-arm-ce-y	:= ghash-ce-core.o ghash-ce-glue.o
42crct10dif-arm-ce-y	:= crct10dif-ce-core.o crct10dif-ce-glue.o
43crc32-arm-ce-y:= crc32-ce-core.o crc32-ce-glue.o
44chacha-neon-y := chacha-scalar-core.o chacha-glue.o
45chacha-neon-$(CONFIG_KERNEL_MODE_NEON) += chacha-neon-core.o
46poly1305-arm-y := poly1305-core.o poly1305-glue.o
47nhpoly1305-neon-y := nh-neon-core.o nhpoly1305-neon-glue.o
48curve25519-neon-y := curve25519-core.o curve25519-glue.o
49
50quiet_cmd_perl = PERL    $@
51      cmd_perl = $(PERL) $(<) > $(@)
52
53$(obj)/%-core.S: $(src)/%-armv4.pl
54	$(call cmd,perl)
55
56clean-files += poly1305-core.S sha256-core.S sha512-core.S
57
58# massage the perlasm code a bit so we only get the NEON routine if we need it
59poly1305-aflags-$(CONFIG_CPU_V7) := -U__LINUX_ARM_ARCH__ -D__LINUX_ARM_ARCH__=5
60poly1305-aflags-$(CONFIG_KERNEL_MODE_NEON) := -U__LINUX_ARM_ARCH__ -D__LINUX_ARM_ARCH__=7
61AFLAGS_poly1305-core.o += $(poly1305-aflags-y)
62