Makefile 2.0 KB
Newer Older
1 2 3 4 5
#
# Arch-specific CryptoAPI modules.
#

obj-$(CONFIG_CRYPTO_AES_ARM) += aes-arm.o
6
obj-$(CONFIG_CRYPTO_AES_ARM_BS) += aes-arm-bs.o
7
obj-$(CONFIG_CRYPTO_SHA1_ARM) += sha1-arm.o
8
obj-$(CONFIG_CRYPTO_SHA1_ARM_NEON) += sha1-arm-neon.o
9
obj-$(CONFIG_CRYPTO_SHA256_ARM) += sha256-arm.o
10
obj-$(CONFIG_CRYPTO_SHA512_ARM) += sha512-arm.o
11 12 13 14 15

ce-obj-$(CONFIG_CRYPTO_AES_ARM_CE) += aes-arm-ce.o
ce-obj-$(CONFIG_CRYPTO_SHA1_ARM_CE) += sha1-arm-ce.o
ce-obj-$(CONFIG_CRYPTO_SHA2_ARM_CE) += sha2-arm-ce.o
ce-obj-$(CONFIG_CRYPTO_GHASH_ARM_CE) += ghash-arm-ce.o
16
ce-obj-$(CONFIG_CRYPTO_CRCT10DIF_ARM_CE) += crct10dif-arm-ce.o
17
ce-obj-$(CONFIG_CRYPTO_CRC32_ARM_CE) += crc32-arm-ce.o
18 19 20 21 22 23 24 25 26 27

ifneq ($(ce-obj-y)$(ce-obj-m),)
ifeq ($(call as-instr,.fpu crypto-neon-fp-armv8,y,n),y)
obj-y += $(ce-obj-y)
obj-m += $(ce-obj-m)
else
$(warning These ARMv8 Crypto Extensions modules need binutils 2.23 or higher)
$(warning $(ce-obj-y) $(ce-obj-m))
endif
endif
28

29 30 31
aes-arm-y	:= aes-armv4.o aes_glue.o
aes-arm-bs-y	:= aesbs-core.o aesbs-glue.o
sha1-arm-y	:= sha1-armv4-large.o sha1_glue.o
32
sha1-arm-neon-y	:= sha1-armv7-neon.o sha1_neon_glue.o
33 34
sha256-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha256_neon_glue.o
sha256-arm-y	:= sha256-core.o sha256_glue.o $(sha256-arm-neon-y)
35 36
sha512-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha512-neon-glue.o
sha512-arm-y	:= sha512-core.o sha512-glue.o $(sha512-arm-neon-y)
37
sha1-arm-ce-y	:= sha1-ce-core.o sha1-ce-glue.o
38
sha2-arm-ce-y	:= sha2-ce-core.o sha2-ce-glue.o
39
aes-arm-ce-y	:= aes-ce-core.o aes-ce-glue.o
40
ghash-arm-ce-y	:= ghash-ce-core.o ghash-ce-glue.o
41
crct10dif-arm-ce-y	:= crct10dif-ce-core.o crct10dif-ce-glue.o
42
crc32-arm-ce-y:= crc32-ce-core.o crc32-ce-glue.o
43 44 45 46 47 48 49

quiet_cmd_perl = PERL    $@
      cmd_perl = $(PERL) $(<) > $(@)

$(src)/aesbs-core.S_shipped: $(src)/bsaes-armv7.pl
	$(call cmd,perl)

50 51 52
$(src)/sha256-core.S_shipped: $(src)/sha256-armv4.pl
	$(call cmd,perl)

53 54 55 56
$(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl
	$(call cmd,perl)

.PRECIOUS: $(obj)/aesbs-core.S $(obj)/sha256-core.S $(obj)/sha512-core.S