diff options
Diffstat (limited to 'src/service/core/meson.build')
-rw-r--r-- | src/service/core/meson.build | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/src/service/core/meson.build b/src/service/core/meson.build new file mode 100644 index 000000000..2e3e958af --- /dev/null +++ b/src/service/core/meson.build | |||
@@ -0,0 +1,119 @@ | |||
1 | libgnunetcore_src = ['core_api.c', | ||
2 | 'core_api_monitor_peers.c'] | ||
3 | |||
4 | gnunetservicecore_src = ['gnunet-service-core.c', | ||
5 | 'gnunet-service-core_kx.c', | ||
6 | 'gnunet-service-core_sessions.c', | ||
7 | 'gnunet-service-core_typemap.c'] | ||
8 | |||
9 | configure_file(input : 'core.conf.in', | ||
10 | output : 'core.conf', | ||
11 | configuration : cdata, | ||
12 | install: true, | ||
13 | install_dir: pkgcfgdir) | ||
14 | |||
15 | |||
16 | if get_option('monolith') | ||
17 | foreach p : libgnunetcore_src + gnunetservicecore_src | ||
18 | gnunet_src += 'core/' + p | ||
19 | endforeach | ||
20 | subdir_done() | ||
21 | endif | ||
22 | |||
23 | libgnunetcore = library('gnunetcore', | ||
24 | libgnunetcore_src, | ||
25 | dependencies: libgnunetutil_dep, | ||
26 | include_directories: [incdir, configuration_inc], | ||
27 | install: true, | ||
28 | soversion: '0', | ||
29 | version: '0.0.1', | ||
30 | install_dir: get_option('libdir')) | ||
31 | libgnunetcore_dep = declare_dependency(link_with : libgnunetcore) | ||
32 | pkg.generate(libgnunetcore, url: 'https://www.gnunet.org', | ||
33 | description : 'Provides API for (encrypted) P2P communication') | ||
34 | |||
35 | libgnunetcoretesting = library('gnunetcoretesting', | ||
36 | ['core_api_cmd_connecting_peers.c'], | ||
37 | dependencies: [ | ||
38 | libgnunetutil_dep, | ||
39 | libgnunettesting_dep, | ||
40 | libgnunetarm_dep, | ||
41 | libgnunettransportapplication_dep, | ||
42 | libgnunettransportcore_dep, | ||
43 | ], | ||
44 | include_directories: [incdir, configuration_inc], | ||
45 | install: true, | ||
46 | soversion: '0', | ||
47 | version: '0.0.0', | ||
48 | install_dir: get_option('libdir')) | ||
49 | libgnunetcoretesting_dep = declare_dependency(link_with : libgnunetcoretesting) | ||
50 | |||
51 | shared_module('gnunet_test_core_plugin_cmd_just_run', | ||
52 | ['test_core_plugin_cmd_just_run.c'], | ||
53 | dependencies: [libgnunetutil_dep, | ||
54 | libgnunetcoretesting_dep, | ||
55 | libgnunettransportcore_dep, | ||
56 | libgnunettransportapplication_dep, | ||
57 | libgnunettesting_dep, | ||
58 | libgnunetpeerstore_dep, | ||
59 | libgnunetstatistics_dep, | ||
60 | libgnunethello_dep, | ||
61 | libgnunetarm_dep | ||
62 | ], | ||
63 | include_directories: [incdir, configuration_inc], | ||
64 | install: true, | ||
65 | install_dir: get_option('libdir')/'gnunet') | ||
66 | |||
67 | executable ('gnunet-core', | ||
68 | ['gnunet-core.c'], | ||
69 | dependencies: [libgnunetcore_dep, libgnunetutil_dep], | ||
70 | include_directories: [incdir, configuration_inc], | ||
71 | install: true, | ||
72 | install_dir: get_option('bindir')) | ||
73 | |||
74 | executable ('gnunet-service-core', | ||
75 | gnunetservicecore_src, | ||
76 | dependencies: [libgnunetcore_dep, libgnunetutil_dep, | ||
77 | libgnunetstatistics_dep, | ||
78 | libgnunettransportcore_dep, | ||
79 | zlib_dep], | ||
80 | include_directories: [incdir, configuration_inc], | ||
81 | install: true, | ||
82 | install_dir: get_option('libdir') / 'gnunet' / 'libexec') | ||
83 | |||
84 | configure_file(input : 'test_core_defaults.conf', | ||
85 | output : 'test_core_defaults.conf', | ||
86 | copy: true) | ||
87 | |||
88 | configure_file(input : 'test_core_api_send_to_self.conf', | ||
89 | output : 'test_core_api_send_to_self.conf', | ||
90 | copy: true) | ||
91 | |||
92 | configure_file(input : 'test_core_api_peer1.conf', | ||
93 | output : 'test_core_api_peer1.conf', | ||
94 | copy: true) | ||
95 | |||
96 | testcore_api_send_self = executable ('test_core_api_send_to_self', | ||
97 | ['test_core_api_send_to_self.c'], | ||
98 | dependencies: [ | ||
99 | libgnunetcore_dep, | ||
100 | libgnunetutil_dep, | ||
101 | libgnunettesting_dep | ||
102 | ], | ||
103 | include_directories: [incdir, configuration_inc], | ||
104 | install: false) | ||
105 | |||
106 | testcore_api_start = executable ('test_core_api_start_only', | ||
107 | ['test_core_api_send_to_self.c'], | ||
108 | dependencies: [ | ||
109 | libgnunetcore_dep, | ||
110 | libgnunetutil_dep, | ||
111 | libgnunettesting_dep | ||
112 | ], | ||
113 | include_directories: [incdir, configuration_inc], | ||
114 | install: false) | ||
115 | |||
116 | test('test_core_api_send_to_self', testcore_api_send_self, | ||
117 | suite: 'core', workdir: meson.current_build_dir()) | ||
118 | test('test_core_api_start_only', testcore_api_start, | ||
119 | suite: 'core', workdir: meson.current_build_dir()) | ||