@@ -13,4 +13,8 @@ SUBDIRS = classifier \
ddf_ifs \
ddf_app
+if CODE_INSTRUM
+SUBDIRS += instrum
+endif
+
noinst_HEADERS = example_debug.h
@@ -13,4 +13,8 @@ AM_CFLAGS = \
-I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
-I$(top_builddir)/include
+if CODE_INSTRUM
+AM_LDFLAGS = -L$(LIB) -lssl -lcrypto -latomic
+else
AM_LDFLAGS = -L$(LIB) -static
+endif
new file mode 100644
@@ -0,0 +1,20 @@
+LIB = $(top_builddir)/lib
+
+AM_CFLAGS = \
+ -I$(srcdir) \
+ -I$(top_srcdir)/example \
+ -I$(top_srcdir)/platform/@with_platform@/include \
+ -I$(top_srcdir)/include/ \
+ -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
+ -I$(top_srcdir)/helper/include \
+ -I$(top_builddir)/platform/@with_platform@/include \
+ -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
+ -I$(top_builddir)/include \
+ -I$(PAPI_PATH)/include
+
+AM_LDFLAGS = -L$(PAPI_PATH)/lib -lpapi
+
+lib_LTLIBRARIES = $(LIB)/libinstrum.la
+
+__LIB__libinstrum_la_SOURCES = \
+ instrum.c
new file mode 100644
@@ -0,0 +1,18 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+static __attribute__((constructor)) void setup_wrappers(void)
+{
+ printf("Setup Wrappers\n");
+}
+
+static __attribute__((destructor)) void teardown_wrappers(void)
+{
+ printf("Teardown Wrappers\n");
+}
@@ -31,4 +31,5 @@ AC_CONFIG_FILES([example/classifier/Makefile
example/traffic_mgmt/Makefile
example/ddf_ifs/Makefile
example/ddf_app/Makefile
+ example/instrum/Makefile
example/Makefile])