@@ -13,4 +13,8 @@ SUBDIRS = classifier \
timer \
traffic_mgmt
+if CODE_INSTRUM
+SUBDIRS += instrum
+endif
+
noinst_HEADERS = example_debug.h
@@ -16,7 +16,11 @@ AM_CFLAGS = \
$(HELPER_INCLUDES)
if STATIC_APPS
+if !CODE_INSTRUM
AM_LDFLAGS = -L$(LIB) -static
else
AM_LDFLAGS =
endif
+else
+AM_LDFLAGS =
+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");
+}
@@ -37,4 +37,5 @@ AC_CONFIG_FILES([example/classifier/Makefile
example/time/Makefile
example/timer/Makefile
example/traffic_mgmt/Makefile
+ example/instrum/Makefile
example/Makefile])