@@ -11,7 +11,6 @@ npyrandom_sources = [
11
11
npyrandom_lib = static_library (' npyrandom' ,
12
12
npyrandom_sources,
13
13
c_args : staticlib_cflags,
14
- # include_directories: '../core/include',
15
14
dependencies : [py_dep, np_core_dep],
16
15
install : true ,
17
16
install_dir : np_dir / ' random/lib' ,
@@ -52,23 +51,26 @@ if host_machine.system() == 'cygwin'
52
51
c_args_random += [' -Wl,--export-all-symbols' ]
53
52
endif
54
53
55
- # name, sources, extra link libs , extra c_args <
8000
/div>
54
+ # name, sources, extra c_args , extra static libs to link
56
55
random_pyx_sources = [
57
- [' _bounded_integers' , _bounded_integers_pyx, [], npymath_lib],
58
- [' _common' , ' _common.pyx' , [], []],
59
- [' _mt19937' , [' _mt19937.pyx' , ' src/mt19937/mt19937.c' , ' src/mt19937/mt19937-jump.c' ], [], []],
60
- [' _philox' , [' _philox.pyx' , ' src/philox/philox.c' ], [], []],
61
- [' _pcg64' , [' _pcg64.pyx' , ' src/pcg64/pcg64.c' ], [' -U__GNUC_GNU_INLINE__' ], []],
62
- [' _sfc64' , [' _sfc64.pyx' , ' src/sfc64/sfc64.c' ], [], []],
63
- [' bit_generator' , ' bit_generator.pyx' , [], []],
56
+ [' _bounded_integers' , _bounded_integers_pyx, [], [npyrandom_lib, npymath_lib]],
57
+ [' _common' , ' _common.pyx' , [], [npyrandom_lib]],
58
+ [' _mt19937' , [' _mt19937.pyx' , ' src/mt19937/mt19937.c' , ' src/mt19937/mt19937-jump.c' ],
59
+ [], [npyrandom_lib]
60
+ ],
61
+ [' _philox' , [' _philox.pyx' , ' src/philox/philox.c' ], [], [npyrandom_lib]],
62
+ [' _pcg64' , [' _pcg64.pyx' , ' src/pcg64/pcg64.c' ], [' -U__GNUC_GNU_INLINE__' ], [npyrandom_lib]],
63
+ [' _sfc64' , [' _sfc64.pyx' , ' src/sfc64/sfc64.c' ], [], [npyrandom_lib]],
64
+ [' bit_generator' , ' bit_generator.pyx' , [], [npyrandom_lib]],
64
65
# The `fs.copyfile` usage here is needed because these two .pyx files import
65
66
# from _bounded_integers,and its pxd file is only present in the build directory
66
- [' _generator' , fs.copyfile(' _generator.pyx' ), [], npymath_lib],
67
+ [' _generator' , fs.copyfile(' _generator.pyx' ), [], [npyrandom_lib, npymath_lib] ],
67
68
[' mtrand' , [
68
69
fs.copyfile(' mtrand.pyx' ),
69
70
' src/distributions/distributions.c' ,
70
71
' src/legacy/legacy-distributions.c'
71
- ], [' -DNP_RANDOM_LEGACY=1' ], npymath_lib,
72
+ ],
73
+ [' -DNP_RANDOM_LEGACY=1' ], [npymath_lib],
72
74
],
73
75
]
74
76
foreach gen : random_pyx_sources
@@ -77,7 +79,7 @@ foreach gen: random_pyx_sources
77
79
c_args : [c_args_random, gen[2 ]],
78
80
include_directories : ' src' ,
79
81
dependencies : np_core_dep,
80
- link_with : [npyrandom_lib, gen[3 ] ],
82
+ link_with : gen[3 ],
81
83
install : true ,
82
84
subdir : ' numpy/random' ,
83
85
)
0 commit comments