summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2013-05-03 23:03:58 +0200
committerKamil Dudka <kdudka@redhat.com>2013-05-06 15:03:12 +0200
commit683f2b832388d08999620ee45cb619a7afd42aaf (patch)
treeaa9632633cdcbaa972c799dd5e2ea7ffbc745987 /src/Makefile.am
parent2de20dd9a1c6ad4d576c60ab704c30abfc826b1a (diff)
downloadcurl-683f2b832388d08999620ee45cb619a7afd42aaf.tar.gz
src/Makefile.am: build static lib for unit tests if enabled
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am8
1 files changed, 8 insertions, 0 deletions
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