19e5787d2SMatt Macy# $FreeBSD$ 29e5787d2SMatt Macy 39e5787d2SMatt Macy.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp 49e5787d2SMatt Macy 5*b5fc9e35SEmmanuel VadotPACKAGE= utilities 69e5787d2SMatt MacyLIB= icp_rescue 79e5787d2SMatt MacyLIBADD= 89e5787d2SMatt Macy 99e5787d2SMatt Macy 109e5787d2SMatt Macy.if ${MACHINE_ARCH} == "amd64" 119e5787d2SMatt MacyASM_SOURCES_C = asm-x86_64/aes/aeskey.c 129e5787d2SMatt MacyASM_SOURCES_AS = \ 139e5787d2SMatt Macy asm-x86_64/aes/aes_amd64.S \ 149e5787d2SMatt Macy asm-x86_64/aes/aes_aesni.S \ 159e5787d2SMatt Macy asm-x86_64/modes/gcm_pclmulqdq.S \ 169e5787d2SMatt Macy asm-x86_64/modes/aesni-gcm-x86_64.S \ 179e5787d2SMatt Macy asm-x86_64/sha1/sha1-x86_64.S \ 189e5787d2SMatt Macy asm-x86_64/sha2/sha256_impl.S \ 199e5787d2SMatt Macy asm-x86_64/sha2/sha512_impl.S 209e5787d2SMatt Macy 219e5787d2SMatt MacyCFLAGS+= -D__amd64 -D_SYS_STACK_H 229e5787d2SMatt Macy.else 239e5787d2SMatt MacyASM_SOURCES_C = 249e5787d2SMatt MacyASM_SOURCES_AS = 259e5787d2SMatt Macy.endif 269e5787d2SMatt Macy 279e5787d2SMatt Macy 289e5787d2SMatt MacyKERNEL_C = \ 299e5787d2SMatt Macy spi/kcf_spi.c \ 309e5787d2SMatt Macy api/kcf_ctxops.c \ 319e5787d2SMatt Macy api/kcf_digest.c \ 329e5787d2SMatt Macy api/kcf_cipher.c \ 339e5787d2SMatt Macy api/kcf_miscapi.c \ 349e5787d2SMatt Macy api/kcf_mac.c \ 359e5787d2SMatt Macy algs/aes/aes_impl_aesni.c \ 369e5787d2SMatt Macy algs/aes/aes_impl_generic.c \ 379e5787d2SMatt Macy algs/aes/aes_impl_x86-64.c \ 389e5787d2SMatt Macy algs/aes/aes_impl.c \ 399e5787d2SMatt Macy algs/aes/aes_modes.c \ 409e5787d2SMatt Macy algs/edonr/edonr.c \ 419e5787d2SMatt Macy algs/modes/modes.c \ 429e5787d2SMatt Macy algs/modes/cbc.c \ 439e5787d2SMatt Macy algs/modes/gcm_generic.c \ 449e5787d2SMatt Macy algs/modes/gcm_pclmulqdq.c \ 459e5787d2SMatt Macy algs/modes/gcm.c \ 469e5787d2SMatt Macy algs/modes/ctr.c \ 479e5787d2SMatt Macy algs/modes/ccm.c \ 489e5787d2SMatt Macy algs/modes/ecb.c \ 499e5787d2SMatt Macy algs/sha1/sha1.c \ 509e5787d2SMatt Macy algs/sha2/sha2.c \ 519e5787d2SMatt Macy algs/skein/skein_block.c \ 529e5787d2SMatt Macy illumos-crypto.c \ 539e5787d2SMatt Macy io/aes.c \ 549e5787d2SMatt Macy io/edonr_mod.c \ 559e5787d2SMatt Macy io/sha1_mod.c \ 569e5787d2SMatt Macy io/sha2_mod.c \ 579e5787d2SMatt Macy io/skein_mod.c \ 589e5787d2SMatt Macy os/modhash.c \ 599e5787d2SMatt Macy os/modconf.c \ 609e5787d2SMatt Macy core/kcf_sched.c \ 619e5787d2SMatt Macy core/kcf_prov_lib.c \ 629e5787d2SMatt Macy core/kcf_callprov.c \ 639e5787d2SMatt Macy core/kcf_mech_tabs.c \ 649e5787d2SMatt Macy core/kcf_prov_tabs.c \ 659e5787d2SMatt Macy $(ASM_SOURCES_C) 669e5787d2SMatt Macy 679e5787d2SMatt Macy 689e5787d2SMatt Macy 699e5787d2SMatt Macy 709e5787d2SMatt Macy 719e5787d2SMatt Macy 729e5787d2SMatt MacySRCS= $(ASM_SOURCES_AS) $(KERNEL_C) 739e5787d2SMatt Macy 749e5787d2SMatt MacyWARNS?= 2 759e5787d2SMatt MacySHLIB_MAJOR= 3 769e5787d2SMatt MacyCSTD= c99 779e5787d2SMatt MacyCFLAGS+= -DIN_BASE 789e5787d2SMatt MacyCFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include 799e5787d2SMatt MacyCFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ 809e5787d2SMatt MacyCFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd 819e5787d2SMatt MacyCFLAGS+= -I${SRCTOP}/sys 829e5787d2SMatt MacyCFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include 839e5787d2SMatt MacyCFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include 849e5787d2SMatt MacyCFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h 859e5787d2SMatt MacyCFLAGS+= -DHAVE_ISSETUGID -UHAVE_AVX -DRESCUE 869e5787d2SMatt MacyCFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h 879e5787d2SMatt Macy 889e5787d2SMatt Macy 899e5787d2SMatt MacyCFLAGS.aes_amd64.S+= -DLOCORE 909e5787d2SMatt MacyCFLAGS.aes_aesni.S+= -DLOCORE 919e5787d2SMatt MacyCFLAGS.gcm_pclmulqdq.S+= -DLOCORE 929e5787d2SMatt MacyCFLAGS.aesni-gcm-x86_64.S+= -DLOCORE 939e5787d2SMatt MacyCFLAGS.ghash-x86_64.S+= -DLOCORE 949e5787d2SMatt MacyCFLAGS.sha1-x86_64.S+= -DLOCORE 959e5787d2SMatt MacyCFLAGS.sha256_impl.S+= -DLOCORE 969e5787d2SMatt MacyCFLAGS.sha512_impl.S+= -DLOCORE 979e5787d2SMatt MacyCFLAGS.gcm.c+= -UCAN_USE_GCM_ASM 989e5787d2SMatt Macy 999e5787d2SMatt Macy.include <bsd.lib.mk> 100