implemented Setup.hs to build boehm cpp libs and install them;
[hs-boehmgc.git] / gc-7.2 / libatomic_ops / tests / Makefile.am
1 EXTRA_DIST=test_atomic.template list_atomic.template run_parallel.inc \
2            test_atomic_include.h list_atomic.c
3 # We distribute test_atomic_include.h and list_atomic.c, since it is hard
4 # to regenerate them on Windows without sed.
5
6 BUILT_SOURCES = test_atomic_include.h list_atomic.i
7 CLEANFILES = list_atomic.i
8
9 AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src
10
11 if HAVE_PTHREAD_H
12 TESTS=test_atomic test_atomic_pthreads test_stack test_malloc
13 test_atomic_pthreads_SOURCES=$(test_atomic_SOURCES)
14 test_atomic_pthreads_CPPFLAGS=-DAO_USE_PTHREAD_DEFS $(AM_CPPFLAGS)
15 test_atomic_pthreads_LDADD=$(test_atomic_LDADD)
16 else
17 TESTS=test_atomic test_stack test_malloc
18 endif
19
20 check_PROGRAMS=$(TESTS)
21
22 test_atomic_SOURCES=test_atomic.c
23 test_atomic_LDADD=$(THREADDLLIBS) ../src/libatomic_ops.a
24
25 test_stack_SOURCES=test_stack.c
26 test_stack_LDADD=$(THREADDLLIBS) ../src/libatomic_ops_gpl.a \
27         ../src/libatomic_ops.a
28
29 test_malloc_SOURCES=test_malloc.c
30 test_malloc_LDADD=$(THREADDLLIBS) ../src/libatomic_ops_gpl.a \
31         ../src/libatomic_ops.a
32
33 test_atomic_include.h: test_atomic.template
34         sed -e s/XX// $? > $@
35         sed -e s/XX/_release/ $? >> $@
36         sed -e s/XX/_acquire/ $? >> $@
37         sed -e s/XX/_read/ $? >> $@
38         sed -e s/XX/_write/ $? >> $@
39         sed -e s/XX/_full/ $? >> $@
40         sed -e s/XX/_release_write/ $? >> $@
41         sed -e s/XX/_acquire_read/ $? >> $@
42
43 list_atomic.c: list_atomic.template
44         echo "#include \"atomic_ops.h\" " > $@
45         sed -e s/XX// $? >> $@
46         sed -e s/XX/_release/ $? >> $@
47         sed -e s/XX/_acquire/ $? >> $@
48         sed -e s/XX/_read/ $? >> $@
49         sed -e s/XX/_write/ $? >> $@
50         sed -e s/XX/_full/ $? >> $@
51         sed -e s/XX/_release_write/ $? >> $@
52         sed -e s/XX/_acquire_read/ $? >> $@
53
54 list_atomic.i: list_atomic.c
55         $(COMPILE) $? -E > list_atomic.i