b21edd20d09dc25caad14eca2e51562df8937332
[bpt/guile.git] / test-suite / standalone / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2 ##
3 ## Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 ## 2011 Free Software Foundation, Inc.
5 ##
6 ## This file is part of GUILE.
7 ##
8 ## GUILE is free software; you can redistribute it and/or modify it
9 ## under the terms of the GNU Lesser General Public License as
10 ## published by the Free Software Foundation; either version 3, or
11 ## (at your option) any later version.
12 ##
13 ## GUILE is distributed in the hope that it will be useful, but
14 ## WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ## GNU Lesser General Public License for more details.
17 ##
18 ## You should have received a copy of the GNU Lesser General Public
19 ## License along with GUILE; see the file COPYING.LESSER. If not,
20 ## write to the Free Software Foundation, Inc., 51 Franklin Street,
21 ## Fifth Floor, Boston, MA 02110-1301 USA
22
23 include $(top_srcdir)/am/snarf
24
25 # initializations so we can use += below.
26 TESTS =
27 noinst_LTLIBRARIES =
28 check_PROGRAMS =
29 check_SCRIPTS =
30 BUILT_SOURCES =
31 EXTRA_DIST =
32
33 TESTS_ENVIRONMENT = \
34 builddir="$(builddir)" \
35 GUILE_AUTO_COMPILE=0 "${top_builddir}/meta/uninstalled-env"
36
37 ## Check for headers in $(srcdir) and bulid dir before $(CPPFLAGS), which
38 ## may point us to an old, installed version of guile.
39 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \
40 -I$(top_srcdir)/lib -I$(top_builddir)/lib
41
42 test_cflags = \
43 -I$(top_srcdir)/test-suite/standalone -I. \
44 $(EXTRA_DEFS) $(GUILE_CFLAGS) $(GCC_CFLAGS)
45
46 AM_LDFLAGS = $(GUILE_CFLAGS)
47
48 # How to link with libguile (same as `Libs' in `guile-2.0.pc'.)
49 LIBGUILE_LDADD = \
50 ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la \
51 $(BDW_GC_LIBS)
52
53
54 snarfcppopts = \
55 -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib -I$(top_builddir) \
56 -I. $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS)
57
58 SUFFIXES = .x
59 .c.x:
60 $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
61
62 CLEANFILES = *.x
63
64 .DELETE_ON_ERROR:
65
66 check_SCRIPTS += test-system-cmds
67 TESTS += test-system-cmds
68
69 check_SCRIPTS += test-bad-identifiers
70 TESTS += test-bad-identifiers
71
72 check_SCRIPTS += test-require-extension
73 TESTS += test-require-extension
74
75 check_SCRIPTS += test-guile-snarf
76 TESTS += test-guile-snarf
77
78 # test-num2integral
79 test_num2integral_SOURCES = test-num2integral.c
80 test_num2integral_CFLAGS = ${test_cflags}
81 test_num2integral_LDADD = $(LIBGUILE_LDADD)
82 check_PROGRAMS += test-num2integral
83 TESTS += test-num2integral
84
85 # test-round
86 test_round_CFLAGS = ${test_cflags}
87 test_round_LDADD = $(LIBGUILE_LDADD)
88 check_PROGRAMS += test-round
89 TESTS += test-round
90
91 if HAVE_SHARED_LIBRARIES
92
93 # test-asmobs
94 noinst_LTLIBRARIES += libtest-asmobs.la
95 libtest_asmobs_la_SOURCES = test-asmobs-lib.c
96 libtest_asmobs_la_CFLAGS = ${test_cflags}
97 libtest_asmobs_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
98 libtest_asmobs_la_LIBADD = $(LIBGUILE_LDADD)
99 BUILT_SOURCES += test-asmobs-lib.x
100 check_SCRIPTS += test-asmobs
101 TESTS += test-asmobs
102
103 # test-ffi
104 noinst_LTLIBRARIES += libtest-ffi.la
105 libtest_ffi_la_SOURCES = test-ffi-lib.c
106 libtest_ffi_la_CFLAGS = ${test_cflags}
107 libtest_ffi_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
108 libtest_ffi_la_LIBADD = $(LIBGUILE_LDADD)
109 check_SCRIPTS += test-ffi
110 TESTS += test-ffi
111
112 endif HAVE_SHARED_LIBRARIES
113
114 # test-list
115 test_list_SOURCES = test-list.c
116 test_list_CFLAGS = ${test_cflags}
117 test_list_LDADD = $(LIBGUILE_LDADD)
118 check_PROGRAMS += test-list
119 TESTS += test-list
120
121 # test-unwind
122 test_unwind_SOURCES = test-unwind.c
123 test_unwind_CFLAGS = ${test_cflags}
124 test_unwind_LDADD = $(LIBGUILE_LDADD)
125 check_PROGRAMS += test-unwind
126 TESTS += test-unwind
127
128 # test-conversion
129 test_conversion_SOURCES = test-conversion.c
130 test_conversion_CFLAGS = ${test_cflags}
131 test_conversion_LDADD = $(LIBGUILE_LDADD)
132 check_PROGRAMS += test-conversion
133 TESTS += test-conversion
134
135 # test-loose-ends
136 test_loose_ends_SOURCES = test-loose-ends.c
137 test_loose_ends_CFLAGS = ${test_cflags}
138 test_loose_ends_LDADD = $(LIBGUILE_LDADD)
139 check_PROGRAMS += test-loose-ends
140 TESTS += test-loose-ends
141
142 # test-fast-slot-ref
143 check_SCRIPTS += test-fast-slot-ref
144 TESTS += test-fast-slot-ref
145
146 # test-mb-regexp
147 check_SCRIPTS += test-mb-regexp
148 TESTS += test-mb-regexp
149
150 # test-use-srfi
151 check_SCRIPTS += test-use-srfi
152 TESTS += test-use-srfi
153
154 # test-scm-c-read
155 test_scm_c_read_SOURCES = test-scm-c-read.c
156 test_scm_c_read_CFLAGS = ${test_cflags}
157 test_scm_c_read_LDADD = $(LIBGUILE_LDADD)
158 check_PROGRAMS += test-scm-c-read
159 TESTS += test-scm-c-read
160
161 # test-scm-take-locale-symbol
162 test_scm_take_locale_symbol_SOURCES = test-scm-take-locale-symbol.c
163 test_scm_take_locale_symbol_CFLAGS = ${test_cflags}
164 test_scm_take_locale_symbol_LDADD = $(LIBGUILE_LDADD)
165 check_PROGRAMS += test-scm-take-locale-symbol
166 TESTS += test-scm-take-locale-symbol
167
168 # test-scm-take-u8vector
169 test_scm_take_u8vector_SOURCES = test-scm-take-u8vector.c
170 test_scm_take_u8vector_CFLAGS = ${test_cflags}
171 test_scm_take_u8vector_LDADD = $(LIBGUILE_LDADD)
172 check_PROGRAMS += test-scm-take-u8vector
173 TESTS += test-scm-take-u8vector
174
175 if HAVE_SHARED_LIBRARIES
176
177 # test-extensions
178 noinst_LTLIBRARIES += libtest-extensions.la
179 libtest_extensions_la_SOURCES = test-extensions-lib.c
180 libtest_extensions_la_CFLAGS = ${test_cflags}
181 libtest_extensions_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
182 libtest_extensions_la_LIBADD = $(LIBGUILE_LDADD)
183 check_SCRIPTS += test-extensions
184 TESTS += test-extensions
185
186 endif HAVE_SHARED_LIBRARIES
187
188 if BUILD_PTHREAD_SUPPORT
189
190 # test-with-guile-module
191 test_with_guile_module_CFLAGS = ${test_cflags}
192 test_with_guile_module_LDADD = $(LIBGUILE_LDADD)
193 check_PROGRAMS += test-with-guile-module
194 TESTS += test-with-guile-module
195
196 test_scm_with_guile_CFLAGS = ${test_cflags}
197 test_scm_with_guile_LDADD = $(LIBGUILE_LDADD)
198 check_PROGRAMS += test-scm-with-guile
199 TESTS += test-scm-with-guile
200
201 else
202
203 EXTRA_DIST += test-with-guile-module.c test-scm-with-guile.c
204
205 endif
206
207 EXTRA_DIST += ${check_SCRIPTS}