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