Makefile.am (6018B)
1 # This Makefile.am is in the public domain 2 SUBDIRS = . 3 4 AM_CPPFLAGS = \ 5 -I$(top_srcdir)/src/include \ 6 $(CPPFLAGS_ac) \ 7 -DDATA_DIR=\"$(top_srcdir)/src/datadir/\" 8 9 AM_CFLAGS = $(CFLAGS_ac) @LIBGCRYPT_CFLAGS@ 10 11 AM_LDFLAGS = $(LDFLAGS_ac) 12 13 MHD_CPU_COUNT_DEF = -DMHD_CPU_COUNT=$(CPU_COUNT) 14 15 AM_TESTS_ENVIRONMENT = $(TESTS_ENVIRONMENT_ac) 16 17 if USE_COVERAGE 18 AM_CFLAGS += --coverage 19 endif 20 21 $(top_builddir)/src/microhttpd/libmicrohttpd.la: $(top_builddir)/src/microhttpd/Makefile 22 @echo ' cd $(top_builddir)/src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.la'; \ 23 $(am__cd) $(top_builddir)/src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.la 24 25 26 # example programs 27 noinst_PROGRAMS = \ 28 benchmark \ 29 benchmark_https \ 30 chunked_example \ 31 minimal_example \ 32 minimal_example_empty \ 33 dual_stack_example \ 34 minimal_example_comet \ 35 querystring_example \ 36 timeout \ 37 fileserver_example \ 38 fileserver_example_dirs \ 39 fileserver_example_external_select \ 40 refuse_post_example 41 42 if MHD_HAVE_EPOLL 43 noinst_PROGRAMS += \ 44 suspend_resume_epoll 45 endif 46 47 if HAVE_JANSSON 48 noinst_PROGRAMS += \ 49 json_echo 50 endif 51 52 EXTRA_DIST = msgs_i18n.c 53 noinst_EXTRA_DIST = msgs_i18n.c 54 55 if ENABLE_HTTPS 56 noinst_PROGRAMS += \ 57 https_fileserver_example \ 58 minimal_example_empty_tls 59 endif 60 if HAVE_POSTPROCESSOR 61 noinst_PROGRAMS += \ 62 post_example 63 if HAVE_POSIX_THREADS 64 noinst_PROGRAMS += demo 65 if ENABLE_HTTPS 66 noinst_PROGRAMS += demo_https 67 endif 68 endif 69 endif 70 71 if ENABLE_DAUTH 72 noinst_PROGRAMS += \ 73 digest_auth_example \ 74 digest_auth_example_adv 75 endif 76 77 if ENABLE_BAUTH 78 noinst_PROGRAMS += \ 79 authorization_example 80 endif 81 82 if HAVE_POSIX_THREADS 83 if ENABLE_UPGRADE 84 noinst_PROGRAMS += \ 85 upgrade_example 86 endif 87 endif 88 89 if HAVE_ZLIB 90 noinst_PROGRAMS += \ 91 http_compression \ 92 http_chunked_compression 93 endif 94 95 if HAVE_W32 96 AM_CFLAGS += -DWINDOWS 97 endif 98 99 minimal_example_SOURCES = \ 100 minimal_example.c 101 minimal_example_LDADD = \ 102 $(top_builddir)/src/microhttpd/libmicrohttpd.la 103 104 minimal_example_empty_SOURCES = \ 105 minimal_example_empty.c 106 minimal_example_empty_LDADD = \ 107 $(top_builddir)/src/microhttpd/libmicrohttpd.la 108 109 minimal_example_empty_tls_SOURCES = \ 110 minimal_example_empty_tls.c 111 minimal_example_empty_tls_LDADD = \ 112 $(top_builddir)/src/microhttpd/libmicrohttpd.la 113 114 upgrade_example_SOURCES = \ 115 upgrade_example.c 116 upgrade_example_CFLAGS = \ 117 $(PTHREAD_CFLAGS) $(AM_CFLAGS) 118 upgrade_example_LDADD = \ 119 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 120 $(PTHREAD_LIBS) 121 122 timeout_SOURCES = \ 123 timeout.c 124 timeout_LDADD = \ 125 $(top_builddir)/src/microhttpd/libmicrohttpd.la 126 127 chunked_example_SOURCES = \ 128 chunked_example.c 129 chunked_example_LDADD = \ 130 $(top_builddir)/src/microhttpd/libmicrohttpd.la 131 132 json_echo_SOURCES = \ 133 json_echo.c 134 json_echo_LDADD = \ 135 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 136 -ljansson 137 138 demo_SOURCES = \ 139 demo.c 140 demo_CFLAGS = \ 141 $(PTHREAD_CFLAGS) $(AM_CFLAGS) 142 demo_CPPFLAGS = \ 143 $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF) 144 demo_LDADD = \ 145 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 146 $(PTHREAD_LIBS) 147 if MHD_HAVE_LIBMAGIC 148 demo_LDADD += -lmagic 149 endif 150 151 demo_https_SOURCES = \ 152 demo_https.c 153 demo_https_CFLAGS = \ 154 $(PTHREAD_CFLAGS) $(AM_CFLAGS) 155 demo_https_CPPFLAGS = \ 156 $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF) 157 demo_https_LDADD = \ 158 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 159 $(PTHREAD_LIBS) 160 if MHD_HAVE_LIBMAGIC 161 demo_https_LDADD += -lmagic 162 endif 163 164 benchmark_SOURCES = \ 165 benchmark.c 166 benchmark_CPPFLAGS = \ 167 $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF) 168 benchmark_LDADD = \ 169 $(top_builddir)/src/microhttpd/libmicrohttpd.la 170 171 suspend_resume_epoll_SOURCES = \ 172 suspend_resume_epoll.c 173 suspend_resume_epoll_CPPFLAGS = \ 174 $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF) 175 suspend_resume_epoll_LDADD = \ 176 $(top_builddir)/src/microhttpd/libmicrohttpd.la 177 178 benchmark_https_SOURCES = \ 179 benchmark_https.c 180 benchmark_https_CPPFLAGS = \ 181 $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF) 182 benchmark_https_LDADD = \ 183 $(top_builddir)/src/microhttpd/libmicrohttpd.la 184 185 dual_stack_example_SOURCES = \ 186 dual_stack_example.c 187 dual_stack_example_LDADD = \ 188 $(top_builddir)/src/microhttpd/libmicrohttpd.la 189 190 post_example_SOURCES = \ 191 post_example.c 192 post_example_LDADD = \ 193 $(top_builddir)/src/microhttpd/libmicrohttpd.la 194 195 minimal_example_comet_SOURCES = \ 196 minimal_example_comet.c 197 minimal_example_comet_LDADD = \ 198 $(top_builddir)/src/microhttpd/libmicrohttpd.la 199 200 authorization_example_SOURCES = \ 201 authorization_example.c 202 authorization_example_LDADD = \ 203 $(top_builddir)/src/microhttpd/libmicrohttpd.la 204 205 digest_auth_example_SOURCES = \ 206 digest_auth_example.c 207 digest_auth_example_LDADD = \ 208 $(top_builddir)/src/microhttpd/libmicrohttpd.la 209 210 digest_auth_example_adv_SOURCES = \ 211 digest_auth_example_adv.c 212 digest_auth_example_adv_LDADD = \ 213 $(top_builddir)/src/microhttpd/libmicrohttpd.la 214 215 refuse_post_example_SOURCES = \ 216 refuse_post_example.c 217 refuse_post_example_LDADD = \ 218 $(top_builddir)/src/microhttpd/libmicrohttpd.la 219 220 querystring_example_SOURCES = \ 221 querystring_example.c 222 querystring_example_LDADD = \ 223 $(top_builddir)/src/microhttpd/libmicrohttpd.la 224 225 fileserver_example_SOURCES = \ 226 fileserver_example.c 227 fileserver_example_LDADD = \ 228 $(top_builddir)/src/microhttpd/libmicrohttpd.la 229 230 fileserver_example_dirs_SOURCES = \ 231 fileserver_example_dirs.c 232 fileserver_example_dirs_LDADD = \ 233 $(top_builddir)/src/microhttpd/libmicrohttpd.la 234 235 fileserver_example_external_select_SOURCES = \ 236 fileserver_example_external_select.c 237 fileserver_example_external_select_LDADD = \ 238 $(top_builddir)/src/microhttpd/libmicrohttpd.la 239 240 https_fileserver_example_SOURCES = \ 241 https_fileserver_example.c 242 https_fileserver_example_CPPFLAGS = \ 243 $(AM_CPPFLAGS) $(GNUTLS_CPPFLAGS) 244 https_fileserver_example_LDADD = \ 245 $(top_builddir)/src/microhttpd/libmicrohttpd.la 246 247 http_compression_SOURCES = \ 248 http_compression.c 249 http_chunked_compression_SOURCES = \ 250 http_chunked_compression.c 251 http_compression_LDADD = \ 252 $(top_builddir)/src/microhttpd/libmicrohttpd.la 253 http_chunked_compression_LDADD = \ 254 $(top_builddir)/src/microhttpd/libmicrohttpd.la 255 if HAVE_ZLIB 256 http_compression_LDADD += -lz 257 http_chunked_compression_LDADD += -lz 258 endif