1 include $(top_srcdir)/glib.mk
3 SUBDIRS = gobject refcount
5 LDADD = $(top_builddir)/glib/libglib-2.0.la
6 AM_CPPFLAGS = $(gmodule_INCLUDES) $(GLIB_DEBUG_FLAGS)
7 DEFS = -DGLIB_DISABLE_DEPRECATION_WARNINGS -DG_LOG_DOMAIN=\"GLib\"
10 # Some random programs that appear not to be testcases and not used from any testcases
16 # So far, this is the only gtester-ified testcase here
21 # These are not yet gtester-ified, so mark them as for 'installed' only so we
22 # don't run them under the framework. We will handle them manually below.
23 installed_test_programs = \
50 test_extra_programs = \
63 # These don't appear to work installed and we don't want to run them under gtester either...
64 dist_uninstalled_test_extra_scripts = \
65 run-collate-tests.sh \
66 run-assert-msg-test.sh \
71 iochannel-test-infile \
77 # Run the 'installed' tests manually in-tree.
78 # This will cause them to be built even if installed tests are disabled.
79 check_PROGRAMS += $(installed_test_programs) $(installed_test_extra_programs)
80 check_SCRIPTS += $(installed_test_scripts)
81 TESTS += $(installed_test_programs) $(dist_uninstalled_test_extra_scripts)
83 G_TEST_SRCDIR=$(abs_srcdir) \
84 G_TEST_BUILDDIR=$(abs_builddir) \
85 LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset \
87 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
89 test_programs += module-test
90 module_test_DEPENDENCIES = libmoduletestplugin_a.la libmoduletestplugin_b.la
91 module_test_LDADD = $(top_builddir)/gmodule/libgmodule-2.0.la $(LDADD)
92 module_test_LDFLAGS = $(G_MODULE_LDFLAGS)
93 slice_test_SOURCES = slice-test.c memchunks.c
94 slice_color_SOURCES = slice-color.c memchunks.c
95 slice_threadinit_LDADD = $(top_builddir)/gthread/libgthread-2.0.la $(LDADD)
97 test_ltlibraries = libmoduletestplugin_a.la libmoduletestplugin_b.la
99 libmoduletestplugin_a_la_SOURCES = libmoduletestplugin_a.c
100 libmoduletestplugin_a_la_LDFLAGS = $(G_MODULE_LDFLAGS) -avoid-version -module $(no_undefined)
101 libmoduletestplugin_a_la_LIBADD = $(G_MODULE_LIBS) ../gmodule/libgmodule-2.0.la ../glib/libglib-2.0.la
103 libmoduletestplugin_b_la_SOURCES = libmoduletestplugin_b.c
104 libmoduletestplugin_b_la_LDFLAGS = $(G_MODULE_LDFLAGS) -avoid-version -module $(no_undefined)
105 libmoduletestplugin_b_la_LIBADD = $(G_MODULE_LIBS) ../gmodule/libgmodule-2.0.la ../glib/libglib-2.0.la
107 if !ENABLE_INSTALLED_TESTS
108 # see http://lists.gnu.org/archive/html/bug-libtool/2013-05/msg00009.html and gio/tests/Makefile.am
109 libmoduletestplugin_a_la_LDFLAGS += -rpath /
110 libmoduletestplugin_b_la_LDFLAGS += -rpath /
113 dist-hook: $(BUILT_EXTRA_DIST)
114 files='$(BUILT_EXTRA_DIST)'; \
115 for f in $$files; do \
116 if test -f $$f; then d=.; else d=$(srcdir); fi; \
117 cp $$d/$$f $(distdir) || exit 1; \
119 mkdir $(distdir)/collate; \
120 for f in $(srcdir)/collate/* ; do \
121 if test -f $$f; then cp $$f $(distdir)/collate; fi; \
125 installed_test_programs += cxx-test
126 cxx_test_SOURCES = cxx-test.C
130 installed_test_programs += timeloop
134 no_undefined = -no-undefined
136 module_test_exp = module-test.exp
138 module-test.exp: module-test.o
139 $(DLLTOOL) --output-exp module-test.exp module-test.o
141 installed_test_extra_programs = spawn-test-win32-gui
143 spawn_test_win32_gui_LDFLAGS = -mwindows
150 gen-casefold-txt.pl \
152 iochannel-test-infile \
156 BUILT_EXTRA_DIST += \
160 iochannel-test-outfile \
161 file-test-get-contents \