aboutsummaryrefslogtreecommitdiff
path: root/example/classifier/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'example/classifier/Makefile.am')
-rw-r--r--example/classifier/Makefile.am36
1 files changed, 30 insertions, 6 deletions
diff --git a/example/classifier/Makefile.am b/example/classifier/Makefile.am
index 0c66e145b..4be6648b6 100644
--- a/example/classifier/Makefile.am
+++ b/example/classifier/Makefile.am
@@ -1,10 +1,34 @@
include $(top_srcdir)/example/Makefile.inc
-bin_PROGRAMS = odp_classifier$(EXEEXT)
-odp_classifier_LDFLAGS = $(AM_LDFLAGS) -static
-odp_classifier_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
+bin_PROGRAMS = odp_classifier
-noinst_HEADERS = \
- $(top_srcdir)/example/example_debug.h
+odp_classifier_SOURCES = odp_classifier.c
-dist_odp_classifier_SOURCES = odp_classifier.c
+if test_example
+if ODP_PKTIO_PCAP
+TESTS = odp_classifier_run.sh
+endif
+endif
+EXTRA_DIST = odp_classifier_run.sh udp64.pcap
+
+# If building out-of-tree, make check will not copy the scripts and data to the
+# $(builddir) assuming that all commands are run locally. However this prevents
+# running tests on a remote target using LOG_COMPILER.
+# So copy all script and data files explicitly here.
+all-local:
+ if [ "x$(srcdir)" != "x$(builddir)" ]; then \
+ for f in $(EXTRA_DIST); do \
+ if [ -e $(srcdir)/$$f ]; then \
+ mkdir -p $(builddir)/$$(dirname $$f); \
+ cp -f $(srcdir)/$$f $(builddir)/$$f; \
+ fi \
+ done \
+ fi
+ ln -f -s $(top_srcdir)/platform/$(with_platform)/test/example/classifier/pktio_env \
+ pktio_env
+clean-local:
+ if [ "x$(srcdir)" != "x$(builddir)" ]; then \
+ for f in $(EXTRA_DIST); do \
+ rm -f $(builddir)/$$f; \
+ done \
+ fi