Add autotools build
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 28 Dec 2010 22:49:29 +0000 (17:49 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 28 Dec 2010 22:49:29 +0000 (17:49 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
.gitignore [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
bootstrap [new file with mode: 0755]
configure.ac [new file with mode: 0644]
formats/Makefile.am [new file with mode: 0644]
formats/ctf/Makefile.am [new file with mode: 0644]
formats/ctf/types/Makefile.am [new file with mode: 0644]
tests/Makefile.am [new file with mode: 0644]
types/Makefile.am [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..3a3eeff
--- /dev/null
@@ -0,0 +1 @@
+tests/test-bitfield
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..f88b548
--- /dev/null
@@ -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 (executable)
index 0000000..c507425
--- /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 (file)
index 0000000..d1d4fea
--- /dev/null
@@ -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 (file)
index 0000000..41ccc06
--- /dev/null
@@ -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 (file)
index 0000000..ba0a4f7
--- /dev/null
@@ -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 (file)
index 0000000..81c7bf7
--- /dev/null
@@ -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 (file)
index 0000000..642dd98
--- /dev/null
@@ -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 (file)
index 0000000..d98733d
--- /dev/null
@@ -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
This page took 0.038276 seconds and 4 git commands to generate.