diff options
author | 2017-06-14 15:52:45 +0300 | |
---|---|---|
committer | 2017-06-14 15:52:45 +0300 | |
commit | f8b02b46dca8f3a2689104127bbe1c0736705ff4 (patch) | |
tree | d214fb520e68d8a79e94c61842bc9dd1099e151b | |
parent | 49c320f951b40ed3c722ceb53c320db98fcb7ecc (diff) | |
download | librin-f8b02b46dca8f3a2689104127bbe1c0736705ff4.tar.gz librin-f8b02b46dca8f3a2689104127bbe1c0736705ff4.tar.bz2 librin-f8b02b46dca8f3a2689104127bbe1c0736705ff4.zip |
meson: drop automake support && add initial meson support.
-rw-r--r-- | Makefile.am | 19 | ||||
-rw-r--r-- | configure.ac | 51 | ||||
-rw-r--r-- | include/meson.build | 1 | ||||
-rw-r--r-- | include/rin/meson.build | 9 | ||||
-rw-r--r-- | meson.build | 33 | ||||
-rw-r--r-- | meson_options.txt | 6 | ||||
-rw-r--r-- | src/Makefile.am | 45 | ||||
-rw-r--r-- | src/diagnostic/Makefile.am | 27 | ||||
-rw-r--r-- | src/diagnostic/meson.build | 10 | ||||
-rw-r--r-- | src/dummy.c | 0 | ||||
-rw-r--r-- | src/float/Makefile.am | 26 | ||||
-rw-r--r-- | src/float/meson.build | 10 | ||||
-rw-r--r-- | src/gpio/Makefile.am | 26 | ||||
-rw-r--r-- | src/gpio/meson.build | 10 | ||||
-rw-r--r-- | src/meson.build | 6 |
15 files changed, 85 insertions, 194 deletions
diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 1c226f6..0000000 --- a/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2015 Gediminas Jakutis -# -# This Makefile.am is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; version 2.1 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - -SUBDIRS = src test - -ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 34345d5..0000000 --- a/configure.ac +++ /dev/null @@ -1,51 +0,0 @@ -dnl Copyright (C) 2015-2016 Gediminas Jakutis -dnl -dnl This configure.ac is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; version 2.1 -dnl of the License. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - -# Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.13]) - -m4_define(LIBRIN_VERSION, m4_normalize(m4_include(VERSION))) -AC_INIT([librin], [LIBRIN_VERSION], [gediminas@varciai.lt]) -AC_CONFIG_SRCDIR([src/dummy.c]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_MACRO_DIRS([m4]) - -# Checks for programs. -AC_PROG_CC -AC_PROG_INSTALL -AM_INIT_AUTOMAKE -LT_INIT - -# Checks for header files. -AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stdio.h stdint.h stdlib.h string.h sys/types.h sys/stat.h time,h unistd.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_TYPE_INT32_T -AC_TYPE_INT64_T -AC_TYPE_SIZE_T -AC_TYPE_UINT32_T -AC_TYPE_UINT64_T - -# Checks for library functions. - -AC_CONFIG_FILES([Makefile - src/Makefile - src/diagnostic/Makefile - src/float/Makefile - src/gpio/Makefile - test/Makefile]) -AC_OUTPUT diff --git a/include/meson.build b/include/meson.build new file mode 100644 index 0000000..664b65d --- /dev/null +++ b/include/meson.build @@ -0,0 +1 @@ +subdir('rin') diff --git a/include/rin/meson.build b/include/rin/meson.build new file mode 100644 index 0000000..cf97cd6 --- /dev/null +++ b/include/rin/meson.build @@ -0,0 +1,9 @@ +headers = [ + 'definitions.h', + 'diagnostic.h', + 'float.h', + 'float_types.h', + 'gpio.h', +] + +install_headers(headers , subdir : 'rin') diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..9c0e16d --- /dev/null +++ b/meson.build @@ -0,0 +1,33 @@ +project('librin', 'c', + license : 'LGPL2.1', + default_options : 'c_std=gnu11') + +inc = include_directories('include') + +if get_option('gpio') + thread_dep = dependency('threads') +else + thread_dep = [] +endif + +deps = thread_dep + +subdir('include') +subdir('src') + +if ((not get_option('static')) and (not get_option('shared'))) + library('rin', sources, version : '0.0.0', include_directories : inc, install : true, dependencies : deps) +endif + +if get_option('static') + static_library('rin', sources, version : '0.0.0', include_directories : inc, install : true, dependencies : deps) +endif + +if get_option('shared') + shared_library('rin', sources, version : '0.0.0', include_directories : inc, install : true, dependencies : deps) +endif + + +if get_option('tests') + subdir('test') +endif diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..279996a --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,6 @@ +option('static', type : 'boolean', value : false, description : 'Enable building a static library') +option('shared', type : 'boolean', value : false, description : 'Enable building a dynamic library') +option('tests', type : 'boolean', value : false, description : 'Enable building and running tests') +option('float', type : 'boolean', value : true, description : 'Enable building the floating point module') +option('gpio', type : 'boolean', value : true, description : 'Enable building the gpio module') +option('diagnostic', type : 'boolean', value : true, description : 'Enable building the diagnostics module') diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 1717659..0000000 --- a/src/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (C) 2015 Gediminas Jakutis -# -# This Makefile.am is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; version 2.1 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - -SUBDIRS = float diagnostic gpio - -AM_CFLAGS = \ - -I$(top_srcdir)/include/ \ - -Wall \ - -Wextra - -RIN_VER_MAJOR = 0 -RIN_VER_MINOR = 0 -RIN_VER_PATCH = 0 - -lib_LTLIBRARIES = librin.la - -librin_la_LDFLAGS = -version-info $(RIN_VER_MAJOR):$(RIN_VER_MINOR):$(RIN_VER_PATCH) - -librin_la_SOURCES = dummy.c - -librin_la_LIBADD = \ - float/librin_float.la \ - diagnostic/librin_diagnostic.la \ - gpio/librin_gpio.la - -librin_includedir = $(includedir)/rin -librin_include_HEADERS = \ - $(top_srcdir)/include/rin/float.h \ - $(top_srcdir)/include/rin/float_types.h \ - $(top_srcdir)/include/rin/definitions.h \ - $(top_srcdir)/include/rin/diagnostic.h \ - $(top_srcdir)/include/rin/gpio.h diff --git a/src/diagnostic/Makefile.am b/src/diagnostic/Makefile.am deleted file mode 100644 index 8787230..0000000 --- a/src/diagnostic/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ - -# Copyright (C) 2015 Gediminas Jakutis -# -# This Makefile.am is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; version 2.1 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - -AM_CFLAGS = \ - -I$(top_srcdir)/include/ \ - -Wall \ - -Wextra - -noinst_LTLIBRARIES = librin_diagnostic.la - -librin_diagnostic_la_SOURCES = \ - diagnostic.c \ - diagnostic_private.h diff --git a/src/diagnostic/meson.build b/src/diagnostic/meson.build new file mode 100644 index 0000000..5f066c1 --- /dev/null +++ b/src/diagnostic/meson.build @@ -0,0 +1,10 @@ +if get_option('diagnostic') + diagnostic_filenames = [ + 'diagnostic.c', + 'diagnostic_private.h', + ] +else + diagnostic_filenames = [] +endif + +diagnostic_sources = files(diagnostic_filenames) diff --git a/src/dummy.c b/src/dummy.c deleted file mode 100644 index e69de29..0000000 --- a/src/dummy.c +++ /dev/null diff --git a/src/float/Makefile.am b/src/float/Makefile.am deleted file mode 100644 index d8d2675..0000000 --- a/src/float/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2015 Gediminas Jakutis -# -# This Makefile.am is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; version 2.1 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - -AM_CFLAGS = \ - -I$(top_srcdir)/include/ \ - -Wall \ - -Wextra - -noinst_LTLIBRARIES = librin_float.la - -librin_float_la_SOURCES = \ - float.c \ - float_private.h diff --git a/src/float/meson.build b/src/float/meson.build new file mode 100644 index 0000000..129053e --- /dev/null +++ b/src/float/meson.build @@ -0,0 +1,10 @@ +if get_option('float') + float_filenames = [ + 'float.c', + 'float_private.h', + ] +else + float_filenames = [] +endif + +float_sources = files(float_filenames) diff --git a/src/gpio/Makefile.am b/src/gpio/Makefile.am deleted file mode 100644 index e009cab..0000000 --- a/src/gpio/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2016 Gediminas Jakutis -# -# This Makefile.am is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; version 2.1 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - -AM_CFLAGS = \ - -I$(top_srcdir)/include/ \ - -Wall \ - -Wextra - -noinst_LTLIBRARIES = librin_gpio.la - -librin_gpio_la_SOURCES = \ - gpio.c \ - gpio_private.h diff --git a/src/gpio/meson.build b/src/gpio/meson.build new file mode 100644 index 0000000..82887cb --- /dev/null +++ b/src/gpio/meson.build @@ -0,0 +1,10 @@ +if get_option('gpio') + gpio_filenames = [ + 'gpio.c', + 'gpio_private.h', + ] +else + gpio_filenames = [] +endif + +gpio_sources = files(gpio_filenames) diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..1d98b67 --- /dev/null +++ b/src/meson.build @@ -0,0 +1,6 @@ +subdir('float') +subdir('gpio') +subdir('diagnostic') + +sources = [float_sources, gpio_sources, diagnostic_sources] + |