lib/crypto/Makefile

Source file repositories/reference/linux-study-clean/lib/crypto/Makefile

File Facts

System
Linux kernel
Corpus path
lib/crypto/Makefile
Extension
[no extension]
Size
12892 bytes
Lines
387
Domain
Kernel Services
Bucket
lib
Inferred role
Kernel Services: build/configuration rule
Status
atlas-only

Why This File Exists

Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0

aflags-thumb2-$(CONFIG_THUMB2_KERNEL)  := -U__thumb2__ -D__thumb2__=1

quiet_cmd_perlasm = PERLASM $@
      cmd_perlasm = $(PERL) $(<) > $(@)

quiet_cmd_perlasm_with_args = PERLASM $@
      cmd_perlasm_with_args = $(PERL) $(<) void $(@)

ppc64-perlasm-flavour-y := linux-ppc64
ppc64-perlasm-flavour-$(CONFIG_PPC64_ELF_ABI_V2) := linux-ppc64-elfv2
ppc64-perlasm-flavour-$(CONFIG_CPU_LITTLE_ENDIAN) := linux-ppc64le

obj-$(CONFIG_KUNIT)				+= tests/

obj-$(CONFIG_CRYPTO_HASH_INFO)			+= hash_info.o

obj-$(CONFIG_CRYPTO_LIB_UTILS)			+= libcryptoutils.o
libcryptoutils-y				:= memneq.o utils.o

################################################################################

obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o
libaes-y := aes.o
ifeq ($(CONFIG_CRYPTO_LIB_AES_ARCH),y)
CFLAGS_aes.o += -I$(src)/$(SRCARCH)

libaes-$(CONFIG_ARM) += arm/aes-cipher-core.o
libaes-$(CONFIG_ARM64) += arm64/aes-cipher-core.o \
			  arm64/aes-ce-core.o \
			  arm64/aes-ce.o \
			  arm64/aes-neon.o

ifeq ($(CONFIG_PPC),y)
ifeq ($(CONFIG_SPE),y)
libaes-y += powerpc/aes-spe-core.o \
	    powerpc/aes-spe-keys.o \
	    powerpc/aes-spe-modes.o \
	    powerpc/aes-tab-4k.o
else
libaes-y += powerpc/aesp8-ppc.o
quiet_cmd_perlasm_aes = PERLASM $@
      cmd_perlasm_aes = $(PERL) $< $(ppc64-perlasm-flavour-y) $@
# Use if_changed instead of cmd, in case the flavour changed.
$(obj)/powerpc/aesp8-ppc.S: $(src)/powerpc/aesp8-ppc.pl FORCE
	$(call if_changed,perlasm_aes)
targets += powerpc/aesp8-ppc.S
OBJECT_FILES_NON_STANDARD_powerpc/aesp8-ppc.o := y
endif # !CONFIG_SPE
endif # CONFIG_PPC

libaes-$(CONFIG_RISCV) += riscv/aes-riscv64-zvkned.o
libaes-$(CONFIG_SPARC) += sparc/aes_asm.o
libaes-$(CONFIG_X86) += x86/aes-aesni.o
endif # CONFIG_CRYPTO_LIB_AES_ARCH

# clean-files must be defined unconditionally
clean-files += powerpc/aesp8-ppc.S

################################################################################

obj-$(CONFIG_CRYPTO_LIB_AESCFB)			+= libaescfb.o
libaescfb-y					:= aescfb.o

obj-$(CONFIG_CRYPTO_LIB_AESGCM)			+= libaesgcm.o
libaesgcm-y					:= aesgcm.o

obj-$(CONFIG_CRYPTO_LIB_ARC4)			+= libarc4.o
libarc4-y					:= arc4.o

Annotation

Implementation Notes