From d6c9f207eca8cda2b30dd5d4a0a6816f25b1b796 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Hall=C3=A9?= Date: Wed, 18 Aug 2010 11:54:26 -0400 Subject: [PATCH] properly install libustd and libustcmd --- Makefile.am | 2 +- configure.ac | 1 + include/Makefile.am | 4 ++- {libustcmd => include/ust}/ustcmd.h | 0 libustd/libustd.h => include/ust/ustd.h | 9 +++---- libustcmd/Makefile.am | 14 ++++++++++ libustcmd/ustcmd.c | 2 +- libustd/Makefile.am | 2 +- libustd/libustd.c | 3 ++- libustd/lowlevel.c | 2 +- libustd/lowlevel.h | 35 +++++++++++++++++++++++++ ustctl/Makefile.am | 7 +++-- ustctl/ustctl.c | 3 +-- ustd/ustd.c | 2 +- 14 files changed, 67 insertions(+), 19 deletions(-) rename {libustcmd => include/ust}/ustcmd.h (100%) rename libustd/libustd.h => include/ust/ustd.h (97%) create mode 100644 libustcmd/Makefile.am create mode 100644 libustd/lowlevel.h diff --git a/Makefile.am b/Makefile.am index eb0c1b5..c77ef8f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ ACLOCAL_AMFLAGS = -I config # libust and '.' (that contains the linker script). However, '.' # must be installed after libust so it can overwrite libust.so with # the linker script. -SUBDIRS = snprintf libustcomm libust . tests libustinstr-malloc libustd ustd ustctl libustfork include doc +SUBDIRS = snprintf libustcomm libustcmd libust . tests libustinstr-malloc libustd ustd ustctl libustfork include doc EXTRA_DIST = libust.ldscript.in libust-initializer.c dist_bin_SCRIPTS = usttrace diff --git a/configure.ac b/configure.ac index caa599d..af40e52 100644 --- a/configure.ac +++ b/configure.ac @@ -127,6 +127,7 @@ AC_CONFIG_FILES([ ustd/Makefile ustctl/Makefile libustcomm/Makefile + libustcmd/Makefile snprintf/Makefile ]) AC_OUTPUT diff --git a/include/Makefile.am b/include/Makefile.am index 4732c46..d034ac5 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -16,6 +16,8 @@ nobase_include_HEADERS = \ ust/kcompat/jhash.h \ ust/kcompat/kref.h \ ust/kcompat/simple.h \ - ust/kcompat/types.h + ust/kcompat/types.h \ + ust/ustcmd.h \ + ust/ustd.h noinst_HEADERS = share.h usterr.h ust_snprintf.h diff --git a/libustcmd/ustcmd.h b/include/ust/ustcmd.h similarity index 100% rename from libustcmd/ustcmd.h rename to include/ust/ustcmd.h diff --git a/libustd/libustd.h b/include/ust/ustd.h similarity index 97% rename from libustd/libustd.h rename to include/ust/ustd.h index 762fc71..5fec7f9 100644 --- a/libustd/libustd.h +++ b/include/ust/ustd.h @@ -23,8 +23,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef LIBUSTD_H -#define LIBUSTD_H +#ifndef USTD_H +#define USTD_H #include #include @@ -275,8 +275,5 @@ int libustd_start_instance(struct libustd_instance *instance); */ int libustd_stop_instance(struct libustd_instance *instance, int send_msg); -void finish_consuming_dead_subbuffer(struct libustd_callbacks *callbacks, struct buffer_info *buf); -size_t subbuffer_data_size(void *subbuf); - -#endif /* LIBUSTD_H */ +#endif /* USTD_H */ diff --git a/libustcmd/Makefile.am b/libustcmd/Makefile.am new file mode 100644 index 0000000..f467244 --- /dev/null +++ b/libustcmd/Makefile.am @@ -0,0 +1,14 @@ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libustcomm +AM_CFLAGS = -fno-strict-aliasing + +lib_LTLIBRARIES = libustcmd.la + +libustcmd_la_SOURCES = \ + ustcmd.c + +libustcmd_la_LDFLAGS = -no-undefined -version-info 0:0:0 + +libustcmd_la_LIBADD = \ + $(top_builddir)/libustcomm/libustcomm.la + +libustcmd_la_CFLAGS = -DUST_COMPONENT="libustcmd" -fno-strict-aliasing diff --git a/libustcmd/ustcmd.c b/libustcmd/ustcmd.c index 46a9561..cf6b9d7 100644 --- a/libustcmd/ustcmd.c +++ b/libustcmd/ustcmd.c @@ -25,7 +25,7 @@ #include #include "ustcomm.h" -#include "ustcmd.h" +#include "ust/ustcmd.h" #include "usterr.h" pid_t *ustcmd_get_online_pids(void) diff --git a/libustd/Makefile.am b/libustd/Makefile.am index 1d6d328..1b9a961 100644 --- a/libustd/Makefile.am +++ b/libustd/Makefile.am @@ -4,7 +4,7 @@ AM_CFLAGS = -fno-strict-aliasing lib_LTLIBRARIES = libustd.la -libustd_la_SOURCES = libustd.c lowlevel.c libustd.h +libustd_la_SOURCES = libustd.c lowlevel.c lowlevel.h libustd_la_LDFLAGS = -no-undefined -version-info 0:0:0 diff --git a/libustd/libustd.c b/libustd/libustd.c index 47cb594..df945fc 100644 --- a/libustd/libustd.c +++ b/libustd/libustd.c @@ -29,7 +29,8 @@ #include #include -#include "libustd.h" +#include +#include "lowlevel.h" #include "usterr.h" #include "ustcomm.h" diff --git a/libustd/lowlevel.c b/libustd/lowlevel.c index bff27dc..a8abf92 100644 --- a/libustd/lowlevel.c +++ b/libustd/lowlevel.c @@ -19,9 +19,9 @@ #include #include +#include "ust/ustd.h" #include "buffers.h" #include "tracer.h" -#include "libustd.h" #include "usterr.h" /* This truncates to an offset in the buffer. */ diff --git a/libustd/lowlevel.h b/libustd/lowlevel.h new file mode 100644 index 0000000..a1d8da5 --- /dev/null +++ b/libustd/lowlevel.h @@ -0,0 +1,35 @@ +/* + * lowlevel libustd header file + * + * Copyright 2005-2010 - + * Mathieu Desnoyers + * Copyright 2010- + * Oumarou Dicko + * Michael Sills-Lavoie + * Alexis Halle + * + * This library 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; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef LOWLEVEL_H +#define LOWLEVEL_H + +#include + +void finish_consuming_dead_subbuffer(struct libustd_callbacks *callbacks, struct buffer_info *buf); +size_t subbuffer_data_size(void *subbuf); + +#endif /* LOWLEVEL_H */ + diff --git a/ustctl/Makefile.am b/ustctl/Makefile.am index 94e8c00..49e46f0 100644 --- a/ustctl/Makefile.am +++ b/ustctl/Makefile.am @@ -5,12 +5,11 @@ AM_CFLAGS = -fno-strict-aliasing bin_PROGRAMS = ustctl ustctl_SOURCES = \ - ustctl.c \ - $(top_srcdir)/libustcmd/ustcmd.c \ - $(top_srcdir)/libustcmd/ustcmd.h + ustctl.c ustctl_CFLAGS = -DUST_COMPONENT=ustctl -fno-strict-aliasing ustctl_LDADD = \ $(top_builddir)/snprintf/libustsnprintf.la \ - $(top_builddir)/libustcomm/libustcomm.la + $(top_builddir)/libustcomm/libustcomm.la \ + $(top_builddir)/libustcmd/libustcmd.la diff --git a/ustctl/ustctl.c b/ustctl/ustctl.c index b9f2dce..8a5f6ba 100644 --- a/ustctl/ustctl.c +++ b/ustctl/ustctl.c @@ -22,8 +22,7 @@ #include #include -#include "ustcomm.h" -#include "ustcmd.h" +#include "ust/ustcmd.h" #include "usterr.h" enum command { diff --git a/ustd/ustd.c b/ustd/ustd.c index 18dbf63..7637b40 100644 --- a/ustd/ustd.c +++ b/ustd/ustd.c @@ -32,7 +32,7 @@ #include #include -#include "libustd.h" +#include "ust/ustd.h" #include "usterr.h" char *sock_path=NULL; -- 2.34.1