Debian Codegraph @

meson.build

raw ◀ ▶
1 Debian patch touch this file
1 project('httpdirfs', 'c',
2 version: '1.3.3',
3 license: 'GPL-3.0-or-later',
4 default_options: [
5 'buildtype=release',
6 'warning_level=3',
7 'c_std=c11'
8 ]
9 )
10
11 lib_srcs = [
12 'src/network.c',
13 'src/fuse_local.c',
14 'src/link.c',
15 'src/cache.c',
16 'src/util.c',
17 'src/sonic.c',
18 'src/log.c',
19 'src/config.c',
20 'src/memcache.c'
21 ]
22
23 c_args = [
24 '-Wpedantic',
25 '-Wstrict-prototypes',
26 '-Wshadow',
27 '-pthread',
28 '-D_GNU_SOURCE',
29 '-fstack-protector-all',
30 '-D_FORTIFY_SOURCE=2',
31 '-DVERSION="' + meson.project_version() + '"'
32 ]
33
34 if get_option('debug')
35 c_args += '-DDEBUG'
36 endif
37
38 cc = meson.get_compiler('c')
39
40 gumbo_dep = dependency('gumbo')
41 libcurl_dep = dependency('libcurl')
42 fuse_dep = dependency('fuse3')
43 uuid_dep = dependency('uuid')
44 expat_dep = dependency('expat')
45 openssl_dep = dependency('openssl')
46 if cc.has_function('backtrace', prefix: '#include <execinfo.h>')
47 execinfo_dep = dependency('', required: false)
48 else
49 execinfo_dep = cc.find_library('execinfo', required: false)
50 endif
51
52 httpdirfs_deps = [
53 gumbo_dep,
54 libcurl_dep,
55 fuse_dep,
56 uuid_dep,
57 expat_dep,
58 openssl_dep,
59 execinfo_dep
60 ]
61
62 httpdirfs_lib = static_library('httpdirfs_lib',
63 lib_srcs,
64 dependencies : httpdirfs_deps,
65 c_args: c_args,
66 )
67
68 httpdirfs = executable('httpdirfs',
69 'src/main.c',
70 link_with: httpdirfs_lib,
71 dependencies : httpdirfs_deps,
72 c_args: c_args,
73 install: true,
74 install_dir: get_option('bindir'),
75 )
76
77 if (host_machine.system() == 'linux')
78 help2man = find_program('help2man', required: false)
79 if help2man.found()
80 help2man_opts = [
81 '--name="mount HTTP directory as a virtual filesystem"',
82 '--no-discard-stderr',
83 '--no-info',
84 '--section=1']
85 manfile = custom_target('httpdirfs.1',
86 output: 'httpdirfs.1',
87 command: [help2man, help2man_opts, '--output=@OUTPUT@', httpdirfs],
88 install: true,
89 install_dir: get_option('mandir') / 'man1')
90 endif
91 endif
92
93 run_target('format',
94 command : 'scripts/format.sh')
95
96 run_target('doxygen',
97 command : 'scripts/doxygen.sh')