1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 config("zlib_config") {
9 static_library("zlib_x86_simd") {
10 if (cpu_arch == "x86" || cpu_arch == "x64") {
11 sources = [ "crc_folding.c", "fill_window_sse.c" ]
12 cflags = [ "-msse2", "-msse4.2", "-mpclmul" ]
14 sources = [ "simd_stub.c"]
18 static_library("zlib") {
20 # Don't stomp on "libzlib" on other platforms.
21 output_name = "chrome_zlib"
55 if (cpu_arch == "x86" || cpu_arch == "x64") {
56 sources += [ "x86.c" ]
59 configs -= [ "//build/config/compiler:chromium_code" ]
60 configs += [ "//build/config/compiler:no_chromium_code" ]
62 public_configs = [ ":zlib_config" ]
63 deps = [ ":zlib_x86_simd" ]
66 static_library("minizip") {
68 "contrib/minizip/ioapi.c",
69 "contrib/minizip/ioapi.h",
70 "contrib/minizip/iowin32.c",
71 "contrib/minizip/iowin32.h",
72 "contrib/minizip/unzip.c",
73 "contrib/minizip/unzip.h",
74 "contrib/minizip/zip.c",
75 "contrib/minizip/zip.h",
80 "contrib/minizip/iowin32.c",
81 "contrib/minizip/iowin32.h",
84 if (is_mac || is_ios || is_android) {
85 # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We
86 # use fopen, ftell, and fseek instead on these systems.
87 defines = [ "USE_FILE32API" ]
91 # zlib uses `if ((a == b))` for some reason.
92 cflags = [ "-Wno-parentheses-equality" ]
97 configs -= [ "//build/config/compiler:chromium_code" ]
98 configs += [ "//build/config/compiler:no_chromium_code" ]
99 public_configs = [ ":zlib_config" ]
102 static_library("zip") {
106 "google/zip_internal.cc",
107 "google/zip_internal.h",
108 "google/zip_reader.cc",
109 "google/zip_reader.h",