1
EXTRA_DIST=test_atomic.template list_atomic.template run_parallel.inc \
3
# We distribute test_atomic_include.h, since it's hard to regenerate
4
# on Windows without sed.
6
BUILT_SOURCES = test_atomic_include.h list_atomic.i
7
CLEANFILES = test_atomic_include.h list_atomic.c list_atomic.i
9
AM_CPPFLAGS=-I$(srcdir)/../src
11
TESTS=test_atomic test_atomic_pthreads test_stack test_malloc
13
#create the test_atomic test program
14
check_PROGRAMS=test_atomic test_atomic_pthreads test_stack test_malloc
16
test_atomic_SOURCES=test_atomic.c
17
test_atomic_LDADD=-lpthread ../src/libatomic_ops.a
19
test_atomic_pthreads_SOURCES=test_atomic.c
20
test_atomic_pthreads_CPPFLAGS=-DAO_USE_PTHREAD_DEFS $(AM_CPPFLAGS)
21
test_atomic_pthreads_LDADD=-lpthread ../src/libatomic_ops.a
23
test_stack_SOURCES=test_stack.c
24
test_stack_LDADD=-lpthread ../src/libatomic_ops_gpl.a ../src/libatomic_ops.a
26
test_malloc_SOURCES=test_malloc.c
27
test_malloc_LDADD=-lpthread ../src/libatomic_ops_gpl.a ../src/libatomic_ops.a
29
test_atomic_include.h: test_atomic.template
31
sed -e s/XX/_release/ $? >> $@
32
sed -e s/XX/_acquire/ $? >> $@
33
sed -e s/XX/_read/ $? >> $@
34
sed -e s/XX/_write/ $? >> $@
35
sed -e s/XX/_full/ $? >> $@
36
sed -e s/XX/_release_write/ $? >> $@
37
sed -e s/XX/_acquire_read/ $? >> $@
39
list_atomic.c: list_atomic.template
40
echo "#include \"atomic_ops.h\" " > $@
41
sed -e s/XX// $? >> $@
42
sed -e s/XX/_release/ $? >> $@
43
sed -e s/XX/_acquire/ $? >> $@
44
sed -e s/XX/_read/ $? >> $@
45
sed -e s/XX/_write/ $? >> $@
46
sed -e s/XX/_full/ $? >> $@
47
sed -e s/XX/_release_write/ $? >> $@
48
sed -e s/XX/_acquire_read/ $? >> $@
50
list_atomic.i: list_atomic.c
51
$(COMPILE) $? -E > list_atomic.i