From 683f2b832388d08999620ee45cb619a7afd42aaf Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Fri, 3 May 2013 23:03:58 +0200 Subject: src/Makefile.am: build static lib for unit tests if enabled --- src/Makefile.am | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am index 814af6ed0..9cf15455b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -66,6 +66,14 @@ curl_LDFLAGS = @LIBMETALINK_LDFLAGS@ curl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS) curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la +# if unit tests are enabled, build a static library to link them with +if BUILD_UNITTESTS +noinst_LTLIBRARIES = libcurltool.la +libcurltool_la_CFLAGS = -DUNITTESTS +libcurltool_la_LDFLAGS = -static $(LINKFLAGS) +libcurltool_la_SOURCES = $(curl_SOURCES) +endif + BUILT_SOURCES = tool_hugehelp.c CLEANFILES = tool_hugehelp.c # Use the C locale to ensure that only ASCII characters appear in the -- cgit v1.2.3