1# This Makefile.am is in the public domain 2SUBDIRS = . 3 4AM_CPPFLAGS = \ 5 -I$(top_srcdir)/src/include \ 6 -DDATA_DIR=\"$(top_srcdir)/src/datadir/\" 7 8AM_CFLAGS = @LIBGCRYPT_CFLAGS@ 9 10CPU_COUNT_DEF = -DCPU_COUNT=$(CPU_COUNT) 11 12if USE_COVERAGE 13 AM_CFLAGS += --coverage 14endif 15 16if ENABLE_SPDY 17spdyex = \ 18 spdy_event_loop \ 19 spdy_fileserver \ 20 spdy_response_with_callback 21 22if HAVE_SPDYLAY 23spdyex += mhd2spdy 24endif 25endif 26 27 28# example programs 29noinst_PROGRAMS = \ 30 benchmark \ 31 benchmark_https \ 32 chunked_example \ 33 minimal_example \ 34 dual_stack_example \ 35 minimal_example_comet \ 36 querystring_example \ 37 fileserver_example \ 38 fileserver_example_dirs \ 39 fileserver_example_external_select \ 40 refuse_post_example \ 41 $(spdyex) 42 43 44if ENABLE_HTTPS 45noinst_PROGRAMS += https_fileserver_example 46endif 47if HAVE_POSTPROCESSOR 48noinst_PROGRAMS += \ 49 post_example 50if HAVE_MAGIC 51noinst_PROGRAMS += \ 52 demo \ 53 demo_https 54endif 55endif 56 57if ENABLE_DAUTH 58noinst_PROGRAMS += \ 59 digest_auth_example 60endif 61 62if ENABLE_BAUTH 63noinst_PROGRAMS += \ 64 authorization_example 65endif 66 67if HAVE_W32 68AM_CFLAGS += -DWINDOWS 69endif 70 71minimal_example_SOURCES = \ 72 minimal_example.c 73minimal_example_LDADD = \ 74 $(top_builddir)/src/microhttpd/libmicrohttpd.la 75 76chunked_example_SOURCES = \ 77 chunked_example.c 78chunked_example_LDADD = \ 79 $(top_builddir)/src/microhttpd/libmicrohttpd.la 80 81demo_SOURCES = \ 82 demo.c 83demo_CFLAGS = \ 84 $(PTHREAD_CFLAGS) $(AM_CFLAGS) 85demo_CPPFLAGS = \ 86 $(AM_CPPFLAGS) $(CPU_COUNT_DEF) 87demo_LDADD = \ 88 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 89 $(PTHREAD_LIBS) -lmagic 90 91demo_https_SOURCES = \ 92 demo_https.c 93demo_https_CFLAGS = \ 94 $(PTHREAD_CFLAGS) $(AM_CFLAGS) 95demo_https_CPPFLAGS = \ 96 $(AM_CPPFLAGS) $(CPU_COUNT_DEF) 97demo_https_LDADD = \ 98 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 99 $(PTHREAD_LIBS) -lmagic 100 101mhd2spdy_SOURCES = \ 102 mhd2spdy.c \ 103 mhd2spdy_spdy.c mhd2spdy_spdy.h \ 104 mhd2spdy_http.c mhd2spdy_http.h \ 105 mhd2spdy_structures.c mhd2spdy_structures.h 106mhd2spdy_LDADD = \ 107 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 108 -lssl -lcrypto -lspdylay 109 110benchmark_SOURCES = \ 111 benchmark.c 112benchmark_CPPFLAGS = \ 113 $(AM_CPPFLAGS) $(CPU_COUNT_DEF) 114benchmark_LDADD = \ 115 $(top_builddir)/src/microhttpd/libmicrohttpd.la 116 117benchmark_https_SOURCES = \ 118 benchmark_https.c 119benchmark_https_CPPFLAGS = \ 120 $(AM_CPPFLAGS) $(CPU_COUNT_DEF) 121benchmark_https_LDADD = \ 122 $(top_builddir)/src/microhttpd/libmicrohttpd.la 123 124dual_stack_example_SOURCES = \ 125 dual_stack_example.c 126dual_stack_example_LDADD = \ 127 $(top_builddir)/src/microhttpd/libmicrohttpd.la 128 129post_example_SOURCES = \ 130 post_example.c 131post_example_LDADD = \ 132 $(top_builddir)/src/microhttpd/libmicrohttpd.la 133 134minimal_example_comet_SOURCES = \ 135 minimal_example_comet.c 136minimal_example_comet_LDADD = \ 137 $(top_builddir)/src/microhttpd/libmicrohttpd.la 138 139authorization_example_SOURCES = \ 140 authorization_example.c 141authorization_example_LDADD = \ 142 $(top_builddir)/src/microhttpd/libmicrohttpd.la 143 144digest_auth_example_SOURCES = \ 145 digest_auth_example.c 146digest_auth_example_LDADD = \ 147 $(top_builddir)/src/microhttpd/libmicrohttpd.la 148 149refuse_post_example_SOURCES = \ 150 refuse_post_example.c 151refuse_post_example_LDADD = \ 152 $(top_builddir)/src/microhttpd/libmicrohttpd.la 153 154querystring_example_SOURCES = \ 155 querystring_example.c 156querystring_example_LDADD = \ 157 $(top_builddir)/src/microhttpd/libmicrohttpd.la 158 159fileserver_example_SOURCES = \ 160 fileserver_example.c 161fileserver_example_LDADD = \ 162 $(top_builddir)/src/microhttpd/libmicrohttpd.la 163 164fileserver_example_dirs_SOURCES = \ 165 fileserver_example_dirs.c 166fileserver_example_dirs_LDADD = \ 167 $(top_builddir)/src/microhttpd/libmicrohttpd.la 168 169fileserver_example_external_select_SOURCES = \ 170 fileserver_example_external_select.c 171fileserver_example_external_select_LDADD = \ 172 $(top_builddir)/src/microhttpd/libmicrohttpd.la 173 174https_fileserver_example_SOURCES = \ 175https_fileserver_example.c 176https_fileserver_example_CPPFLAGS = \ 177 $(AM_CPPFLAGS) $(GNUTLS_CPPFLAGS) 178https_fileserver_example_LDADD = \ 179 $(top_builddir)/src/microhttpd/libmicrohttpd.la 180 181 182spdy_event_loop_SOURCES = \ 183 spdy_event_loop.c 184spdy_event_loop_LDADD = \ 185 $(top_builddir)/src/microspdy/libmicrospdy.la \ 186 -lz 187 188spdy_fileserver_SOURCES = \ 189 spdy_fileserver.c 190spdy_fileserver_LDADD = \ 191 $(top_builddir)/src/microspdy/libmicrospdy.la \ 192 -lz 193 194spdy_response_with_callback_SOURCES = \ 195 spdy_response_with_callback.c 196spdy_response_with_callback_LDADD = \ 197 $(top_builddir)/src/microspdy/libmicrospdy.la \ 198 -lz 199