From ac65e35509398c6f3f27b26e9309750a565e1cbd Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 28 Dec 2010 17:49:29 -0500 Subject: [PATCH] Add autotools build Signed-off-by: Mathieu Desnoyers --- .gitignore | 1 + Makefile.am | 13 ++++++++++ bootstrap | 12 +++++++++ configure.ac | 49 +++++++++++++++++++++++++++++++++++ formats/Makefile.am | 7 +++++ formats/ctf/Makefile.am | 11 ++++++++ formats/ctf/types/Makefile.am | 12 +++++++++ tests/Makefile.am | 5 ++++ types/Makefile.am | 13 ++++++++++ 9 files changed, 123 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile.am create mode 100755 bootstrap create mode 100644 configure.ac create mode 100644 formats/Makefile.am create mode 100644 formats/ctf/Makefile.am create mode 100644 formats/ctf/types/Makefile.am create mode 100644 tests/Makefile.am create mode 100644 types/Makefile.am diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3a3eeffa --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tests/test-bitfield diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..f88b548e --- /dev/null +++ b/Makefile.am @@ -0,0 +1,13 @@ +AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include + +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = types . tests + +bin_PROGRAMS = babeltrace + +babeltrace_LDADD = \ + types/types.a \ + formats/registry.a + +# converter/ diff --git a/bootstrap b/bootstrap new file mode 100755 index 00000000..c5074256 --- /dev/null +++ b/bootstrap @@ -0,0 +1,12 @@ +#! /bin/sh + +set -x +if [ ! -e config ]; then + mkdir config +fi +aclocal +libtoolize --force --copy +autoheader +automake --add-missing --copy +autoconf + diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000..d1d4feab --- /dev/null +++ b/configure.ac @@ -0,0 +1,49 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_INIT([babeltrace], [0.1], [mathieu dot desnoyers at efficios dot com]) +AC_CONFIG_AUX_DIR([config]) +AC_CANONICAL_TARGET +AC_CANONICAL_HOST +AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip]) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +AC_CONFIG_MACRO_DIR([m4]) + +AM_PROG_MKDIR_P + +AC_CONFIG_HEADERS([config.h]) + +# Checks for programs. +AC_PROG_CC +AC_PROG_MAKE_SET +AC_PROG_LIBTOOL + +AM_PATH_GLIB_2_0(2.4.0, ,AC_MSG_ERROR([glib is required in order to compile BabelTrace - download it from ftp://ftp.gtk.org/pub/gtk]) , gmodule) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_INLINE +AC_TYPE_PID_T +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_MALLOC +AC_FUNC_MMAP +AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul]) + +pkg_modules="gmodule-2.0 >= 2.0.0" +PKG_CHECK_MODULES(GMODULE, [$pkg_modules]) +AC_SUBST(PACKAGE_LIBS) + +PACKAGE_CFLAGS="$GMODULE_CFLAGS" +AC_SUBST(PACKAGE_CFLAGS) + +AC_CONFIG_FILES([ + Makefile + types/Makefile + formats/Makefile + formats/ctf/Makefile + formats/ctf/types/Makefile + tests/Makefile +]) +AC_OUTPUT diff --git a/formats/Makefile.am b/formats/Makefile.am new file mode 100644 index 00000000..41ccc06d --- /dev/null +++ b/formats/Makefile.am @@ -0,0 +1,7 @@ +AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include + +SUBDIRS = . ctf + +noinst_LIBRARIES = libregistry.a + +libregistry_a_SOURCES = registry.c diff --git a/formats/ctf/Makefile.am b/formats/ctf/Makefile.am new file mode 100644 index 00000000..ba0a4f79 --- /dev/null +++ b/formats/ctf/Makefile.am @@ -0,0 +1,11 @@ +AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include + +SUBDIRS = . types +#metadata + +lib_LTLIBRARIES = libctf.la + +libctf_la_SOURCES = \ + ctf.c \ + types/ctf_types.o +# metadata/ctf_parse.o diff --git a/formats/ctf/types/Makefile.am b/formats/ctf/types/Makefile.am new file mode 100644 index 00000000..81c7bf71 --- /dev/null +++ b/formats/ctf/types/Makefile.am @@ -0,0 +1,12 @@ +AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include + +noinst_LIBRARIES = libctf-types.a + +libctf_types_a_SOURCES = \ + array.c \ + enum.c \ + float.c \ + integer.c \ + sequence.c \ + string.c \ + struct.c diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 00000000..642dd983 --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,5 @@ +AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include + +noinst_PROGRAMS = test-bitfield + +test_bitfield_SOURCES = test-bitfield.c diff --git a/types/Makefile.am b/types/Makefile.am new file mode 100644 index 00000000..d98733da --- /dev/null +++ b/types/Makefile.am @@ -0,0 +1,13 @@ +AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include + +noinst_LIBRARIES = libtypes.a + +libtypes_a_SOURCES = \ + array.c \ + enum.c \ + float.c \ + integer.c \ + sequence.c \ + string.c \ + struct.c \ + types.c -- 2.34.1