Blame src/microhttpd/Makefile.am

Packit 875988
# This Makefile.am is in the public domain
Packit 875988
AM_CPPFLAGS = \
Packit 875988
  -I$(top_srcdir)/src/include \
Packit 875988
  -I$(top_srcdir)/src/microhttpd
Packit 875988
Packit 875988
AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS)
Packit 875988
Packit 875988
lib_LTLIBRARIES = \
Packit 875988
  libmicrohttpd.la
Packit 875988
Packit 875988
noinst_DATA =
Packit 875988
MOSTLYCLEANFILES =
Packit 875988
Packit 875988
if W32_SHARED_LIB_EXP
Packit 875988
W32_MHD_LIB_LDFLAGS = -Wl,--output-def,$(lt_cv_objdir)/libmicrohttpd.def -XCClinker -static-libgcc
Packit 875988
noinst_DATA += $(lt_cv_objdir)/libmicrohttpd.lib $(lt_cv_objdir)/libmicrohttpd.def $(lt_cv_objdir)/libmicrohttpd.exp
Packit 875988
MOSTLYCLEANFILES += $(lt_cv_objdir)/libmicrohttpd.lib $(lt_cv_objdir)/libmicrohttpd.def $(lt_cv_objdir)/libmicrohttpd.exp
Packit 875988
Packit 875988
$(lt_cv_objdir)/libmicrohttpd.def: libmicrohttpd.la
Packit 875988
Packit 875988
$(lt_cv_objdir)/libmicrohttpd.exp: $(lt_cv_objdir)/libmicrohttpd.lib
Packit 875988
Packit 875988
$(lt_cv_objdir)/libmicrohttpd.lib: $(lt_cv_objdir)/libmicrohttpd.def libmicrohttpd.la $(libmicrohttpd_la_OBJECTS)
Packit 875988
if USE_MS_LIB_TOOL
Packit 875988
	@echo Creating $@ and libmicrohttpd.exp by $(MS_LIB_TOOL)... && \
Packit 875988
	dll_name=`$(EGREP) -o dlname=\'.+\' libmicrohttpd.la` && \
