Makefile 837 字节
Newer Older
1
# SPDX-License-Identifier: GPL-2.0
2 3 4 5
#
# Makefile for some libs needed by zImage.
#

6
zlib	:= inffast.c inflate.c inftrees.c
7

8 9
lib-y	+= $(zlib:.c=.o) zmem.o

10
ccflags-y	:= -I $(srctree)/lib/zlib_inflate
11 12 13 14 15 16 17
ifdef CONFIG_FUNCTION_TRACER
CFLAGS_REMOVE_inflate.o = -pg
CFLAGS_REMOVE_zmem.o = -pg
CFLAGS_REMOVE_inftrees.o = -pg
CFLAGS_REMOVE_inffast.o = -pg
endif

M
Max Filippov 已提交
18 19
KASAN_SANITIZE := n

M
Max Filippov 已提交
20 21 22 23
CFLAGS_REMOVE_inflate.o += -fstack-protector -fstack-protector-strong
CFLAGS_REMOVE_zmem.o += -fstack-protector -fstack-protector-strong
CFLAGS_REMOVE_inftrees.o += -fstack-protector -fstack-protector-strong
CFLAGS_REMOVE_inffast.o += -fstack-protector -fstack-protector-strong
24 25 26 27 28 29 30 31

quiet_cmd_copy_zlib = COPY    $@
      cmd_copy_zlib = cat $< > $@

$(addprefix $(obj)/,$(zlib)): $(obj)/%: $(srctree)/lib/zlib_inflate/%
	$(call cmd,copy_zlib)

clean-files	:= $(zlib)