|
| 1 | +ircd_parser = custom_target('ircd_parser', |
| 2 | + input: 'ircd_parser.y', |
| 3 | + output: ['ircd_parser.c', 'ircd_parser.h'], |
| 4 | + command: [bison, '-d', '@INPUT@', '--output=@OUTPUT0@', '--defines=@OUTPUT1@'] |
| 5 | +) |
| 6 | + |
| 7 | +ircd_lexer = custom_target('ircd_lexer', |
| 8 | + input: 'ircd_lexer.l', |
| 9 | + output: 'ircd_lexer.c', |
| 10 | + command: [flex, '-o', '@OUTPUT@', '@INPUT@'] |
| 11 | +) |
| 12 | + |
| 13 | +credits_result = run_command('sed', 's/^$/ /;s/.*/ "&",/', meson.project_source_root() / 'CREDITS', check: true) |
| 14 | +ircd_version_conf = configuration_data() |
| 15 | +ircd_version_conf.set('GENERATION', '0') |
| 16 | +ircd_version_conf.set('CREATION', '__DATE__ at __TIME__') |
| 17 | +ircd_version_conf.set('CREDITS', credits_result.stdout()) |
| 18 | +ircd_version_conf.set('PACKAGE', meson.project_name()) |
| 19 | +ircd_version = configure_file( |
| 20 | + input: 'version.c.in', |
| 21 | + output: 'version.c', |
| 22 | + configuration: ircd_version_conf |
| 23 | +) |
| 24 | + |
| 25 | +libircd_sources = files( |
| 26 | + 'authproc.c', |
| 27 | + 'bandbi.c', |
| 28 | + 'batch.c', |
| 29 | + 'cache.c', |
| 30 | + 'capability.c', |
| 31 | + 'channel.c', |
| 32 | + 'chmode.c', |
| 33 | + 'class.c', |
| 34 | + 'client.c', |
| 35 | + 'client_tags.c', |
| 36 | + 'dns.c', |
| 37 | + 'extban.c', |
| 38 | + 'getopt.c', |
| 39 | + 'hash.c', |
| 40 | + 'hook.c', |
| 41 | + 'hostmask.c', |
| 42 | + 'ircd.c', |
| 43 | + 'ircd_signal.c', |
| 44 | + 'listener.c', |
| 45 | + 'logger.c', |
| 46 | + 'match.c', |
| 47 | + 'modules.c', |
| 48 | + 'monitor.c', |
| 49 | + 'msgbuf.c', |
| 50 | + 'newconf.c', |
| 51 | + 'operhash.c', |
| 52 | + 'packet.c', |
| 53 | + 'parse.c', |
| 54 | + 'privilege.c', |
| 55 | + 'ratelimit.c', |
| 56 | + 'reject.c', |
| 57 | + 'restart.c', |
| 58 | + 's_conf.c', |
| 59 | + 's_newconf.c', |
| 60 | + 's_serv.c', |
| 61 | + 's_user.c', |
| 62 | + 'scache.c', |
| 63 | + 'send.c', |
| 64 | + 'snomask.c', |
| 65 | + 'sslproc.c', |
| 66 | + 'substitution.c', |
| 67 | + 'supported.c', |
| 68 | + 'tgchange.c', |
| 69 | + 'whowas.c', |
| 70 | +) |
| 71 | + |
| 72 | +libircd_inc = include_directories('../include') |
| 73 | + |
| 74 | +libircd = shared_library('ircd', |
| 75 | + [libircd_sources, ircd_parser, ircd_lexer, ircd_version, serno_h], |
| 76 | + dependencies: [librb_dep, ltdl_dep], |
| 77 | + include_directories: libircd_inc, |
| 78 | + install: true, |
| 79 | + install_rpath: rpath, |
| 80 | +) |
| 81 | + |
| 82 | +libircd_dep = declare_dependency( |
| 83 | + link_with: libircd, |
| 84 | + include_directories: libircd_inc, |
| 85 | + dependencies: [librb_dep, ltdl_dep] |
| 86 | +) |
| 87 | + |
| 88 | +solanum = executable('solanum', |
| 89 | + 'main.c', |
| 90 | + dependencies: [libircd_dep], |
| 91 | + export_dynamic: true, |
| 92 | + install: true, |
| 93 | + install_rpath: rpath, |
| 94 | +) |
0 commit comments