aboutsummaryrefslogtreecommitdiff
path: root/helper/test/Makefile.am
blob: 57e54cfb8ce8e79b200e517d458f7081d95935da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
include $(top_srcdir)/test/Makefile.inc

EXECUTABLES = version \
	      debug \
	      chksum \
              cuckootable \
              parse\
              table \
              iplookuptable

#These are platform specific extensions that are not portable
#They are a convenience to app writers who have chosen to
#restrict their application to Linux.

if helper_linux
EXECUTABLES += linux/pthread \
	       linux/process
linux_pthread_SOURCES = linux/pthread.c
linux_process_SOURCES = linux/process.c
endif

if helper_cli
EXECUTABLES += cli
cli_SOURCES = cli.c
endif

COMPILE_ONLY = odpthreads

TESTSCRIPTS = odpthreads_as_processes \
	      odpthreads_as_pthreads

if test_helper
TESTS = $(EXECUTABLES) $(TESTSCRIPTS)
endif

test_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)

EXTRA_DIST =  odpthreads_as_processes odpthreads_as_pthreads

chksum_SOURCES = chksum.c
cuckootable_SOURCES = cuckootable.c
odpthreads_SOURCES = odpthreads.c
parse_SOURCES = parse.c
table_SOURCES = table.c
iplookuptable_SOURCES = iplookuptable.c
version_SOURCES = version.c
debug_SOURCES = debug.c

# 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 $(dist_check_SCRIPTS); do \
			if [ -e $(srcdir)/$$f ]; then \
				mkdir -p $(builddir)/$$(dirname $$f); \
				cp -f $(srcdir)/$$f $(builddir)/$$f; \
			fi \
		done \
	fi
clean-local:
	if [ "x$(srcdir)" != "x$(builddir)" ]; then \
		for f in $(dist_check_SCRIPTS); do \
			rm -f $(builddir)/$$f; \
		done \
	fi