Home | History | Annotate | Download | only in libwebp
      1 # Copyright (c) 2012 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   'targets': [
      7     {
      8       'target_name': 'libwebp_dec',
      9       'type': 'static_library',
     10       'dependencies' : [
     11         'libwebp_dsp',
     12         'libwebp_dsp_neon',
     13         'libwebp_utils',
     14       ],
     15       'include_dirs': ['.'],
     16       'sources': [
     17         'dec/alpha.c',
     18         'dec/buffer.c',
     19         'dec/frame.c',
     20         'dec/idec.c',
     21         'dec/io.c',
     22         'dec/layer.c',
     23         'dec/quant.c',
     24         'dec/tree.c',
     25         'dec/vp8.c',
     26         'dec/vp8l.c',
     27         'dec/webp.c',
     28       ],
     29     },
     30     {
     31       'target_name': 'libwebp_demux',
     32       'type': 'static_library',
     33       'include_dirs': ['.'],
     34       'sources': [
     35         'demux/demux.c',
     36       ],
     37     },
     38     {
     39       'target_name': 'libwebp_dsp',
     40       'type': 'static_library',
     41       'include_dirs': ['.'],
     42       'sources': [
     43         'dsp/cpu.c',
     44         'dsp/dec.c',
     45         'dsp/dec_sse2.c',
     46         'dsp/enc.c',
     47         'dsp/enc_sse2.c',
     48         'dsp/lossless.c',
     49         'dsp/upsampling.c',
     50         'dsp/upsampling_sse2.c',
     51         'dsp/yuv.c',
     52       ],
     53       'conditions': [
     54         ['OS == "android"', {
     55           'includes': [ '../../build/android/cpufeatures.gypi' ],
     56         }],
     57         ['order_profiling != 0', {
     58           'target_conditions' : [
     59             ['_toolset=="target"', {
     60               'cflags!': [ '-finstrument-functions' ],
     61             }],
     62           ],
     63         }],
     64       ],
     65     },
     66     {
     67       'target_name': 'libwebp_dsp_neon',
     68       'conditions': [
     69         ['target_arch == "arm" and arm_version >= 7', {
     70           'type': 'static_library',
     71           'include_dirs': ['.'],
     72           'sources': [
     73             'dsp/dec_neon.c',
     74             'dsp/enc_neon.c',
     75             'dsp/upsampling_neon.c',
     76           ],
     77           # behavior similar to *.c.neon in an Android.mk
     78           'cflags!': [ '-mfpu=vfpv3-d16' ],
     79           'cflags': [ '-mfpu=neon' ],
     80         },{  # "target_arch != "arm" or arm_version < 7"
     81           'type': 'none',
     82         }],
     83         ['order_profiling != 0', {
     84           'target_conditions' : [
     85             ['_toolset=="target"', {
     86               'cflags!': [ '-finstrument-functions' ],
     87             }],
     88           ],
     89         }],
     90       ],
     91     },
     92     {
     93       'target_name': 'libwebp_enc',
     94       'type': 'static_library',
     95       'include_dirs': ['.'],
     96       'sources': [
     97         'enc/alpha.c',
     98         'enc/analysis.c',
     99         'enc/backward_references.c',
    100         'enc/config.c',
    101         'enc/cost.c',
    102         'enc/filter.c',
    103         'enc/frame.c',
    104         'enc/histogram.c',
    105         'enc/iterator.c',
    106         'enc/layer.c',
    107         'enc/picture.c',
    108         'enc/quant.c',
    109         'enc/syntax.c',
    110         'enc/token.c',
    111         'enc/tree.c',
    112         'enc/vp8l.c',
    113         'enc/webpenc.c',
    114       ],
    115     },
    116     {
    117       'target_name': 'libwebp_utils',
    118       'type': 'static_library',
    119       'include_dirs': ['.'],
    120       'sources': [
    121         'utils/bit_reader.c',
    122         'utils/bit_writer.c',
    123         'utils/color_cache.c',
    124         'utils/filters.c',
    125         'utils/huffman.c',
    126         'utils/huffman_encode.c',
    127         'utils/quant_levels.c',
    128         'utils/quant_levels_dec.c',
    129         'utils/rescaler.c',
    130         'utils/thread.c',
    131         'utils/utils.c',
    132       ],
    133     },
    134     {
    135       'target_name': 'libwebp',
    136       'type': 'none',
    137       'dependencies' : [
    138         'libwebp_dec',
    139         'libwebp_demux',
    140         'libwebp_dsp',
    141         'libwebp_dsp_neon',
    142         'libwebp_enc',
    143         'libwebp_utils',
    144       ],
    145       'direct_dependent_settings': {
    146         'include_dirs': ['.'],
    147       },
    148       'conditions': [
    149         ['OS!="win"', {'product_name': 'webp'}],
    150       ],
    151     },
    152   ],
    153 }
    154