diff options
Diffstat (limited to 'src/lib/Makefile.am')
-rw-r--r-- | src/lib/Makefile.am | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am new file mode 100644 index 00000000..bba6b620 --- /dev/null +++ b/src/lib/Makefile.am | |||
@@ -0,0 +1,167 @@ | |||
1 | # This Makefile.am is in the public domain | ||
2 | AM_CPPFLAGS = \ | ||
3 | -I$(top_srcdir)/src/include \ | ||
4 | -I$(top_srcdir)/src/lib | ||
5 | |||
6 | AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) | ||
7 | |||
8 | lib_LTLIBRARIES = \ | ||
9 | libmicrohttpd.la | ||
10 | |||
11 | noinst_DATA = | ||
12 | MOSTLYCLEANFILES = | ||
13 | |||
14 | if W32_SHARED_LIB_EXP | ||
15 | W32_MHD_LIB_LDFLAGS = -Wl,--output-def,$(lt_cv_objdir)/libmicrohttpd.def -XCClinker -static-libgcc | ||
16 | noinst_DATA += $(lt_cv_objdir)/libmicrohttpd.lib $(lt_cv_objdir)/libmicrohttpd.def $(lt_cv_objdir)/libmicrohttpd.exp | ||
17 | MOSTLYCLEANFILES += $(lt_cv_objdir)/libmicrohttpd.lib $(lt_cv_objdir)/libmicrohttpd.def $(lt_cv_objdir)/libmicrohttpd.exp | ||
18 | |||
19 | $(lt_cv_objdir)/libmicrohttpd.def: libmicrohttpd.la | ||
20 | |||
21 | $(lt_cv_objdir)/libmicrohttpd.exp: $(lt_cv_objdir)/libmicrohttpd.lib | ||
22 | |||
23 | $(lt_cv_objdir)/libmicrohttpd.lib: $(lt_cv_objdir)/libmicrohttpd.def libmicrohttpd.la $(libmicrohttpd_la_OBJECTS) | ||
24 | if USE_MS_LIB_TOOL | ||
25 | @echo Creating $@ and libmicrohttpd.exp by $(MS_LIB_TOOL)... && \ | ||
26 | dll_name=`$(EGREP) -o dlname=\'.+\' libmicrohttpd.la` && \ | ||
27 | 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)" && \ | ||
29 | $(MS_LIB_TOOL) -def:libmicrohttpd.def -name:$$dll_name -out:libmicrohttpd.lib $(libmicrohttpd_la_OBJECTS:.lo=.o) && cd .. | ||
30 | else | ||
31 | @echo Creating $@ and libmicrohttpd.exp by $(DLLTOOL)... && \ | ||
32 | dll_name=`$(EGREP) -o dlname=\'.+\' libmicrohttpd.la` && \ | ||
33 | dll_name=$${dll_name#*\'} && dll_name=$${dll_name%\'} && test -n "$$dll_name" && \ | ||
34 | 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 .. &&\ | ||
36 | echo Created libmicrohttpd.exp and libmicrohttpd.lib. | ||
37 | endif | ||
38 | else | ||
39 | W32_MHD_LIB_LDFLAGS = | ||
40 | endif | ||
41 | |||
42 | if W32_STATIC_LIB | ||
43 | noinst_DATA += $(lt_cv_objdir)/libmicrohttpd-static.lib | ||
44 | MOSTLYCLEANFILES += $(lt_cv_objdir)/libmicrohttpd-static.lib | ||
45 | |||
46 | $(lt_cv_objdir)/libmicrohttpd-static.lib: libmicrohttpd.la $(libmicrohttpd_la_OBJECTS) | ||
47 | if USE_MS_LIB_TOOL | ||
48 | $(MS_LIB_TOOL) -out:$@ $(libmicrohttpd_la_OBJECTS:.lo=.o) | ||
49 | else | ||
50 | cp $(lt_cv_objdir)/libmicrohttpd.a $@ | ||
51 | endif | ||
52 | endif | ||
53 | |||
54 | |||
55 | libmicrohttpd_la_SOURCES = \ | ||
56 | action_continue.c \ | ||
57 | action_from_response.c \ | ||
58 | action_parse_post.c \ | ||
59 | action_process_upload.c \ | ||
60 | action_suspend.c \ | ||
61 | connection_info.c \ | ||
62 | connection_options.c \ | ||
63 | daemon_create.c \ | ||
64 | daemon_destroy.c \ | ||
65 | daemon_info.c \ | ||
66 | daemon_options.c \ | ||
67 | daemon_start.c \ | ||
68 | daemon_quiesce.c \ | ||
69 | init.c init.h \ | ||
70 | internal.c internal.h \ | ||
71 | memorypool.c memorypool.h \ | ||
72 | mhd_assert.h \ | ||
73 | mhd_byteorder.h \ | ||
74 | mhd_compat.c mhd_compat.h \ | ||
75 | mhd_itc.c mhd_itc.h mhd_itc_types.h \ | ||
76 | mhd_limits.h \ | ||
77 | mhd_locks.h \ | ||
78 | mhd_mono_clock.c mhd_mono_clock.h \ | ||
79 | mhd_str.c mhd_str.h \ | ||
80 | mhd_sockets.c mhd_sockets.h \ | ||
81 | mhd_threads.c mhd_threads.h \ | ||
82 | response.c \ | ||
83 | response_for_upgrade.c \ | ||
84 | response_from_buffer.c \ | ||
85 | response_from_callback.c \ | ||
86 | response_from_fd.c \ | ||
87 | response_options.c \ | ||
88 | reason_phrase.c \ | ||
89 | request.c \ | ||
90 | request_info.c \ | ||
91 | request_resume.c \ | ||
92 | sysfdsetsize.c sysfdsetsize.h \ | ||
93 | panic.c \ | ||
94 | version.c | ||
95 | |||
96 | |||
97 | |||
98 | libmicrohttpd_la_CPPFLAGS = \ | ||
99 | $(AM_CPPFLAGS) $(MHD_LIB_CPPFLAGS) \ | ||
100 | -DBUILDING_MHD_LIB=1 | ||
101 | libmicrohttpd_la_CFLAGS = \ | ||
102 | $(AM_CFLAGS) $(MHD_LIB_CFLAGS) | ||
103 | libmicrohttpd_la_LDFLAGS = \ | ||
104 | $(MHD_LIB_LDFLAGS) \ | ||
105 | $(W32_MHD_LIB_LDFLAGS) \ | ||
106 | -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@ | ||
107 | libmicrohttpd_la_LIBADD = \ | ||
108 | $(MHD_LIBDEPS) | ||
109 | |||
110 | if HAVE_W32 | ||
111 | MHD_DLL_RES_SRC = microhttpd_dll_res.rc | ||
112 | MHD_DLL_RES_LO = libmicrohttpd_la-$(MHD_DLL_RES_SRC:.rc=.lo) | ||
113 | |||
114 | EXTRA_libmicrohttpd_la_DEPENDENCIES = $(MHD_DLL_RES_LO) | ||
115 | libmicrohttpd_la_LIBADD += $(MHD_DLL_RES_LO) | ||
116 | |||
117 | # General rule is not required, but keep it just in case | ||
118 | .rc.lo: | ||
119 | $(LIBTOOL) $(AM_V_lt) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) $(RCFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $< -o $@ | ||
120 | |||
121 | # To add dll resource only to .dll file and exclude it form static | ||
122 | # lib, a little trick was used. Allow libtool to create file.lo, | ||
123 | # file.o and .libs/file.lo, .libs/file.o files, then overwrite file.o | ||
124 | # by empty object generated from empty c-file. Later libtool will | ||
125 | # use .libs/file.o for shared lib and empty file.o for static lib. | ||
126 | # This implementation is based on trick found in liblzma. | ||
127 | # Note: windres does not understand '-isystem' flag, so all | ||
128 | # possible '-isystem' flags are replaced by simple '-I' flags. | ||
129 | $(MHD_DLL_RES_LO): $(MHD_DLL_RES_SRC) | ||
130 | RC_CPP_FLAGS=" $(DEFAULT_INCLUDES) $(INCLUDES) $(libmicrohttpd_la_CPPFLAGS) $(CPPFLAGS) " && \ | ||
131 | $(LIBTOOL) $(AM_V_lt) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) $(RCFLAGS) $(DEFS) $${RC_CPP_FLAGS// -isystem / -I } $< -o $@ && \ | ||
132 | echo > $@-empty.c && $(CC) $(AM_CFLAGS) $(CFLAGS) -c $@-empty.c -o $(@:.lo=.o) && rm -f $@-empty.c | ||
133 | endif | ||
134 | |||
135 | if USE_COVERAGE | ||
136 | AM_CFLAGS += --coverage | ||
137 | endif | ||
138 | |||
139 | if !MHD_HAVE_TSEARCH | ||
140 | libmicrohttpd_la_SOURCES += \ | ||
141 | tsearch.c tsearch.h | ||
142 | endif | ||
143 | |||
144 | # TBD! | ||
145 | if HAVE_POSTPROCESSOR | ||
146 | libmicrohttpd_la_SOURCES += \ | ||
147 | postprocessor.c | ||
148 | endif | ||
149 | |||
150 | # TBD! | ||
151 | if ENABLE_DAUTH | ||
152 | libmicrohttpd_la_SOURCES += \ | ||
153 | digestauth.c \ | ||
154 | md5.c md5.h | ||
155 | endif | ||
156 | |||
157 | # TBD! | ||
158 | if ENABLE_BAUTH | ||
159 | libmicrohttpd_la_SOURCES += \ | ||
160 | basicauth.c \ | ||
161 | base64.c base64.h | ||
162 | endif | ||
163 | |||
164 | |||
165 | |||
166 | |||
167 | |||