Packit 875988
	dll_name=$${dll_name#*\'} && dll_name=$${dll_name%\'} && test -n "$$dll_name" && \
Packit 875988
	echo Creating $$dll_name by $(MS_LIB_TOOL).. && cd "$(lt_cv_objdir)" && \
Packit 875988
	$(MS_LIB_TOOL) -def:libmicrohttpd.def -name:$$dll_name -out:libmicrohttpd.lib $(libmicrohttpd_la_OBJECTS:.lo=.o) && cd ..
Packit 875988
else
Packit 875988
	@echo Creating $@ and libmicrohttpd.exp by $(DLLTOOL)... && \
Packit 875988
	dll_name=`$(EGREP) -o dlname=\'.+\' libmicrohttpd.la` && \
Packit 875988
	dll_name=$${dll_name#*\'} && dll_name=$${dll_name%\'} && test -n "$$dll_name" && \
Packit 875988
	echo Creating $$dll_name by $(DLLTOOL).. && cd "$(lt_cv_objdir)" && \
Packit 875988
	$(DLLTOOL) -d ./libmicrohttpd.def -D $$dll_name -l libmicrohttpd.lib $(libmicrohttpd_la_OBJECTS:.lo=.o) -e ./libmicrohttpd.exp && cd .. &&\
Packit 875988
	echo Created libmicrohttpd.exp and libmicrohttpd.lib.
Packit 875988
endif
Packit 875988
else
Packit 875988
  W32_MHD_LIB_LDFLAGS =
Packit 875988
endif
Packit 875988
Packit 875988
if W32_STATIC_LIB
Packit 875988
noinst_DATA += $(lt_cv_objdir)/libmicrohttpd-static.lib
Packit 875988
MOSTLYCLEANFILES += $(lt_cv_objdir)/libmicrohttpd-static.lib
Packit 875988
Packit 875988
$(lt_cv_objdir)/libmicrohttpd-static.lib: libmicrohttpd.la $(libmicrohttpd_la_OBJECTS)
Packit 875988
if USE_MS_LIB_TOOL
Packit 875988
	$(MS_LIB_TOOL) -out:$@ $(libmicrohttpd_la_OBJECTS:.lo=.o)
Packit 875988
else
Packit 875988
	cp $(lt_cv_objdir)/libmicrohttpd.a $@
Packit 875988
endif
Packit 875988
endif
Packit 875988
Packit 875988
Packit 875988
libmicrohttpd_la_SOURCES = \
Packit 875988
  connection.c connection.h \
Packit 875988
  reason_phrase.c \
Packit 875988
  daemon.c  \
Packit 875988
  internal.c internal.h \
Packit 875988
  memorypool.c memorypool.h \
Packit 875988
  mhd_mono_clock.c mhd_mono_clock.h \
Packit 875988
  mhd_limits.h mhd_byteorder.h \
Packit 875988
  sysfdsetsize.c sysfdsetsize.h \
Packit 875988
  mhd_str.c mhd_str.h \
Packit 875988
  mhd_threads.c mhd_threads.h \
Packit 875988
  mhd_locks.h mhd_assert.h \
Packit 875988
  mhd_sockets.c mhd_sockets.h \
Packit 875988
  mhd_itc.c mhd_itc.h mhd_itc_types.h \
Packit 875988
  mhd_compat.c mhd_compat.h \
Packit 875988
  response.c response.h
Packit 875988
Packit 875988
libmicrohttpd_la_CPPFLAGS = \
Packit 875988
  $(AM_CPPFLAGS) $(MHD_LIB_CPPFLAGS) \
Packit 875988
  -DBUILDING_MHD_LIB=1
Packit 875988
libmicrohttpd_la_CFLAGS = \
Packit 875988
  $(AM_CFLAGS) $(MHD_LIB_CFLAGS)
Packit 875988
libmicrohttpd_la_LDFLAGS = \
Packit 875988
  $(MHD_LIB_LDFLAGS) \
Packit 875988
  $(W32_MHD_LIB_LDFLAGS) \
Packit 875988
  -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@
Packit 875988
libmicrohttpd_la_LIBADD = \
Packit 875988
  $(MHD_LIBDEPS)
Packit 875988
Packit 875988
if HAVE_W32
Packit 875988
MHD_DLL_RES_SRC = microhttpd_dll_res.rc
Packit 875988
MHD_DLL_RES_LO = libmicrohttpd_la-$(MHD_DLL_RES_SRC:.rc=.lo)
Packit 875988
Packit 875988
EXTRA_libmicrohttpd_la_DEPENDENCIES = $(MHD_DLL_RES_LO)
Packit 875988
libmicrohttpd_la_LIBADD += $(MHD_DLL_RES_LO)
Packit 875988
Packit 875988
# General rule is not required, but keep it just in case
Packit 875988
.rc.lo:
Packit 875988
	$(LIBTOOL) $(AM_V_lt) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) $(RCFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $< -o $@
Packit 875988
Packit 875988
# To add dll resource only to .dll file and exclude it form static
Packit 875988
# lib, a little trick was used. Allow libtool to create file.lo,
Packit 875988
# file.o and .libs/file.lo, .libs/file.o files, then overwrite file.o
Packit 875988
# by empty object generated from empty c-file. Later libtool will
Packit 875988
# use .libs/file.o for shared lib and empty file.o for static lib.
Packit 875988
# This implementation is based on trick found in liblzma.
Packit 875988
# Note: windres does not understand '-isystem' flag, so all
Packit 875988
# possible '-isystem' flags are replaced by simple '-I' flags.
Packit 875988
$(MHD_DLL_RES_LO): $(MHD_DLL_RES_SRC)
Packit 875988
	RC_CPP_FLAGS=" $(DEFAULT_INCLUDES) $(INCLUDES) $(libmicrohttpd_la_CPPFLAGS) $(CPPFLAGS) " && \
Packit 875988
	$(LIBTOOL) $(AM_V_lt) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) $(RCFLAGS) $(DEFS) $${RC_CPP_FLAGS// -isystem / -I } $< -o $@ && \
Packit 875988
	echo > $@-empty.c && $(CC) $(AM_CFLAGS) $(CFLAGS) -c $@-empty.c -o $(@:.lo=.o) && rm -f $@-empty.c
Packit 875988
endif
Packit 875988
Packit 875988
if USE_COVERAGE
Packit 875988
  AM_CFLAGS += --coverage
Packit 875988
endif
Packit 875988
Packit 875988
if !MHD_HAVE_TSEARCH
Packit 875988
libmicrohttpd_la_SOURCES += \
Packit 875988
  tsearch.c tsearch.h
Packit 875988
endif
Packit 875988
Packit 875988
if HAVE_POSTPROCESSOR
Packit 875988
libmicrohttpd_la_SOURCES += \
Packit 875988
  postprocessor.c
Packit 875988
endif
Packit 875988
Packit 875988
if ENABLE_DAUTH
Packit 875988
libmicrohttpd_la_SOURCES += \
Packit 875988
  digestauth.c \
Packit 875988
  md5.c md5.h
Packit 875988
endif
Packit 875988
Packit 875988
if ENABLE_BAUTH
Packit 875988
libmicrohttpd_la_SOURCES += \
Packit 875988
  basicauth.c \
Packit 875988
  base64.c base64.h
Packit 875988
endif
Packit 875988
Packit 875988
if ENABLE_HTTPS
Packit 875988
libmicrohttpd_la_SOURCES += \
Packit 875988
  connection_https.c connection_https.h
Packit 875988
endif
Packit 875988
Packit 875988
Packit 875988
Packit 875988
check_PROGRAMS = \
Packit 875988
  test_str_compare \
Packit 875988
  test_str_to_value \
Packit 875988
  test_str_token \
Packit 875988
  test_http_reasons \
Packit 875988
  test_start_stop \
Packit 875988
  test_daemon \
Packit 875988
  test_options
Packit 875988
Packit 875988
if HAVE_POSIX_THREADS
Packit 875988
if ENABLE_UPGRADE
Packit 875988
  check_PROGRAMS += test_upgrade
Packit 875988
if ENABLE_HTTPS
Packit 875988
  check_PROGRAMS += test_upgrade_tls
Packit 875988
endif
Packit 875988
endif
Packit 875988
endif
Packit 875988
Packit 875988
if HAVE_POSTPROCESSOR
Packit 875988
check_PROGRAMS += \
Packit 875988
  test_postprocessor \
Packit 875988
  test_postprocessor_large \
Packit 875988
  test_postprocessor_amp
Packit 875988
endif
Packit 875988
Packit 875988
TESTS = $(check_PROGRAMS)
Packit 875988
Packit 875988
# Do not test trigger of select by shutdown of listen socket
Packit 875988
# on Cygwin as this ability is deliberately ignored on Cygwin
Packit 875988
# to improve compatibility with core OS.
Packit 875988
if !CYGWIN_TARGET
Packit 875988
if HAVE_LISTEN_SHUTDOWN
Packit 875988
check_PROGRAMS += \
Packit 875988
  test_shutdown_select \
Packit 875988
  test_shutdown_poll
Packit 875988
else
Packit 875988
check_PROGRAMS += \
Packit 875988
  test_shutdown_select_ignore \
Packit 875988
  test_shutdown_poll_ignore
Packit 875988
endif
Packit 875988
endif
Packit 875988
Packit 875988
test_start_stop_SOURCES = \
Packit 875988
  test_start_stop.c
Packit 875988
test_start_stop_LDADD = \
Packit 875988
  $(top_builddir)/src/microhttpd/libmicrohttpd.la
Packit 875988
Packit 875988
test_daemon_SOURCES = \
Packit 875988
  test_daemon.c
Packit 875988
test_daemon_LDADD = \
Packit 875988
  $(top_builddir)/src/microhttpd/libmicrohttpd.la
Packit 875988
Packit 875988
test_upgrade_SOURCES = \
Packit 875988
  test_upgrade.c test_helpers.h mhd_sockets.h
Packit 875988
test_upgrade_CPPFLAGS = \
Packit 875988
  $(AM_CPPFLAGS) $(GNUTLS_CPPFLAGS)
Packit 875988
test_upgrade_CFLAGS = \
Packit 875988
  $(AM_CFLAGS) $(PTHREAD_CFLAGS) $(GNUTLS_CFLAGS)
Packit 875988
test_upgrade_LDFLAGS = \
Packit 875988
  $(GNUTLS_LDFLAGS)
Packit 875988
test_upgrade_LDADD = \
Packit 875988
  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
Packit 875988
  $(PTHREAD_LIBS)
Packit 875988
Packit 875988
test_upgrade_tls_SOURCES = \
Packit 875988
  test_upgrade.c test_helpers.h mhd_sockets.h
Packit 875988
test_upgrade_tls_CPPFLAGS = \
Packit 875988
  $(AM_CPPFLAGS) $(GNUTLS_CPPFLAGS)
Packit 875988
test_upgrade_tls_CFLAGS = \
Packit 875988
  $(AM_CFLAGS) $(PTHREAD_CFLAGS) $(GNUTLS_CFLAGS)
Packit 875988
test_upgrade_tls_LDFLAGS = \
Packit 875988
  $(GNUTLS_LDFLAGS)
Packit 875988
test_upgrade_tls_LDADD = \
Packit 875988
  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
Packit 875988
  $(PTHREAD_LIBS)
Packit 875988
Packit 875988
test_postprocessor_SOURCES = \
Packit 875988
  test_postprocessor.c
Packit 875988
test_postprocessor_CPPFLAGS = \
Packit 875988
  $(AM_CPPFLAGS) $(GNUTLS_CPPFLAGS)
Packit 875988
test_postprocessor_CFLAGS = \
Packit 875988
  $(AM_CFLAGS) $(GNUTLS_CFLAGS)
Packit 875988
test_postprocessor_LDADD = \
Packit 875988
  $(top_builddir)/src/microhttpd/libmicrohttpd.la
Packit 875988
Packit 875988
test_postprocessor_amp_SOURCES = \
Packit 875988
  test_postprocessor_amp.c
Packit 875988
test_postprocessor_amp_CPPFLAGS = \
Packit 875988
  $(AM_CPPFLAGS) $(GNUTLS_CPPFLAGS)
Packit 875988
test_postprocessor_amp_CFLAGS = \
Packit 875988
  $(AM_CFLAGS) $(GNUTLS_CFLAGS)
Packit 875988
test_postprocessor_amp_LDADD = \
Packit 875988
  $(top_builddir)/src/microhttpd/libmicrohttpd.la
Packit 875988
Packit 875988
test_postprocessor_large_SOURCES = \
Packit 875988
  test_postprocessor_large.c
Packit 875988
test_postprocessor_large_CPPFLAGS = \
Packit 875988
  $(AM_CPPFLAGS) $(GNUTLS_CPPFLAGS)
Packit 875988
test_postprocessor_large_CFLAGS = \
Packit 875988
  $(AM_CFLAGS) $(GNUTLS_CFLAGS)
Packit 875988
test_postprocessor_large_LDADD = \
Packit 875988
  $(top_builddir)/src/microhttpd/libmicrohttpd.la
Packit 875988
Packit 875988
test_shutdown_select_SOURCES = \
Packit 875988
  test_shutdown_select.c
Packit 875988
if USE_POSIX_THREADS
Packit 875988
test_shutdown_select_CFLAGS = \
Packit 875988
  $(AM_CFLAGS) $(PTHREAD_CFLAGS)
Packit 875988
test_shutdown_select_LDADD = \
Packit 875988
  $(PTHREAD_LIBS)
Packit 875988
endif
Packit 875988
Packit 875988
test_shutdown_poll_SOURCES = \
Packit 875988
  test_shutdown_select.c mhd_threads.h
Packit 875988
if USE_POSIX_THREADS
Packit 875988
test_shutdown_poll_CFLAGS = \
Packit 875988
  $(AM_CFLAGS) $(PTHREAD_CFLAGS)
Packit 875988
test_shutdown_poll_LDADD = \
Packit 875988
  $(PTHREAD_LIBS)
Packit 875988
endif
Packit 875988
Packit 875988
test_shutdown_select_ignore_SOURCES = \
Packit 875988
  test_shutdown_select.c
Packit 875988
if USE_POSIX_THREADS
Packit 875988
test_shutdown_select_ignore_CFLAGS = \
Packit 875988
  $(AM_CFLAGS) $(PTHREAD_CFLAGS)
Packit 875988
test_shutdown_select_ignore_LDADD = \
Packit 875988
  $(PTHREAD_LIBS)
Packit 875988
endif
Packit 875988
Packit 875988
test_shutdown_poll_ignore_SOURCES = \
Packit 875988
  test_shutdown_select.c mhd_threads.h
Packit 875988
if USE_POSIX_THREADS
Packit 875988
test_shutdown_poll_ignore_CFLAGS = \
Packit 875988
  $(AM_CFLAGS) $(PTHREAD_CFLAGS)
Packit 875988
test_shutdown_poll_ignore_LDADD = \
Packit 875988
  $(PTHREAD_LIBS)
Packit 875988
endif
Packit 875988
Packit 875988
test_str_compare_SOURCES = \
Packit 875988
  test_str.c test_helpers.h mhd_str.c
Packit 875988
Packit 875988
test_str_to_value_SOURCES = \
Packit 875988
  test_str.c test_helpers.h mhd_str.c
Packit 875988
Packit 875988
test_str_token_SOURCES = \
Packit 875988
  test_str_token.c mhd_str.c
Packit 875988
Packit 875988
test_http_reasons_SOURCES = \
Packit 875988
  test_http_reasons.c \
Packit 875988
  reason_phrase.c mhd_str.c mhd_str.h
Packit 875988
Packit 875988
test_options_SOURCES = \
Packit 875988
  test_options.c
Packit 875988
test_options_LDADD = \
Packit 875988
  $(top_builddir)/src/microhttpd/libmicrohttpd.la