-if WITH_TESTS
-TESTS_DIR = tests
-EXPORT_PATT = '^_?gcr_*'
-else
-TESTS_DIR =
-EXPORT_PATT = '^gcr_*'
-endif
-
-SUBDIRS = . \
- $(TESTS_DIR)
-
# ------------------------------------------------------------------
# UI BUILDER
#
BUILT_SOURCES = \
gcr-marshal.c gcr-marshal.h
-lib_LTLIBRARIES = libgcr@GCR_VERSION_SUFFIX@.la
-
-libgcr@GCR_VERSION_SUFFIX@_la_SOURCES = \
+LIB_SOURCES = \
gcr-certificate.c gcr-certificate.h \
gcr-certificate-chain.c gcr-certificate-chain.h \
gcr-certificate-renderer.c gcr-certificate-renderer.h \
gcr-viewer.c gcr-viewer.h \
$(BUILT_SOURCES)
-libgcr@GCR_VERSION_SUFFIX@_la_CFLAGS = \
+LIB_CFLAGS = \
-DGCK_API_SUBJECT_TO_CHANGE \
-DGCR_API_SUBJECT_TO_CHANGE \
-DGCR_COMPILATION \
-DUIDIR=\""$(uidir)"\"
+lib_LTLIBRARIES = libgcr@GCR_VERSION_SUFFIX@.la
+
+libgcr@GCR_VERSION_SUFFIX@_la_SOURCES = $(LIB_SOURCES)
+
+libgcr@GCR_VERSION_SUFFIX@_la_CFLAGS = $(LIB_CFLAGS)
+
libgcr@GCR_VERSION_SUFFIX@_la_LDFLAGS = \
-version-info $(GCR_LT_RELEASE) \
-no-undefined \
- -export-symbols-regex $(EXPORT_PATT)
+ -export-symbols-regex '^gcr_*'
libgcr@GCR_VERSION_SUFFIX@_la_LIBADD = \
$(top_builddir)/egg/libegg.la \
gcr-$(GCR_MAJOR).pc: gcr.pc
cp gcr.pc gcr-$(GCR_MAJOR).pc
-# ----------------------------------------------------------------
-
EXTRA_DIST = \
gcr.pc.in \
gcr-marshal.list \
DISTCLEANFILES = \
$(pkgconfig_DATA)
+
+# ----------------------------------------------------------------
+# TESTS
+
+if WITH_TESTS
+
+TESTS_DIR = tests
+
+noinst_LTLIBRARIES = \
+ libgcr-testable.la
+
+libgcr_testable_la_SOURCES = $(LIB_SOURCES)
+
+libgcr_testable_la_CFLAGS = $(LIB_CFLAGS)
+
+libgcr_testable_la_LDFLAGS = \
+ -no-undefined
+
+else # WITH_TESTS
+
+TESTS_DIR =
+
+endif # WITH_TESTS
+
+# ----------------------------------------------------------------
+
+SUBDIRS = . \
+ $(TESTS_DIR)
$(LIBGCRYPT_CFLAGS)
LDADD = \
- $(top_builddir)/gcr/libgcr@GCR_VERSION_SUFFIX@.la \
+ $(top_builddir)/gcr/libgcr-testable.la \
$(top_builddir)/egg/libegg.la \
$(top_builddir)/egg/libegg-entry-buffer.la \
$(top_builddir)/gck/libgck.la \
$(GTK_LIBS) \
$(GLIB_LIBS) \
- $(LIBGCRYT_LIBS)
+ $(LIBGCRYPT_LIBS)
TEST_PROGS = \
test-certificate \