1# SPDX-License-Identifier: GPL-2.0-only 2 3# Makefile for the kernel's cyclic redundancy check (CRC) library code 4 5obj-$(CONFIG_CRC4) += crc4.o 6obj-$(CONFIG_CRC7) += crc7.o 7obj-$(CONFIG_CRC8) += crc8.o 8obj-$(CONFIG_CRC16) += crc16.o 9obj-$(CONFIG_CRC_CCITT) += crc-ccitt.o 10obj-$(CONFIG_CRC_ITU_T) += crc-itu-t.o 11obj-$(CONFIG_CRC_T10DIF) += crc-t10dif.o 12obj-$(CONFIG_CRC32) += crc32.o 13obj-$(CONFIG_CRC64) += crc64.o 14obj-y += tests/ 15 16hostprogs := gen_crc32table gen_crc64table 17clean-files := crc32table.h crc64table.h 18 19$(obj)/crc32.o: $(obj)/crc32table.h 20$(obj)/crc64.o: $(obj)/crc64table.h 21 22quiet_cmd_crc32 = GEN $@ 23 cmd_crc32 = $< > $@ 24 25quiet_cmd_crc64 = GEN $@ 26 cmd_crc64 = $< > $@ 27 28$(obj)/crc32table.h: $(obj)/gen_crc32table 29 $(call cmd,crc32) 30 31$(obj)/crc64table.h: $(obj)/gen_crc64table 32 $(call cmd,crc64) 33