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