From fc17f7eb70be2555a6b1cf4444dd75a9058adfeb Mon Sep 17 00:00:00 2001 From: compudj Date: Mon, 25 Aug 2003 18:05:56 +0000 Subject: [PATCH] Makefile.am fixed git-svn-id: http://ltt.polymtl.ca/svn@184 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/configure.in | 5 ++++- ltt/branches/poly/include/ltt/ltt.h | 17 +++++++++++++++++ ltt/branches/poly/ltt/Makefile.am | 2 +- ltt/branches/poly/lttv/Makefile.am | 18 +++++++++--------- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/ltt/branches/poly/configure.in b/ltt/branches/poly/configure.in index 9435ae8e..43621d25 100644 --- a/ltt/branches/poly/configure.in +++ b/ltt/branches/poly/configure.in @@ -45,7 +45,10 @@ lttlibdir="${libdir}/ltt" AC_SUBST(lttlibdir) -DEFAULT_INCLUDES="-I\$(top_srcdir)/include" +top_includedir="\$(top_srcdir)/include" +AC_SUBST(top_includedir) + +DEFAULT_INCLUDES="-I\$(top_includedir)" AC_SUBST(DEFAULT_INCLUDES) #CPPFLAGS="${GLIB_CFLAGS}" diff --git a/ltt/branches/poly/include/ltt/ltt.h b/ltt/branches/poly/include/ltt/ltt.h index d177e946..fc00a14d 100644 --- a/ltt/branches/poly/include/ltt/ltt.h +++ b/ltt/branches/poly/include/ltt/ltt.h @@ -124,6 +124,23 @@ do \ }\ } while(0) +/* (T2 = T1 * FLOAT) */ +/* WARNING : use this multiplicator carefully : on 32 bits, multiplying + * by more than 4 could overflow the tv_nsec. + */ +#define TimeMul(T2, T1, FLOAT) \ +do \ +{\ + (T2).tv_sec = (T1).tv_sec * (FLOAT); \ + (T2).tv_nsec = (T1).tv_nsec * (FLOAT); \ + if((T2).tv_nsec >= 1000000000)\ + {\ + (T2).tv_sec += (T3).tv_nsec / 1000000000;\ + (T2).tv_nsec = (T3).tv_nsec % 1000000000;\ + }\ +} while(0) + + #include diff --git a/ltt/branches/poly/ltt/Makefile.am b/ltt/branches/poly/ltt/Makefile.am index 995d3e00..8af7e869 100644 --- a/ltt/branches/poly/ltt/Makefile.am +++ b/ltt/branches/poly/ltt/Makefile.am @@ -15,6 +15,6 @@ lib_LTLIBRARIES = libtraceread.la libtraceread_la_SOURCES = event.c facility.c parser.c tracefile.c type.c \ parser.h -libtraceread_la_DEPENDENCIES = $(DEFAULT_INCLUDES)/ltt/LTTTypes.h +libtraceread_la_DEPENDENCIES = ${top_includedir}/ltt/LTTTypes.h EXTRA_DIST = crc32.tab diff --git a/ltt/branches/poly/lttv/Makefile.am b/ltt/branches/poly/lttv/Makefile.am index 0b603eaf..0ef152ea 100644 --- a/ltt/branches/poly/lttv/Makefile.am +++ b/ltt/branches/poly/lttv/Makefile.am @@ -12,15 +12,15 @@ bin_PROGRAMS = lttv lttv_SOURCES = main.c module.c option.c hook.c attribute.c \ iattribute.c processTrace.c state.c traceset.c -#lttv_DEPENDENCIES = $(DEFAULT_INCLUDES)/lttv/lttv.h \ -# $(DEFAULT_INCLUDES)/lttv/module.h \ -# $(DEFAULT_INCLUDES)/lttv/option.h \ -# $(DEFAULT_INCLUDES)/lttv/hook.h \ -# $(DEFAULT_INCLUDES)/lttv/attribute.h \ -# $(DEFAULT_INCLUDES)/lttv/iattribute.h \ -# $(DEFAULT_INCLUDES)/lttv/processTrace.h \ -# $(DEFAULT_INCLUDES)/lttv/state.h \ -# $(DEFAULT_INCLUDES)/lttv/traceset.h +lttv_DEPENDENCIES = $(top_includedir)/lttv/lttv.h \ + $(top_includedir)/lttv/module.h \ + $(top_includedir)/lttv/option.h \ + $(top_includedir)/lttv/hook.h \ + $(top_includedir)/lttv/attribute.h \ + $(top_includedir)/lttv/iattribute.h \ + $(top_includedir)/lttv/processTrace.h \ + $(top_includedir)/lttv/state.h \ + $(top_includedir)/lttv/traceset.h libdir = ${lttvplugindir} -- 2.34.1