diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2014-02-20 13:16:57 +0000 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2014-02-20 13:16:57 +0000 |
commit | e4791b96c8c3d172b25db65f15f46d086362c0f1 (patch) | |
tree | 5fd5b6f52ae97d470333b395e9c76d44ae8cc5f3 | |
parent | f5dd0355a32915d9524004e8b1c0e0a6b360c604 (diff) | |
download | libmicrohttpd-e4791b96c8c3d172b25db65f15f46d086362c0f1.tar.gz libmicrohttpd-e4791b96c8c3d172b25db65f15f46d086362c0f1.zip |
create W32 static lib with MS lib.exe if available
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/microhttpd/Makefile.am | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8d5b9e6a..c6159d00 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -206,6 +206,7 @@ if test "x$enable_shared" = "xyes" && test "x$os_is_native_w32" = "xyes"; then | |||
206 | fi | 206 | fi |
207 | AM_CONDITIONAL(W32_SHARED_LIB_EXP, [test "x$w32_shared_lib_exp" = "xyes"]) | 207 | AM_CONDITIONAL(W32_SHARED_LIB_EXP, [test "x$w32_shared_lib_exp" = "xyes"]) |
208 | AM_CONDITIONAL(USE_MS_LIB_TOOL, [test "x$ac_cv_use_ms_lib_tool" = "xyes"]) | 208 | AM_CONDITIONAL(USE_MS_LIB_TOOL, [test "x$ac_cv_use_ms_lib_tool" = "xyes"]) |
209 | AM_CONDITIONAL(W32_STATIC_LIB, [test "x$os_is_native_w32" = "xyes" && test "x$enable_static" = "xyes"]) | ||
209 | 210 | ||
210 | 211 | ||
211 | if test "$enable_epoll" = "yes" | 212 | if test "$enable_epoll" = "yes" |
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am index ee39c31b..489a3a22 100644 --- a/src/microhttpd/Makefile.am +++ b/src/microhttpd/Makefile.am | |||
@@ -43,6 +43,18 @@ else | |||
43 | W32_MHD_LIB_LDFLAGS = | 43 | W32_MHD_LIB_LDFLAGS = |
44 | endif | 44 | endif |
45 | 45 | ||
46 | if W32_STATIC_LIB | ||
47 | noinst_DATA += $(lt_cv_objdir)/libmicrohttpd-static.lib | ||
48 | MOSTLYCLEANFILES += $(lt_cv_objdir)/libmicrohttpd-static.lib | ||
49 | |||
50 | $(lt_cv_objdir)/libmicrohttpd-static.lib: libmicrohttpd.la $(libmicrohttpd_la_OBJECTS) | ||
51 | if USE_MS_LIB_TOOL | ||
52 | $(MS_LIB_TOOL) -out:$@ $(libmicrohttpd_la_OBJECTS:.lo=.o) | ||
53 | else | ||
54 | cp $(lt_cv_objdir)/libmicrohttpd.a $@ | ||
55 | endif | ||
56 | endif | ||
57 | |||
46 | 58 | ||
47 | libmicrohttpd_la_SOURCES = \ | 59 | libmicrohttpd_la_SOURCES = \ |
48 | connection.c connection.h \ | 60 | connection.c connection.h \ |