1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 24bedea94SChris Zankel# 34bedea94SChris Zankel# Makefile for some libs needed by zImage. 44bedea94SChris Zankel# 54bedea94SChris Zankel 64f3865fbSRichard Purdiezlib := inffast.c inflate.c inftrees.c 74bedea94SChris Zankel 8e7d163f7SChris Zankellib-y += $(zlib:.c=.o) zmem.o 9e7d163f7SChris Zankel 109cc342f6SMasahiro Yamadaccflags-y := -I $(srctree)/lib/zlib_inflate 11478ba61aSMax Filippovifdef CONFIG_FUNCTION_TRACER 12478ba61aSMax FilippovCFLAGS_REMOVE_inflate.o = -pg 13478ba61aSMax FilippovCFLAGS_REMOVE_zmem.o = -pg 14478ba61aSMax FilippovCFLAGS_REMOVE_inftrees.o = -pg 15478ba61aSMax FilippovCFLAGS_REMOVE_inffast.o = -pg 16478ba61aSMax Filippovendif 17478ba61aSMax Filippov 18c633544aSMax FilippovKASAN_SANITIZE := n 19725aea87SMax FilippovKCSAN_SANITIZE := n 20c49731a0SMax FilippovKCOV_INSTRUMENT := n 21*0847d167SMax FilippovGCOV_PROFILE := n 22c633544aSMax Filippov 2340d1a07bSMax FilippovCFLAGS_REMOVE_inflate.o += -fstack-protector -fstack-protector-strong 2440d1a07bSMax FilippovCFLAGS_REMOVE_zmem.o += -fstack-protector -fstack-protector-strong 2540d1a07bSMax FilippovCFLAGS_REMOVE_inftrees.o += -fstack-protector -fstack-protector-strong 2640d1a07bSMax FilippovCFLAGS_REMOVE_inffast.o += -fstack-protector -fstack-protector-strong 27e7d163f7SChris Zankel 28e7d163f7SChris Zankelquiet_cmd_copy_zlib = COPY $@ 29e7d163f7SChris Zankel cmd_copy_zlib = cat $< > $@ 30e7d163f7SChris Zankel 31e7d163f7SChris Zankel$(addprefix $(obj)/,$(zlib)): $(obj)/%: $(srctree)/lib/zlib_inflate/% 32e7d163f7SChris Zankel $(call cmd,copy_zlib) 33e7d163f7SChris Zankel 34e7d163f7SChris Zankelclean-files := $(zlib) 35