12c98833aSArd Biesheuvel# 22c98833aSArd Biesheuvel# linux/arch/arm64/crypto/Makefile 32c98833aSArd Biesheuvel# 42c98833aSArd Biesheuvel# Copyright (C) 2014 Linaro Ltd <ard.biesheuvel@linaro.org> 52c98833aSArd Biesheuvel# 62c98833aSArd Biesheuvel# This program is free software; you can redistribute it and/or modify 72c98833aSArd Biesheuvel# it under the terms of the GNU General Public License version 2 as 82c98833aSArd Biesheuvel# published by the Free Software Foundation. 92c98833aSArd Biesheuvel# 102c98833aSArd Biesheuvel 112c98833aSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA1_ARM64_CE) += sha1-ce.o 122c98833aSArd Biesheuvelsha1-ce-y := sha1-ce-glue.o sha1-ce-core.o 136ba6c74dSArd Biesheuvel 146ba6c74dSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA2_ARM64_CE) += sha2-ce.o 156ba6c74dSArd Biesheuvelsha2-ce-y := sha2-ce-glue.o sha2-ce-core.o 16fdd23894SArd Biesheuvel 17fdd23894SArd Biesheuvelobj-$(CONFIG_CRYPTO_GHASH_ARM64_CE) += ghash-ce.o 18fdd23894SArd Biesheuvelghash-ce-y := ghash-ce-glue.o ghash-ce-core.o 19317f2f75SArd Biesheuvel 20317f2f75SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_CE) += aes-ce-cipher.o 21317f2f75SArd BiesheuvelCFLAGS_aes-ce-cipher.o += -march=armv8-a+crypto 22a3fd8210SArd Biesheuvel 23a3fd8210SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_CE_CCM) += aes-ce-ccm.o 24a3fd8210SArd Biesheuvelaes-ce-ccm-y := aes-ce-ccm-glue.o aes-ce-ccm-core.o 2549788fe2SArd Biesheuvel 2649788fe2SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_CE_BLK) += aes-ce-blk.o 2749788fe2SArd Biesheuvelaes-ce-blk-y := aes-glue-ce.o aes-ce.o 2849788fe2SArd Biesheuvel 2949788fe2SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_NEON_BLK) += aes-neon-blk.o 3049788fe2SArd Biesheuvelaes-neon-blk-y := aes-glue-neon.o aes-neon.o 3149788fe2SArd Biesheuvel 32*7918ecefSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA256_ARM64) += sha256-arm64.o 33*7918ecefSArd Biesheuvelsha256-arm64-y := sha256-glue.o sha256-core.o 34*7918ecefSArd Biesheuvel 35*7918ecefSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA512_ARM64) += sha512-arm64.o 36*7918ecefSArd Biesheuvelsha512-arm64-y := sha512-glue.o sha512-core.o 37*7918ecefSArd Biesheuvel 380eee0fbdSArd BiesheuvelAFLAGS_aes-ce.o := -DINTERLEAVE=4 3949788fe2SArd BiesheuvelAFLAGS_aes-neon.o := -DINTERLEAVE=4 4049788fe2SArd Biesheuvel 4149788fe2SArd BiesheuvelCFLAGS_aes-glue-ce.o := -DUSE_V8_CRYPTO_EXTENSIONS 4249788fe2SArd Biesheuvel 43f6f203faSYazen Ghannamobj-$(CONFIG_CRYPTO_CRC32_ARM64) += crc32-arm64.o 44f6f203faSYazen Ghannam 45f6f203faSYazen GhannamCFLAGS_crc32-arm64.o := -mcpu=generic+crc 46f6f203faSYazen Ghannam 4749788fe2SArd Biesheuvel$(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE 487c2105fbSAndreas Schwab $(call if_changed_rule,cc_o_c) 49*7918ecefSArd Biesheuvel 50*7918ecefSArd Biesheuvelquiet_cmd_perlasm = PERLASM $@ 51*7918ecefSArd Biesheuvel cmd_perlasm = $(PERL) $(<) void $(@) 52*7918ecefSArd Biesheuvel 53*7918ecefSArd Biesheuvel$(src)/sha256-core.S_shipped: $(src)/sha512-armv8.pl 54*7918ecefSArd Biesheuvel $(call cmd,perlasm) 55*7918ecefSArd Biesheuvel 56*7918ecefSArd Biesheuvel$(src)/sha512-core.S_shipped: $(src)/sha512-armv8.pl 57*7918ecefSArd Biesheuvel $(call cmd,perlasm) 58*7918ecefSArd Biesheuvel 59*7918ecefSArd Biesheuvel.PRECIOUS: $(obj)/sha256-core.S $(obj)/sha512-core.S 60