summaryrefslogtreecommitdiff
path: root/src/meson.build
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-11 13:49:50 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-11 13:49:50 +0200
commit339954714f69bbd395aa9bbe46850dcaa98e9f29 (patch)
tree00b17e206e3acc35303d24f6a1e76bf2de8c5664 /src/meson.build
parent08ce54211ce4b8d6092321ca1b28773a680ddc45 (diff)
convert form make to meson
Add .editorconfig. Removed unused fallback definitions (for POSIX systems).
Diffstat (limited to 'src/meson.build')
-rw-r--r--src/meson.build74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..03e3c01
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,74 @@
+cdb_srcs = [
+ 'buffer.c',
+ 'cdbmake.c',
+ 'cdbread.c',
+ 'uint32p.c',
+ 'seek.c',
+]
+cmap_srcs = ['alloc.c', 'buffer.c', 'constmap.c', 'scan.c']
+fs_srcs = ['fmt.c', 'scan.c']
+ip_srcs = ['ip4.c', 'ip6.c', 'socket_if.c']
+str_srcs = ['alloc.c', 'byte.c', 'str.c', 'stralloc.c']
+logmsg_srcs = ['errstr.c', 'logmsg.c']
+time_srcs = ['iopause.c', 'tai.c', 'taia.c', 'timeout.c', 'timeoutconn.c']
+pack_srcs = ['uint8p.c', 'uint16p.c', 'uint32p.c', 'uint64p.c', 'uint128p.c']
+
+socket_srcs = [
+ 'socket_bind.c',
+ 'socket_connect.c',
+ 'socket_if.c',
+ 'socket_info.c',
+ 'socket_setup.c',
+ 'socket_tcp.c',
+ 'socket_udp.c',
+
+ 'socket_recv.c',
+ 'socket_send.c',
+]
+socket_srcs += ['ndelay.c', 'uint16p.c']
+socket_srcs += ip_srcs
+socket_srcs += str_srcs
+socket_srcs += fs_srcs
+
+socket_lib = library('socket', socket_srcs,
+ include_directories : qlibs_inc,
+ build_by_default : false)
+
+other_srcs = [
+ 'base64.c',
+ 'case.c',
+ 'env.c',
+ 'fd.c',
+ 'getln.c',
+ 'getoptb.c',
+ 'lock.c',
+ 'ndelay.c',
+ 'open.c',
+ 'pathexec.c',
+ 'prot.c',
+ 'readclose.c',
+ 'sig.c',
+ 'wait.c',
+]
+
+core_srcs = other_srcs
+core_srcs += cdb_srcs
+core_srcs += cmap_srcs
+core_srcs += fs_srcs
+core_srcs += ip_srcs
+core_srcs += logmsg_srcs
+core_srcs += str_srcs
+core_srcs += time_srcs
+core_srcs += socket_srcs
+core_srcs += pack_srcs
+
+cc = meson.get_compiler('c')
+
+qlibs_c_args = cc.has_header_symbol('sys/file.h', 'flock') ? '-DHASFLOCK' : ''
+
+qlibs_lib = library('qlibs', core_srcs,
+ install : true,
+ c_args : qlibs_c_args,
+ include_directories : qlibs_inc)
+
+subdir('dnsstub')