From ab2d64b7af2b8e848cdb64462ffb47849235816f Mon Sep 17 00:00:00 2001 From: Tau Date: Sun, 7 Oct 2018 22:01:00 -0400 Subject: [PATCH] Set up Meson build system --- .gitignore | 7 +++++++ cross-mingw-32.txt | 10 ++++++++++ cross-mingw-64.txt | 10 ++++++++++ meson.build | 18 ++++++++++++++++++ subprojects/capnhook.wrap | 4 ++++ 5 files changed, 49 insertions(+) create mode 100644 cross-mingw-32.txt create mode 100644 cross-mingw-64.txt create mode 100644 meson.build create mode 100644 subprojects/capnhook.wrap diff --git a/.gitignore b/.gitignore index a01ee28..d4483e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,8 @@ .*.swp + +# Suggested names for build dirs +_build32/ +_build64/ + +# External dependencies +subprojects/capnhook diff --git a/cross-mingw-32.txt b/cross-mingw-32.txt new file mode 100644 index 0000000..c2ae6d4 --- /dev/null +++ b/cross-mingw-32.txt @@ -0,0 +1,10 @@ +[binaries] +c = '/usr/bin/i686-w64-mingw32-gcc' +ar = '/usr/bin/i686-w64-mingw32-ar' +strip = '/usr/bin/i686-w64-mingw32-strip' + +[host_machine] +system = 'windows' +cpu_family = 'x86' +cpu = 'i686' +endian = 'little' diff --git a/cross-mingw-64.txt b/cross-mingw-64.txt new file mode 100644 index 0000000..a385ae9 --- /dev/null +++ b/cross-mingw-64.txt @@ -0,0 +1,10 @@ +[binaries] +c = '/usr/bin/x86_64-w64-mingw32-gcc' +ar = '/usr/bin/x86_64-w64-mingw32-ar' +strip = '/usr/bin/x86_64-w64-mingw32-strip' + +[host_machine] +system = 'windows' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..eab2391 --- /dev/null +++ b/meson.build @@ -0,0 +1,18 @@ +project('capnhook', 'c', version: '0.1.0') + +add_project_arguments( + '-Wall', + '-DCOBJMACROS', + '-ffunction-sections', + '-fdata-sections', + language: 'c', +) + +add_project_link_arguments( + '-Wl,--gc-sections', + '-static-libgcc', + language: 'c', +) + +inc = include_directories('.') +capnhook = subproject('capnhook') diff --git a/subprojects/capnhook.wrap b/subprojects/capnhook.wrap new file mode 100644 index 0000000..9d8ad09 --- /dev/null +++ b/subprojects/capnhook.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory = capnhook +url = https://github.com/decafcode/capnhook +revision = v0.2.1