Skip to content

Commit

Permalink
Use explicit source list
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Parente committed Oct 18, 2017
1 parent adf73ea commit 1c5eada
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 112 deletions.
13 changes: 12 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,18 @@
"targets": [
{
"target_name": "node-librdkafka",
"sources": [ "<!@(ls -1 src/*.cc)", ],
'sources': [
'src/binding.cc',
'src/callbacks.cc',
'src/common.cc',
'src/config.cc',
'src/connection.cc',
'src/errors.cc',
'src/kafka-consumer.cc',
'src/producer.cc',
'src/topic.cc',
'src/workers.cc'
],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"<(module_root_dir)/"
Expand Down
219 changes: 108 additions & 111 deletions deps/librdkafka.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -111,146 +111,143 @@
},
{
"target_name": "librdkafka",
"type": "static_library",
'defines': [
'HAVE_CONFIG_H'
],
"include_dirs": [
"librdkafka/src"
],
'cflags': [
'-Wunused-function',
'-Wformat',
'-Wimplicit-function-declaration'
],
"conditions": [
'conditions': [
[
'OS=="linux"',
'OS!="win"',
{
'cflags!': [
"type": "static_library",
'defines': [
'HAVE_CONFIG_H'
],
'cflags' : [
'-Wno-type-limits',
'-Wno-unused-function',
'-Wno-maybe-uninitialized',
'-Wno-sign-compare',
'-Wno-missing-field-initializers',
'-Wno-empty-body',
'-Wno-old-style-declaration',
"include_dirs": [
"librdkafka/src"
],
"dependencies": [
"librdkafka_config"
]
}
],
[
'OS=="mac"',
{
'xcode_settings': {
'OTHER_CFLAGS' : [
'-Wno-sign-compare',
'-Wno-missing-field-initializers',
'-ObjC',
'-Wno-implicit-function-declaration',
'-Wno-unused-function',
'-Wno-format'
'cflags': [
'-Wunused-function',
'-Wformat',
'-Wimplicit-function-declaration'
],
"conditions": [
[
'OS=="linux"',
{
'cflags!': [
],
'cflags' : [
'-Wno-type-limits',
'-Wno-unused-function',
'-Wno-maybe-uninitialized',
'-Wno-sign-compare',
'-Wno-missing-field-initializers',
'-Wno-empty-body',
'-Wno-old-style-declaration',
],
"dependencies": [
"librdkafka_config"
]
}
],
'OTHER_LDFLAGS': [],
'MACOSX_DEPLOYMENT_TARGET': '10.11',
'libraries' : ['-lz']
},
"dependencies": [
"librdkafka_config"
]
}
],
[
'OS=="win"',
{
'msvs_settings': {
'VCLinkerTool': {
'SetChecksum': 'true'
}
},
}
],
[ 'OS!="win" and <(with_lz4)==1',
{
'libraries' : ['-llz4'],
'conditions': [
[ 'OS=="mac"',
[
'OS=="mac"',
{
'xcode_settings': {
'libraries' : ['-llz4']
}
'OTHER_CFLAGS' : [
'-Wno-sign-compare',
'-Wno-missing-field-initializers',
'-ObjC',
'-Wno-implicit-function-declaration',
'-Wno-unused-function',
'-Wno-format'
],
'OTHER_LDFLAGS': [],
'MACOSX_DEPLOYMENT_TARGET': '10.11',
'libraries' : ['-lz']
},
"dependencies": [
"librdkafka_config"
]
}
],
]
}
],
[ 'OS!="win" and <(with_sasl)==1',
{
'sources': [
'<!@(find librdkafka/src -name rdkafka_sasl*.c ! -name rdkafka_sasl_win32*.c )'
],
'libraries' : ['-lsasl2'],
'conditions': [
[ 'OS=="mac"',
[ '<(with_lz4)==1',
{
'xcode_settings': {
'libraries' : ['-lsasl2']
}
'libraries' : ['-llz4'],
'conditions': [
[ 'OS=="mac"',
{
'xcode_settings': {
'libraries' : ['-llz4']
}
}
],
]
}
],
]
}
],
[ 'OS=="win" and <(with_sasl)==1',
{
[ '<(with_sasl)==1',
{
'sources': [
'<!@(find librdkafka/src -name rdkafka_sasl*.c ! -name rdkafka_sasl_win32*.c )'
],
'libraries' : ['-lsasl2'],
'conditions': [
[ 'OS=="mac"',
{
'xcode_settings': {
'libraries' : ['-lsasl2']
}
}
],
]
}
]
],
'sources': [
'<!@(find librdkafka/src -name rdkafka_sasl*.c ! -name rdkafka_sasl_cyrus*.c )'
]
'<!@(find librdkafka/src -name *.c ! -name rdkafka_sasl* )'
],
'cflags!': [ '-fno-rtti' ],
}
]
],
'sources': [
'<!@(find librdkafka/src -name *.c ! -name rdkafka_sasl* )'
],
'cflags!': [ '-fno-rtti' ],
]
},
{
"target_name": "librdkafka_config",
"type": "none",
"actions": [
{
'action_name': 'configure_librdkafka',
'message': 'configuring librdkafka...',
'inputs': [
'librdkafka/configure',
],
'outputs': [
'librdkafka/config.h',
],
"conditions": [
[ 'OS!="win"',
'conditions': [
[
'OS!="win"',
{
"actions": [
{
'action_name': 'configure_librdkafka',
'message': 'configuring librdkafka...',
'inputs': [
'librdkafka/configure',
],
'outputs': [
'librdkafka/config.h',
],
"conditions": [
[ "<(with_sasl)==1",
[ 'OS!="win"',
{
'action': ['eval', 'cd librdkafka && chmod a+x ./configure && ./configure']
"conditions": [
[ "<(with_sasl)==1",
{
'action': ['eval', 'cd librdkafka && chmod a+x ./configure && ./configure']
},
{
'action': ['eval', 'cd librdkafka && chmod a+x ./configure && ./configure --disable-sasl']
}
]
]
},
{
'action': ['eval', 'cd librdkafka && chmod a+x ./configure && ./configure --disable-sasl']
'action': ['echo']
}
]
]
},
{
'action': ['echo']
}
]
]
}
}
]
]
}
]
Expand Down

0 comments on commit 1c5eada

Please sign in to comment.