deps: update zlib.gyp for zlib 1.2.8
[platform/upstream/nodejs.git] / deps / zlib / zlib.gyp
1 # Copyright (c) 2009 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.
4
5 {
6   'variables': {
7     'use_system_zlib%': 0
8   },
9   'conditions': [
10     ['use_system_zlib==0', {
11       'targets': [
12         {
13           'target_name': 'zlib',
14           'type': 'static_library',
15           'sources': [
16             'contrib/minizip/ioapi.c',
17             'contrib/minizip/ioapi.h',
18             'contrib/minizip/iowin32.c',
19             'contrib/minizip/iowin32.h',
20             'contrib/minizip/unzip.c',
21             'contrib/minizip/unzip.h',
22             'contrib/minizip/zip.c',
23             'contrib/minizip/zip.h',
24             'adler32.c',
25             'compress.c',
26             'crc32.c',
27             'crc32.h',
28             'deflate.c',
29             'deflate.h',
30             'gzclose.c',
31             'gzguts.h',
32             'gzlib.c',
33             'gzread.c',
34             'gzwrite.c',
35             'infback.c',
36             'inffast.c',
37             'inffast.h',
38             'inffixed.h',
39             'inflate.c',
40             'inflate.h',
41             'inftrees.c',
42             'inftrees.h',
43             'trees.c',
44             'trees.h',
45             'uncompr.c',
46             'zconf.h',
47             'zlib.h',
48             'zutil.c',
49             'zutil.h',
50           ],
51           'include_dirs': [
52             '.',
53             # For contrib/minizip
54             './contrib/minizip',
55           ],
56           'direct_dependent_settings': {
57             'include_dirs': [
58               '.',
59             ],
60           },
61           'conditions': [
62             ['OS!="win"', {
63               'product_name': 'chrome_zlib',
64               'cflags!': [ '-ansi' ],
65               'sources!': [
66                 'contrib/minizip/iowin32.c'
67               ],
68             }],
69             ['OS=="mac" or OS=="ios" or OS=="freebsd" or OS=="android"', {
70               # Mac, Android and the BSDs don't have fopen64, ftello64, or
71               # fseeko64. We use fopen, ftell, and fseek instead on these
72               # systems.
73               'defines': [
74                 'USE_FILE32API'
75               ],
76             }],
77           ],
78         },
79       ],
80     }, {
81       'targets': [
82         {
83           'target_name': 'zlib',
84           'type': 'static_library',
85           'direct_dependent_settings': {
86             'defines': [
87               'USE_SYSTEM_ZLIB',
88             ],
89           },
90           'defines': [
91             'USE_SYSTEM_ZLIB',
92           ],
93           'sources': [
94             'contrib/minizip/ioapi.c',
95             'contrib/minizip/ioapi.h',
96             'contrib/minizip/unzip.c',
97             'contrib/minizip/unzip.h',
98             'contrib/minizip/zip.c',
99             'contrib/minizip/zip.h',
100           ],
101           'link_settings': {
102             'libraries': [
103               '-lz',
104             ],
105           },
106         },
107       ],
108     }],
109   ],
110 }