-
Notifications
You must be signed in to change notification settings - Fork 9
/
binding.gyp
84 lines (83 loc) · 2.59 KB
/
binding.gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
'targets': [
{
'target_name': 'webcl',
'defines': [
'VERSION=0.9.1',
# 'LOGGING'
],
'sources': [
'src/bindings.cc',
'src/cl_checks.cc',
'src/commandqueue.cc',
'src/context.cc',
'src/device.cc',
'src/event.cc',
'src/exceptions.cc',
'src/kernel.cc',
'src/memoryobject.cc',
'src/platform.cc',
'src/program.cc',
'src/sampler.cc',
'src/webcl.cc',
'src/manager.cc',
],
'include_dirs' : [
"<!(node -e \"require('nan')\")",
],
'conditions': [
['OS=="mac"', {
'make_global_settings': [
['CC', '/usr/bin/clang'],
['CXX', '/usr/bin/clang++'],
],
"xcode_settings": {
'OTHER_CPLUSPLUSFLAGS' : ['-std=c++11','-stdlib=libc++'],
'OTHER_LDFLAGS': ['-stdlib=libc++'],
'MACOSX_DEPLOYMENT_TARGET': '10.7'
},
'libraries': ['-framework OpenGL', '-framework OpenCL']
}],
['OS=="linux"', {'libraries': ['-lGL', '-lOpenCL']}],
['OS=="win"', {
'variables' :
{
# AMD APP SDK
'AMD_OPENCL_SDK' : '<!(echo %AMDAPPSDKROOT%)',
'AMD_OPENCL_SDK_INCLUDE' : '<(AMD_OPENCL_SDK)\\include',
'AMD_OPENCL_SDK_LIB' : '<(AMD_OPENCL_SDK)\\lib\\x86_64',
# Intel OpenCL SDK
'INTEL_OPENCL_SDK' : '<!(echo %INTELOCLSDKROOT%)',
'INTEL_OPENCL_SDK_INCLUDE' : '<(INTEL_OPENCL_SDK)\\include',
'INTEL_OPENCL_SDK_LIB' : '<(INTEL_OPENCL_SDK)\\lib\\x64',
},
'include_dirs' : [
"<(AMD_OPENCL_SDK_INCLUDE)", "<(INTEL_OPENCL_SDK_INCLUDE)"
],
'library_dirs' : [
"<(AMD_OPENCL_SDK_LIB)", "<(INTEL_OPENCL_SDK_LIB)"
],
'defines' : [
'WIN32_LEAN_AND_MEAN',
'VC_EXTRALEAN',
],
'msvs_settings' : {
'VCCLCompilerTool' : {
'AdditionalOptions' : ['/O2','/Oy','/GL','/GF','/Gm-','/EHsc','/MT','/GS','/Gy','/GR-','/Gd']
},
'VCLinkerTool' : {
'AdditionalOptions' : ['/OPT:REF','/OPT:ICF','/LTCG']
},
},
'cflags' : [
'/O2','/Oy','/GL','/GF','/Gm-','/EHsc','/MT','/GS','/Gy','/GR-','/Gd'
],
'ldflags' : [
'/OPT:REF','/OPT:ICF','/LTCG'
],
'libraries': ['opengl32.lib', 'OpenCL.lib'],
},
],
]
}]
}