1- project (
2- ' quaddtype' ,
3- ' c' ,
4- )
1+ project (' quaddtype' , ' c' , ' cpp' , default_options : [' cpp_std=c++17' , ' b_pie=true' ])
52
63py_mod = import (' python' )
74py = py_mod.find_installation()
85
6+ c = meson .get_compiler(' c' )
7+
8+ sleef_dep = c.find_library (' sleef' )
9+ sleefquad_dep = c.find_library (' sleefquad' )
10+
911incdir_numpy = run_command (py,
1012 [
1113 ' -c' ,
12- ' import numpy; print(numpy.get_include())'
14+ ' import numpy; import os; print(os.path.relpath( numpy.get_include() ))'
1315 ],
1416 check : true
1517).stdout().strip()
1618
1719includes = include_directories (
18- [
19- incdir_numpy,
20- ' quaddtype/src'
21- ]
20+ [
21+ incdir_numpy,
22+ ' quaddtype/src' ,
23+ ]
2224)
2325
2426srcs = [
25- ' quaddtype/src/umath.c' ,
26- ' quaddtype/src/casts.c' ,
27- ' quaddtype/src/dtype.c' ,
28- ' quaddtype/src/quaddtype_main.c' ,
27+ ' quaddtype/src/casts.h' ,
28+ ' quaddtype/src/casts.cpp' ,
29+ ' quaddtype/src/scalar.h' ,
30+ ' quaddtype/src/scalar.c' ,
31+ ' quaddtype/src/dtype.h' ,
32+ ' quaddtype/src/dtype.c' ,
33+ ' quaddtype/src/quaddtype_main.c' ,
34+ ' quaddtype/src/scalar_ops.h' ,
35+ ' quaddtype/src/scalar_ops.cpp' ,
36+ ' quaddtype/src/ops.hpp' ,
37+ ' quaddtype/src/umath.h' ,
38+ ' quaddtype/src/umath.cpp'
2939]
3040
3141py.install_sources(
32- [
33- ' quaddtype/__init__.py' ,
34- ' quaddtype/quadscalar.py'
35- ],
36- subdir : ' quaddtype' ,
37- pure : false
42+ [
43+ ' quaddtype/__init__.py' ,
44+ ],
45+ subdir : ' quaddtype' ,
46+ pure : false
3847)
3948
40- py.extension_module(
41- ' _quaddtype_main ' ,
42- srcs ,
43- c_args : [' -g ' , ' -O0 ' ],
44- install : true ,
45- subdir : ' quaddtype' ,
46- include_directories : includes
47- )
49+ py.extension_module(' _quaddtype_main ' ,
50+ srcs ,
51+ c_args : [ ' -g ' , ' -O0 ' , ' -lsleef ' , ' -lsleefquad ' ] ,
52+ dependencies : [sleef_dep, sleefquad_dep ],
53+ install : true ,
54+ subdir : ' quaddtype' ,
55+ include_directories : includes
56+ )
0 commit comments