From 54d5ba67489b3fdaf437c05675eb9b1f6d085a84 Mon Sep 17 00:00:00 2001 From: Marc Pervaz Boocha Date: Thu, 7 Apr 2022 19:33:30 +0530 Subject: Initial commit --- meson.build | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 meson.build (limited to 'meson.build') diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..f1d5973 --- /dev/null +++ b/meson.build @@ -0,0 +1,37 @@ +project('ffc', 'c', + version : '0.1', + default_options : [ + 'c_std=c11', + 'warning_level=3' + ] +) + +cc = meson.get_compiler('c') +if cc.has_argument('-fno-builtin') + add_project_arguments('-fno-builtin', language : 'c') +endif + +is_hosted = cc.get_define('__STDC_HOSTED__').to_int() +has_strings = cc.check_header('unistd.h') + +sources = [] + +subdir('memory') +subdir('math') +subdir('io') + +lib = library('ffc', sources, + install : true, + gnu_symbol_visibility: 'hidden', +) + +# Make this library usable as a Meson subproject. +ffc_dep = declare_dependency( + link_with : lib +) + +pkg_mod = import('pkgconfig') +pkg_mod.generate(name: 'ffc', + description : 'A libc compat layer', + libraries: lib +) -- cgit v1.2.3-70-g09d2