link_args = []
endif
-orc_test_lib = library ('orc-test-' + orc_api, orc_test_sources,
+orc_test_shr = shared_library ('orc-test-' + orc_api,
+ orc_test_sources,
version : libversion,
soversion : soversion,
include_directories : orc_inc,
link_depends : 'orc-test.map',
install : true)
+orc_test_sta = static_library ('orc-test-' + orc_api,
+ objects : orc_test_shr.extract_all_objects(),
+ include_directories : orc_inc,
+ c_args : [ orc_c_args , '-DORC_ENABLE_UNSTABLE_API' ],
+ dependencies : [libm, orc_dep],
+ install : true)
+
+if get_option('default_library') == 'static'
+ orc_test_lib = orc_test_sta
+else
+ orc_test_lib = orc_test_shr
+endif
+
orc_test_dep = declare_dependency(include_directories : orc_inc,
link_with : orc_test_lib)
'orcparse.c',
'orcprogram.c',
'orcprogram-c.c',
- 'orcprogram.h',
'orcrule.c',
'orcutils.c',
]
orc_dependencies = [libm, librt, liblog]
+# FIXME: Use gcc visibility attributes in ORC_EXPORT
if cc.get_id() != 'msvc'
link_args = ['-Wl,--version-script,' + meson.current_source_dir() + '/orc.map']
else
link_args = []
endif
-orc_lib = library ('orc-' + orc_api, orc_sources,
+orc_shr = shared_library ('orc-' + orc_api,
+ orc_sources,
version : libversion,
soversion : soversion,
include_directories : orc_inc,
link_depends : 'orc.map',
install : true)
-orc_dep = declare_dependency(include_directories : orc_inc, link_with : orc_lib)
+orc_sta = static_library ('orc-' + orc_api,
+ objects: orc_shr.extract_all_objects(),
+ include_directories : orc_inc,
+ c_args : orc_c_args,
+ install : true)
+
+if get_option('default_library') == 'static'
+ orc_lib = orc_sta
+else
+ orc_lib = orc_shr
+endif
+
+orc_dep = declare_dependency(include_directories : orc_inc,
+ dependencies : orc_dependencies,
+ link_with : orc_lib)
executable ('generate-bytecode',
'generate-bytecode.c',