2023-02-16 02:26:14 -03:00
|
|
|
subdir('lib')
|
2023-02-08 09:36:43 -03:00
|
|
|
|
2022-10-17 22:26:36 -03:00
|
|
|
obelisk_sources = files(
|
2023-02-16 02:36:16 -03:00
|
|
|
'main.cpp',
|
2022-10-17 22:26:36 -03:00
|
|
|
'lexer.cpp',
|
2023-02-18 21:06:42 -03:00
|
|
|
'parser.cpp'
|
2022-10-17 22:26:36 -03:00
|
|
|
)
|
|
|
|
|
2022-10-25 17:08:36 -03:00
|
|
|
sqlite3 = dependency('sqlite3')
|
|
|
|
|
2022-10-17 22:26:36 -03:00
|
|
|
subdir('ast')
|
|
|
|
obelisk_sources += obelisk_ast_sources
|
|
|
|
|
2022-11-21 21:24:44 -03:00
|
|
|
r = run_command('llvm-config', '--cppflags', check : true)
|
|
|
|
cpp_args = ' ' + r.stdout().replace('\n', ' ').replace('-I', '-isystem')
|
|
|
|
|
|
|
|
r = run_command('llvm-config', '--ldflags', '--system-libs', '--libs', 'core', check : true)
|
|
|
|
link_args = ' ' + r.stdout().replace('\n', ' ')
|
|
|
|
|
2022-10-17 22:26:36 -03:00
|
|
|
executable('obelisk',
|
|
|
|
obelisk_sources,
|
2023-02-16 02:36:16 -03:00
|
|
|
dependencies : [libobelisk, sqlite3],
|
2022-11-21 21:24:44 -03:00
|
|
|
cpp_args : cpp_args.split(),
|
|
|
|
link_args : link_args.split(),
|
2022-10-17 22:26:36 -03:00
|
|
|
install : true
|
|
|
|
)
|