[PATCH] xtensa: Removed local copy of zlib and fixed O= support
[linux-2.6.git] / arch / xtensa / boot / lib / Makefile
index c0a74dc3a0dfa2510ff2391903b2d2db0a9f7b92..9e73bb8aeb7affb3216c8eb16b8f617f15874781 100644 (file)
@@ -2,5 +2,16 @@
 # Makefile for some libs needed by zImage.
 #
 
+zlib   := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c
 
-lib-y := zlib.o zmem.o
+lib-y  += $(zlib:.c=.o) zmem.o
+
+EXTRA_CFLAGS   += -Ilib/zlib_inflate
+
+quiet_cmd_copy_zlib = COPY    $@
+      cmd_copy_zlib = cat $< > $@
+
+$(addprefix $(obj)/,$(zlib)): $(obj)/%: $(srctree)/lib/zlib_inflate/%
+       $(call cmd,copy_zlib)
+
+clean-files    := $(zlib)