Skip to content

Commit 4f0e796

Browse files
ddirenzomaurer
authored andcommitted
Added libtrace
Change-Id: I496f28d765153df6006ff48d5c2721a7ea1098b0
1 parent 1481fc4 commit 4f0e796

File tree

10 files changed

+1093
-0
lines changed

10 files changed

+1093
-0
lines changed

libtrace/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
AUTOMAKE_OPTIONS = subdir-objects
2+
SUBDIRS = src

libtrace/autogen.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
aclocal
6+
autoconf
7+
autoheader
8+
automake --add-missing --copy

libtrace/configure.ac

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# -*- Autoconf -*-
2+
# Process this file with autoconf to produce a configure script.
3+
4+
AC_PREREQ([2.64])
5+
AC_INIT([libtrace], [1.0], [[email protected]])
6+
AC_CONFIG_SRCDIR([src/trace.container.hpp])
7+
AC_CONFIG_HEADERS([src/config.h])
8+
9+
AM_INIT_AUTOMAKE([foreign])
10+
11+
AC_SUBST(INCDIRS)
12+
13+
# Checks for programs.
14+
AC_PROG_CXX
15+
AC_PROG_CC
16+
AC_PROG_CPP
17+
AC_PROG_RANLIB
18+
19+
# Checks for libraries.
20+
# FIXME: Replace `main' with a function in `-lpthread':
21+
AC_CHECK_LIB([pthread], [main])
22+
AC_CHECK_LIB([protobuf], [main])
23+
24+
# Checks for header files.
25+
AC_CHECK_HEADERS([stdint.h])
26+
27+
# Checks for typedefs, structures, and compiler characteristics.
28+
AC_HEADER_STDBOOL
29+
AC_C_INLINE
30+
AC_TYPE_SIZE_T
31+
AC_TYPE_UINT64_T
32+
AC_SYS_LARGEFILE
33+
AC_FUNC_FSEEKO
34+
35+
# Checks for library functions.
36+
AC_CHECK_FUNCS([memset])
37+
38+
AC_CONFIG_FILES([Makefile
39+
src/Makefile])
40+
AC_OUTPUT

libtrace/src/Makefile.am

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
AUTOMAKE_OPTIONS = subdir-objects
2+
# enable PIC for x64 support
3+
AM_CXXFLAGS = -fPIC -DPIC
4+
5+
lib_LIBRARIES = libtrace.a
6+
7+
PIQI = piqi
8+
PROTOC = protoc
9+
PIQIFILE = ../../frame.piqi
10+
11+
frame.piqi.pb.cc frame.piqi.pb.h: frame.piqi.proto
12+
$(PROTOC) $< --cpp_out=.
13+
14+
frame.piqi.proto: $(PIQIFILE)
15+
$(PIQI) to-proto $< -o $@
16+
17+
libtrace_a_SOURCES = frame.piqi.pb.h frame.piqi.pb.cc trace.container.cpp
18+
19+
utils_LDADD = libtrace.a -lprotobuf -lpthread
20+
21+
bin_PROGRAMS = readtrace copytrace
22+
readtrace_SOURCES = readtrace.cpp
23+
readtrace_LDADD = $(utils_LDADD)
24+
copytrace_SOURCES = copytrace.cpp
25+
copytrace_LDADD = $(utils_LDADD)

0 commit comments

Comments
 (0)