summaryrefslogtreecommitdiffstats
path: root/kernel/arch/xtensa/boot/lib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/xtensa/boot/lib/Makefile')
-rw-r--r--kernel/arch/xtensa/boot/lib/Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/kernel/arch/xtensa/boot/lib/Makefile b/kernel/arch/xtensa/boot/lib/Makefile
new file mode 100644
index 000000000..6868f2ca6
--- /dev/null
+++ b/kernel/arch/xtensa/boot/lib/Makefile
@@ -0,0 +1,24 @@
+#
+# Makefile for some libs needed by zImage.
+#
+
+zlib := inffast.c inflate.c inftrees.c
+
+lib-y += $(zlib:.c=.o) zmem.o
+
+ccflags-y := -Ilib/zlib_inflate
+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
+
+
+quiet_cmd_copy_zlib = COPY $@
+ cmd_copy_zlib = cat $< > $@
+
+$(addprefix $(obj)/,$(zlib)): $(obj)/%: $(srctree)/lib/zlib_inflate/%
+ $(call cmd,copy_zlib)
+
+clean-files := $(zlib)