aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
author2022-04-07 19:33:30 +0530
committer2022-04-07 19:33:30 +0530
commit54d5ba67489b3fdaf437c05675eb9b1f6d085a84 (patch)
treed53df52fbfb1f440bba34799c2fcf7ff1ce75a57 /meson.build
downloadfflibc-main.tar
fflibc-main.tar.gz
fflibc-main.tar.bz2
fflibc-main.tar.lz
fflibc-main.tar.xz
fflibc-main.tar.zst
fflibc-main.zip
Initial commitmain
Diffstat (limited to '')
-rw-r--r--meson.build37
1 files changed, 37 insertions, 0 deletions
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
+)