aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/Makefile.am
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-01-03 22:16:16 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-01-03 22:16:16 +0100
commit53640a3ce09a433a92d88d864b2b062b0a684c59 (patch)
tree229497c12f421c305de56da0a6c75f04169bc089 /tests/unit/Makefile.am
parent35e1d6538a8767526b9cae66134441b146503a21 (diff)
unittesting: build a separate static lib
When configure --enable-debug has been used, all files in lib/ are now built twice and a separate static library crafted for unit-testing will be linked. The unit tests in the tests/unit subdir will use that library.
Diffstat (limited to 'tests/unit/Makefile.am')
-rw-r--r--tests/unit/Makefile.am13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am
index 69792283f..501ddebe0 100644
--- a/tests/unit/Makefile.am
+++ b/tests/unit/Makefile.am
@@ -52,11 +52,13 @@ INCLUDES = -I$(top_builddir)/include/curl \
-I$(top_srcdir)/tests/libtest
endif
+if CURLDEBUG
+
EXTRA_DIST = Makefile.inc
-LDADD = $(top_srcdir)/tests/libtest/first.o $(top_builddir)/lib/libcurl.la \
+LDADD = $(top_srcdir)/tests/libtest/first.o $(top_builddir)/lib/libcurlu.la \
@CURL_LIBS@
-DEPENDENCIES = $(top_builddir)/lib/libcurl.la
+DEPENDENCIES = $(top_builddir)/lib/libcurlu.la
# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
# noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
@@ -66,3 +68,10 @@ if NO_UNDEFINED
# The -no-undefined flag is crucial to build fine on some platforms
UNDEF = -no-undefined
endif
+
+
+else
+# do nothing if debug was not enabled
+all:
+
+endif \ No newline at end of file