fix define-module ordering
[bpt/guile.git] / test-suite / standalone / Makefile.am
CommitLineData
d7a88afe
KR
1## Process this file with automake to produce Makefile.in.
2##
2ddf0851
LC
3## Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4## 2011 Free Software Foundation, Inc.
d7a88afe
KR
5##
6## This file is part of GUILE.
7##
53befeb7
NJ
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.
d7a88afe 12##
53befeb7
NJ
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.
d7a88afe 17##
53befeb7
NJ
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
d7a88afe 22
a572fc95 23include $(top_srcdir)/am/snarf
6405ae86
RB
24
25# initializations so we can use += below.
26TESTS =
27noinst_LTLIBRARIES =
28check_PROGRAMS =
29check_SCRIPTS =
30BUILT_SOURCES =
56ae2148 31EXTRA_DIST =
6405ae86 32
e4ca305f 33TESTS_ENVIRONMENT = \
5b98517a 34 builddir="$(builddir)" \
e4ca305f 35 GUILE_AUTO_COMPILE=0 "${top_builddir}/meta/uninstalled-env"
6405ae86 36
a6648037
KR
37## Check for headers in $(srcdir) and bulid dir before $(CPPFLAGS), which
38## may point us to an old, installed version of guile.
39AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \
40 -I$(top_srcdir)/lib -I$(top_builddir)/lib
41
eedcb08a 42test_cflags = \
a6648037 43 -I$(top_srcdir)/test-suite/standalone -I. \
bfb2e113 44 $(EXTRA_DEFS) $(GUILE_CFLAGS) $(GCC_CFLAGS)
ae90bbb5 45
7108b7b8 46AM_LDFLAGS = $(GUILE_CFLAGS)
6405ae86 47
6a94e6e1
LC
48# How to link with libguile (same as `Libs' in `guile-2.0.pc'.)
49LIBGUILE_LDADD = \
50 ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la \
51 $(BDW_GC_LIBS)
52
53
a6648037
KR
54snarfcppopts = \
55 -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib -I$(top_builddir) \
56 -I. $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS)
eedcb08a 57
23d72566
KR
58SUFFIXES = .x
59.c.x:
a572fc95 60 $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
6405ae86 61
8f9ae7fd 62CLEANFILES = *.x
6405ae86
RB
63
64.DELETE_ON_ERROR:
65
060ffedf
RB
66check_SCRIPTS += test-system-cmds
67TESTS += test-system-cmds
68
d69668b7
NJ
69check_SCRIPTS += test-bad-identifiers
70TESTS += test-bad-identifiers
71
87681707
RB
72check_SCRIPTS += test-require-extension
73TESTS += test-require-extension
74
2dea6a4d
BT
75check_SCRIPTS += test-guile-snarf
76TESTS += test-guile-snarf
77
ad4bd7c2
AW
78check_SCRIPTS += test-import-order
79TESTS += test-import-order
80EXTRA_DIST += test-import-order-a.scm test-import-order-b.scm \
81 test-import-order-c.scm test-import-order-d.scm
82
6405ae86
RB
83# test-num2integral
84test_num2integral_SOURCES = test-num2integral.c
85test_num2integral_CFLAGS = ${test_cflags}
6a94e6e1 86test_num2integral_LDADD = $(LIBGUILE_LDADD)
6405ae86
RB
87check_PROGRAMS += test-num2integral
88TESTS += test-num2integral
89
be4381fa
KR
90# test-round
91test_round_CFLAGS = ${test_cflags}
6a94e6e1 92test_round_LDADD = $(LIBGUILE_LDADD)
be4381fa
KR
93check_PROGRAMS += test-round
94TESTS += test-round
95
2ddf0851
LC
96if HAVE_SHARED_LIBRARIES
97
6405ae86
RB
98# test-asmobs
99noinst_LTLIBRARIES += libtest-asmobs.la
a150c156 100libtest_asmobs_la_SOURCES = test-asmobs-lib.c
6405ae86 101libtest_asmobs_la_CFLAGS = ${test_cflags}
cb26e97a 102libtest_asmobs_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
6a94e6e1 103libtest_asmobs_la_LIBADD = $(LIBGUILE_LDADD)
8f9ae7fd 104BUILT_SOURCES += test-asmobs-lib.x
6405ae86
RB
105check_SCRIPTS += test-asmobs
106TESTS += test-asmobs
107
37371ea1
AW
108# test-ffi
109noinst_LTLIBRARIES += libtest-ffi.la
a150c156 110libtest_ffi_la_SOURCES = test-ffi-lib.c
37371ea1 111libtest_ffi_la_CFLAGS = ${test_cflags}
cb26e97a 112libtest_ffi_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
6a94e6e1 113libtest_ffi_la_LIBADD = $(LIBGUILE_LDADD)
37371ea1
AW
114check_SCRIPTS += test-ffi
115TESTS += test-ffi
116
2ddf0851
LC
117endif HAVE_SHARED_LIBRARIES
118
d7a88afe
KR
119# test-list
120test_list_SOURCES = test-list.c
121test_list_CFLAGS = ${test_cflags}
6a94e6e1 122test_list_LDADD = $(LIBGUILE_LDADD)
d7a88afe
KR
123check_PROGRAMS += test-list
124TESTS += test-list
125
3c8fb18e
MV
126# test-unwind
127test_unwind_SOURCES = test-unwind.c
128test_unwind_CFLAGS = ${test_cflags}
6a94e6e1 129test_unwind_LDADD = $(LIBGUILE_LDADD)
3c8fb18e
MV
130check_PROGRAMS += test-unwind
131TESTS += test-unwind
132
2aac7a48
MV
133# test-conversion
134test_conversion_SOURCES = test-conversion.c
135test_conversion_CFLAGS = ${test_cflags}
6a94e6e1 136test_conversion_LDADD = $(LIBGUILE_LDADD)
2aac7a48
MV
137check_PROGRAMS += test-conversion
138TESTS += test-conversion
139
440ae510
NJ
140# test-loose-ends
141test_loose_ends_SOURCES = test-loose-ends.c
142test_loose_ends_CFLAGS = ${test_cflags}
6a94e6e1 143test_loose_ends_LDADD = $(LIBGUILE_LDADD)
440ae510
NJ
144check_PROGRAMS += test-loose-ends
145TESTS += test-loose-ends
146
a9931e4e
NJ
147# test-fast-slot-ref
148check_SCRIPTS += test-fast-slot-ref
149TESTS += test-fast-slot-ref
150
f80ed1be
AW
151# test-mb-regexp
152check_SCRIPTS += test-mb-regexp
153TESTS += test-mb-regexp
154
23d72566 155# test-use-srfi
4505fbb1 156check_SCRIPTS += test-use-srfi
23d72566
KR
157TESTS += test-use-srfi
158
8e7ff773
LC
159# test-scm-c-read
160test_scm_c_read_SOURCES = test-scm-c-read.c
161test_scm_c_read_CFLAGS = ${test_cflags}
6a94e6e1 162test_scm_c_read_LDADD = $(LIBGUILE_LDADD)
8e7ff773
LC
163check_PROGRAMS += test-scm-c-read
164TESTS += test-scm-c-read
165
05588a1a
LC
166# test-scm-take-locale-symbol
167test_scm_take_locale_symbol_SOURCES = test-scm-take-locale-symbol.c
168test_scm_take_locale_symbol_CFLAGS = ${test_cflags}
6a94e6e1 169test_scm_take_locale_symbol_LDADD = $(LIBGUILE_LDADD)
05588a1a
LC
170check_PROGRAMS += test-scm-take-locale-symbol
171TESTS += test-scm-take-locale-symbol
172
f538a070
LC
173# test-scm-take-u8vector
174test_scm_take_u8vector_SOURCES = test-scm-take-u8vector.c
175test_scm_take_u8vector_CFLAGS = ${test_cflags}
6a94e6e1 176test_scm_take_u8vector_LDADD = $(LIBGUILE_LDADD)
f538a070
LC
177check_PROGRAMS += test-scm-take-u8vector
178TESTS += test-scm-take-u8vector
179
2ddf0851
LC
180if HAVE_SHARED_LIBRARIES
181
a44c4336
AW
182# test-extensions
183noinst_LTLIBRARIES += libtest-extensions.la
184libtest_extensions_la_SOURCES = test-extensions-lib.c
185libtest_extensions_la_CFLAGS = ${test_cflags}
cb26e97a 186libtest_extensions_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
6a94e6e1 187libtest_extensions_la_LIBADD = $(LIBGUILE_LDADD)
a44c4336
AW
188check_SCRIPTS += test-extensions
189TESTS += test-extensions
190
2ddf0851
LC
191endif HAVE_SHARED_LIBRARIES
192
56ae2148
LC
193if BUILD_PTHREAD_SUPPORT
194
3ac8359a
NJ
195# test-with-guile-module
196test_with_guile_module_CFLAGS = ${test_cflags}
6a94e6e1 197test_with_guile_module_LDADD = $(LIBGUILE_LDADD)
3ac8359a
NJ
198check_PROGRAMS += test-with-guile-module
199TESTS += test-with-guile-module
200
ccf1ca4a 201test_scm_with_guile_CFLAGS = ${test_cflags}
6a94e6e1 202test_scm_with_guile_LDADD = $(LIBGUILE_LDADD)
ccf1ca4a
LC
203check_PROGRAMS += test-scm-with-guile
204TESTS += test-scm-with-guile
205
4a235623
LC
206test_scm_spawn_thread_CFLAGS = ${test_cflags}
207test_scm_spawn_thread_LDADD = $(LIBGUILE_LDADD)
208check_PROGRAMS += test-scm-spawn-thread
209TESTS += test-scm-spawn-thread
210
211test_pthread_create_CFLAGS = ${test_cflags}
212test_pthread_create_LDADD = $(LIBGUILE_LDADD)
213check_PROGRAMS += test-pthread-create
214TESTS += test-pthread-create
215
216test_pthread_create_secondary_CFLAGS = ${test_cflags} $(BDW_GC_CFLAGS)
217test_pthread_create_secondary_LDADD = $(LIBGUILE_LDADD)
218check_PROGRAMS += test-pthread-create-secondary
219TESTS += test-pthread-create-secondary
220
56ae2148
LC
221else
222
ccf1ca4a 223EXTRA_DIST += test-with-guile-module.c test-scm-with-guile.c
56ae2148
LC
224
225endif
226
56ae2148 227EXTRA_DIST += ${check_SCRIPTS}