14f5c019fSRod Vagg{
24f5c019fSRod Vagg  'targets': [{
34f5c019fSRod Vagg    'target_name': 'couchbase_impl',
452ff7e0dSBrett Lawson    'variables': {
552ff7e0dSBrett Lawson      'couchbase_root%': ''
652ff7e0dSBrett Lawson    },
752ff7e0dSBrett Lawson    'defines': [
8f731cff1SBrett Lawson      'LCBUV_EMBEDDED_SOURCE',
9f731cff1SBrett Lawson      'LCB_TRACING'
1052ff7e0dSBrett Lawson    ],
114f5c019fSRod Vagg    'conditions': [
1252ff7e0dSBrett Lawson      [ 'couchbase_root==""', {
1352ff7e0dSBrett Lawson        'defines': [
1452ff7e0dSBrett Lawson          'LIBCOUCHBASE_STATIC'
154f5c019fSRod Vagg        ],
1652ff7e0dSBrett Lawson        'dependencies': [
1752ff7e0dSBrett Lawson          'deps/lcb/libcouchbase.gyp:couchbase'
1852ff7e0dSBrett Lawson        ]
1952ff7e0dSBrett Lawson      }, {
2052ff7e0dSBrett Lawson        'conditions': [
2152ff7e0dSBrett Lawson          [ 'OS=="win"', {
2252ff7e0dSBrett Lawson            'include_dirs': [
2352ff7e0dSBrett Lawson              '<(couchbase_root)/include/'
2452ff7e0dSBrett Lawson            ],
2552ff7e0dSBrett Lawson            'link_settings': {
2652ff7e0dSBrett Lawson              'libraries': [
2752ff7e0dSBrett Lawson                '-l<(couchbase_root)/lib/libcouchbase.lib'
2852ff7e0dSBrett Lawson              ]
2952ff7e0dSBrett Lawson            },
3052ff7e0dSBrett Lawson            'copies': [
3152ff7e0dSBrett Lawson              {
3252ff7e0dSBrett Lawson                'files': [ '<(couchbase_root)/bin/libcouchbase.dll' ],
3352ff7e0dSBrett Lawson                'destination': '<(module_root_dir)/build/Release/'
3452ff7e0dSBrett Lawson              },{
3552ff7e0dSBrett Lawson                'files': [ '<(couchbase_root)/bin/libcouchbase.dll' ],
3652ff7e0dSBrett Lawson                'destination': '<(module_root_dir)/build/Debug/'
3752ff7e0dSBrett Lawson              }
3852ff7e0dSBrett Lawson            ],
3952ff7e0dSBrett Lawson          }, {
4052ff7e0dSBrett Lawson            'link_settings': {
4152ff7e0dSBrett Lawson              'libraries': [
4252ff7e0dSBrett Lawson                '-lcouchbase',
4352ff7e0dSBrett Lawson              ],
4452ff7e0dSBrett Lawson            },
4552ff7e0dSBrett Lawson            'include_dirs': [ '<(couchbase_root)/include' ],
4652ff7e0dSBrett Lawson            'libraries+': [ '-L<(couchbase_root)/lib' ],
4752ff7e0dSBrett Lawson            'conditions': [ [ 'OS!="mac"', {'libraries+':['-Wl,-rpath=<(couchbase_root)/lib']} ] ]
4852ff7e0dSBrett Lawson          }]
4952ff7e0dSBrett Lawson        ]
5052ff7e0dSBrett Lawson      }],
514f5c019fSRod Vagg      ['OS!="win"', {
524f5c019fSRod Vagg        'link_settings': {
534f5c019fSRod Vagg          'libraries': [
5452ff7e0dSBrett Lawson            '$(EXTRA_LDFLAGS)'
554f5c019fSRod Vagg          ],
564f5c019fSRod Vagg        },
574f5c019fSRod Vagg        'cflags': [
584f5c019fSRod Vagg          '-g',
594f5c019fSRod Vagg          '-fPIC',
60c199f46aSTrond Norbye          '-Wall',
61c199f46aSTrond Norbye          '-Wextra',
624f5c019fSRod Vagg          '$(EXTRA_CFLAGS)',
634f5c019fSRod Vagg          '$(EXTRA_CPPFLAGS)',
644f5c019fSRod Vagg          '$(EXTRA_CXXFLAGS)',
654f5c019fSRod Vagg        ],
66c199f46aSTrond Norbye        'cflags_c':[
67c199f46aSTrond Norbye          '-pedantic',
68c199f46aSTrond Norbye          '-std=gnu99',
6952ff7e0dSBrett Lawson        ]
7060ea65d1SMark Nunberg      }]
714f5c019fSRod Vagg    ],
724f5c019fSRod Vagg    'sources': [
73fab72700SBrett Lawson      'src/binding.cpp',
74fab72700SBrett Lawson      'src/cas.cpp',
75fab72700SBrett Lawson      'src/connection_callbacks.cpp',
76fab72700SBrett Lawson      'src/connection_ops.cpp',
77fab72700SBrett Lawson      'src/connection.cpp',
78fab72700SBrett Lawson      'src/constants.cpp',
79fab72700SBrett Lawson      'src/error.cpp',
80fab72700SBrett Lawson      'src/lcbx.cpp',
81fab72700SBrett Lawson      'src/logger.cpp',
82fab72700SBrett Lawson      'src/mutationtoken.cpp',
83fab72700SBrett Lawson      'src/opbuilder.cpp',
84fab72700SBrett Lawson      'src/uv-plugin-all.cpp'
854f5c019fSRod Vagg    ],
864f5c019fSRod Vagg    'include_dirs': [
87fab72700SBrett Lawson      '<!(node -e "require(\'nan\')")'
8852ff7e0dSBrett Lawson    ]
894f5c019fSRod Vagg  }]
904f5c019fSRod Vagg}
91