diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-02-18 13:00:11 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-02-18 13:00:11 +0100 |
commit | 21ee7de991140681bc29f8a24323237769d97856 (patch) | |
tree | a9a0343d9587ff946f809fe817162b515a3fe230 /src/lib | |
parent | aa12189a4b26393302b800dc2e5374d108cc34a9 (diff) | |
download | libmicrohttpd-21ee7de991140681bc29f8a24323237769d97856.tar.gz libmicrohttpd-21ee7de991140681bc29f8a24323237769d97856.zip |
add lib to ordinary build process, rename lib output to libmicrohttpd2.so, do not link libmicrohttpd2.so against gnutls/libgcrypt
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Makefile.am | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 320287d3..ce4dd8d4 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am | |||
@@ -5,54 +5,56 @@ AM_CPPFLAGS = \ | |||
5 | 5 | ||
6 | AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) | 6 | AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) |
7 | 7 | ||
8 | lib_LTLIBRARIES = \ | 8 | # Call "libmicrohttpd2" for now, but only while under |
9 | libmicrohttpd.la | 9 | # development. Once we have 'compat' working, this should be changed! |
10 | noinst_LTLIBRARIES = \ | ||
11 | libmicrohttpd2.la | ||
10 | 12 | ||
11 | noinst_DATA = | 13 | noinst_DATA = |
12 | MOSTLYCLEANFILES = | 14 | MOSTLYCLEANFILES = |
13 | 15 | ||
14 | if W32_SHARED_LIB_EXP | 16 | if W32_SHARED_LIB_EXP |
15 | W32_MHD_LIB_LDFLAGS = -Wl,--output-def,$(lt_cv_objdir)/libmicrohttpd.def -XCClinker -static-libgcc | 17 | W32_MHD_LIB_LDFLAGS = -Wl,--output-def,$(lt_cv_objdir)/libmicrohttpd2.def -XCClinker -static-libgcc |
16 | noinst_DATA += $(lt_cv_objdir)/libmicrohttpd.lib $(lt_cv_objdir)/libmicrohttpd.def $(lt_cv_objdir)/libmicrohttpd.exp | 18 | noinst_DATA += $(lt_cv_objdir)/libmicrohttpd2.lib $(lt_cv_objdir)/libmicrohttpd2.def $(lt_cv_objdir)/libmicrohttpd2.exp |
17 | MOSTLYCLEANFILES += $(lt_cv_objdir)/libmicrohttpd.lib $(lt_cv_objdir)/libmicrohttpd.def $(lt_cv_objdir)/libmicrohttpd.exp | 19 | MOSTLYCLEANFILES += $(lt_cv_objdir)/libmicrohttpd2.lib $(lt_cv_objdir)/libmicrohttpd2.def $(lt_cv_objdir)/libmicrohttpd2.exp |
18 | 20 | ||
19 | $(lt_cv_objdir)/libmicrohttpd.def: libmicrohttpd.la | 21 | $(lt_cv_objdir)/libmicrohttpd2.def: libmicrohttpd2.la |
20 | 22 | ||
21 | $(lt_cv_objdir)/libmicrohttpd.exp: $(lt_cv_objdir)/libmicrohttpd.lib | 23 | $(lt_cv_objdir)/libmicrohttpd2.exp: $(lt_cv_objdir)/libmicrohttpd2.lib |
22 | 24 | ||
23 | $(lt_cv_objdir)/libmicrohttpd.lib: $(lt_cv_objdir)/libmicrohttpd.def libmicrohttpd.la $(libmicrohttpd_la_OBJECTS) | 25 | $(lt_cv_objdir)/libmicrohttpd2.lib: $(lt_cv_objdir)/libmicrohttpd2.def libmicrohttpd2.la $(libmicrohttpd2_la_OBJECTS) |
24 | if USE_MS_LIB_TOOL | 26 | if USE_MS_LIB_TOOL |
25 | @echo Creating $@ and libmicrohttpd.exp by $(MS_LIB_TOOL)... && \ | 27 | @echo Creating $@ and libmicrohttpd2.exp by $(MS_LIB_TOOL)... && \ |
26 | dll_name=`$(EGREP) -o dlname=\'.+\' libmicrohttpd.la` && \ | 28 | dll_name=`$(EGREP) -o dlname=\'.+\' libmicrohttpd2.la` && \ |
27 | dll_name=$${dll_name#*\'} && dll_name=$${dll_name%\'} && test -n "$$dll_name" && \ | 29 | dll_name=$${dll_name#*\'} && dll_name=$${dll_name%\'} && test -n "$$dll_name" && \ |
28 | echo Creating $$dll_name by $(MS_LIB_TOOL).. && cd "$(lt_cv_objdir)" && \ | 30 | echo Creating $$dll_name by $(MS_LIB_TOOL).. && cd "$(lt_cv_objdir)" && \ |
29 | $(MS_LIB_TOOL) -def:libmicrohttpd.def -name:$$dll_name -out:libmicrohttpd.lib $(libmicrohttpd_la_OBJECTS:.lo=.o) && cd .. | 31 | $(MS_LIB_TOOL) -def:libmicrohttpd2.def -name:$$dll_name -out:libmicrohttpd2.lib $(libmicrohttpd2_la_OBJECTS:.lo=.o) && cd .. |
30 | else | 32 | else |
31 | @echo Creating $@ and libmicrohttpd.exp by $(DLLTOOL)... && \ | 33 | @echo Creating $@ and libmicrohttpd2.exp by $(DLLTOOL)... && \ |
32 | dll_name=`$(EGREP) -o dlname=\'.+\' libmicrohttpd.la` && \ | 34 | dll_name=`$(EGREP) -o dlname=\'.+\' libmicrohttpd2.la` && \ |
33 | dll_name=$${dll_name#*\'} && dll_name=$${dll_name%\'} && test -n "$$dll_name" && \ | 35 | dll_name=$${dll_name#*\'} && dll_name=$${dll_name%\'} && test -n "$$dll_name" && \ |
34 | echo Creating $$dll_name by $(DLLTOOL).. && cd "$(lt_cv_objdir)" && \ | 36 | echo Creating $$dll_name by $(DLLTOOL).. && cd "$(lt_cv_objdir)" && \ |
35 | $(DLLTOOL) -d ./libmicrohttpd.def -D $$dll_name -l libmicrohttpd.lib $(libmicrohttpd_la_OBJECTS:.lo=.o) -e ./libmicrohttpd.exp && cd .. &&\ | 37 | $(DLLTOOL) -d ./libmicrohttpd2.def -D $$dll_name -l libmicrohttpd2.lib $(libmicrohttpd2_la_OBJECTS:.lo=.o) -e ./libmicrohttpd2.exp && cd .. &&\ |
36 | echo Created libmicrohttpd.exp and libmicrohttpd.lib. | 38 | echo Created libmicrohttpd2.exp and libmicrohttpd2.lib. |
37 | endif | 39 | endif |
38 | else | 40 | else |
39 | W32_MHD_LIB_LDFLAGS = | 41 | W32_MHD_LIB_LDFLAGS = |
40 | endif | 42 | endif |
41 | 43 | ||
42 | if W32_STATIC_LIB | 44 | if W32_STATIC_LIB |
43 | noinst_DATA += $(lt_cv_objdir)/libmicrohttpd-static.lib | 45 | noinst_DATA += $(lt_cv_objdir)/libmicrohttpd2-static.lib |
44 | MOSTLYCLEANFILES += $(lt_cv_objdir)/libmicrohttpd-static.lib | 46 | MOSTLYCLEANFILES += $(lt_cv_objdir)/libmicrohttpd2-static.lib |
45 | 47 | ||
46 | $(lt_cv_objdir)/libmicrohttpd-static.lib: libmicrohttpd.la $(libmicrohttpd_la_OBJECTS) | 48 | $(lt_cv_objdir)/libmicrohttpd2-static.lib: libmicrohttpd2.la $(libmicrohttpd2_la_OBJECTS) |
47 | if USE_MS_LIB_TOOL | 49 | if USE_MS_LIB_TOOL |
48 | $(MS_LIB_TOOL) -out:$@ $(libmicrohttpd_la_OBJECTS:.lo=.o) | 50 | $(MS_LIB_TOOL) -out:$@ $(libmicrohttpd2_la_OBJECTS:.lo=.o) |
49 | else | 51 | else |
50 | cp $(lt_cv_objdir)/libmicrohttpd.a $@ | 52 | cp $(lt_cv_objdir)/libmicrohttpd2.a $@ |
51 | endif | 53 | endif |
52 | endif | 54 | endif |
53 | 55 | ||
54 | 56 | ||
55 | libmicrohttpd_la_SOURCES = \ | 57 | libmicrohttpd2_la_SOURCES = \ |
56 | action_continue.c \ | 58 | action_continue.c \ |
57 | action_from_response.c \ | 59 | action_from_response.c \ |
58 | action_parse_post.c \ | 60 | action_parse_post.c \ |
@@ -107,26 +109,24 @@ libmicrohttpd_la_SOURCES = \ | |||
107 | panic.c \ | 109 | panic.c \ |
108 | version.c | 110 | version.c |
109 | 111 | ||
110 | 112 | libmicrohttpd2_la_CPPFLAGS = \ | |
111 | |||
112 | libmicrohttpd_la_CPPFLAGS = \ | ||
113 | $(AM_CPPFLAGS) $(MHD_LIB_CPPFLAGS) \ | 113 | $(AM_CPPFLAGS) $(MHD_LIB_CPPFLAGS) \ |
114 | -DBUILDING_MHD_LIB=1 | 114 | -DBUILDING_MHD_LIB=1 |
115 | libmicrohttpd_la_CFLAGS = \ | 115 | libmicrohttpd2_la_CFLAGS = \ |
116 | $(AM_CFLAGS) $(MHD_LIB_CFLAGS) | 116 | $(AM_CFLAGS) $(MHD_LIB_CFLAGS) |
117 | libmicrohttpd_la_LDFLAGS = \ | 117 | libmicrohttpd2_la_LDFLAGS = \ |
118 | $(MHD_LIB_LDFLAGS) \ | 118 | $(MHD_LIB_LDFLAGS) -ldl \ |
119 | $(W32_MHD_LIB_LDFLAGS) \ | 119 | $(W32_MHD_LIB_LDFLAGS) \ |
120 | -version-info 666:0:0 # FIXME: fix once closer to release... | 120 | -version-info 0:0:0 # FIXME: fix once closer to release... |
121 | libmicrohttpd_la_LIBADD = \ | 121 | libmicrohttpd2_la_LIBADD = \ |
122 | $(MHD_LIBDEPS) # FIXME: should separate out GNUTLS_LIBS/GCRYPT here! | 122 | $(MHD_LIBDEPS) # FIXME: should separate out GNUTLS_LIBS/GCRYPT here! |
123 | 123 | ||
124 | if HAVE_W32 | 124 | if HAVE_W32 |
125 | MHD_DLL_RES_SRC = microhttpd_dll_res.rc | 125 | MHD_DLL_RES_SRC = microhttpd_dll_res.rc |
126 | MHD_DLL_RES_LO = libmicrohttpd_la-$(MHD_DLL_RES_SRC:.rc=.lo) | 126 | MHD_DLL_RES_LO = libmicrohttpd2_la-$(MHD_DLL_RES_SRC:.rc=.lo) |
127 | 127 | ||
128 | EXTRA_libmicrohttpd_la_DEPENDENCIES = $(MHD_DLL_RES_LO) | 128 | EXTRA_libmicrohttpd2_la_DEPENDENCIES = $(MHD_DLL_RES_LO) |
129 | libmicrohttpd_la_LIBADD += $(MHD_DLL_RES_LO) | 129 | libmicrohttpd2_la_LIBADD += $(MHD_DLL_RES_LO) |
130 | 130 | ||
131 | # General rule is not required, but keep it just in case | 131 | # General rule is not required, but keep it just in case |
132 | .rc.lo: | 132 | .rc.lo: |
@@ -141,7 +141,7 @@ libmicrohttpd_la_LIBADD += $(MHD_DLL_RES_LO) | |||
141 | # Note: windres does not understand '-isystem' flag, so all | 141 | # Note: windres does not understand '-isystem' flag, so all |
142 | # possible '-isystem' flags are replaced by simple '-I' flags. | 142 | # possible '-isystem' flags are replaced by simple '-I' flags. |
143 | $(MHD_DLL_RES_LO): $(MHD_DLL_RES_SRC) | 143 | $(MHD_DLL_RES_LO): $(MHD_DLL_RES_SRC) |
144 | RC_CPP_FLAGS=" $(DEFAULT_INCLUDES) $(INCLUDES) $(libmicrohttpd_la_CPPFLAGS) $(CPPFLAGS) " && \ | 144 | RC_CPP_FLAGS=" $(DEFAULT_INCLUDES) $(INCLUDES) $(libmicrohttpd2_la_CPPFLAGS) $(CPPFLAGS) " && \ |
145 | $(LIBTOOL) $(AM_V_lt) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) $(RCFLAGS) $(DEFS) $${RC_CPP_FLAGS// -isystem / -I } $< -o $@ && \ | 145 | $(LIBTOOL) $(AM_V_lt) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) $(RCFLAGS) $(DEFS) $${RC_CPP_FLAGS// -isystem / -I } $< -o $@ && \ |
146 | echo > $@-empty.c && $(CC) $(AM_CFLAGS) $(CFLAGS) -c $@-empty.c -o $(@:.lo=.o) && rm -f $@-empty.c | 146 | echo > $@-empty.c && $(CC) $(AM_CFLAGS) $(CFLAGS) -c $@-empty.c -o $(@:.lo=.o) && rm -f $@-empty.c |
147 | endif | 147 | endif |
@@ -151,26 +151,26 @@ if USE_COVERAGE | |||
151 | endif | 151 | endif |
152 | 152 | ||
153 | if !MHD_HAVE_TSEARCH | 153 | if !MHD_HAVE_TSEARCH |
154 | libmicrohttpd_la_SOURCES += \ | 154 | libmicrohttpd2_la_SOURCES += \ |
155 | tsearch.c tsearch.h | 155 | tsearch.c tsearch.h |
156 | endif | 156 | endif |
157 | 157 | ||
158 | # TBD! | 158 | # TBD! |
159 | if HAVE_POSTPROCESSOR | 159 | if HAVE_POSTPROCESSOR |
160 | #libmicrohttpd_la_SOURCES += \ | 160 | #libmicrohttpd2_la_SOURCES += \ |
161 | # postprocessor.c | 161 | # postprocessor.c |
162 | endif | 162 | endif |
163 | 163 | ||
164 | # TBD! | 164 | # TBD! |
165 | if ENABLE_DAUTH | 165 | if ENABLE_DAUTH |
166 | #libmicrohttpd_la_SOURCES += \ | 166 | #libmicrohttpd2_la_SOURCES += \ |
167 | # digestauth.c \ | 167 | # digestauth.c \ |
168 | # md5.c md5.h | 168 | # md5.c md5.h |
169 | endif | 169 | endif |
170 | 170 | ||
171 | # TBD! | 171 | # TBD! |
172 | if ENABLE_BAUTH | 172 | if ENABLE_BAUTH |
173 | #libmicrohttpd_la_SOURCES += \ | 173 | #libmicrohttpd2_la_SOURCES += \ |
174 | # basicauth.c \ | 174 | # basicauth.c \ |
175 | # base64.c base64.h | 175 | # base64.c base64.h |
176 | endif | 176 | endif |