summaryrefslogtreecommitdiff
path: root/test-server
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2012-04-12 10:11:29 +0800
committerAndy Green <andy.green@linaro.org>2012-04-12 10:11:29 +0800
commit0dbef49e548eef4a8710cda5f9eff38e1a8f2817 (patch)
treed83beb419e8ab30e5f1f42269b56c4381b0230ba /test-server
parent6ee372fcd815c7f452ec1ac53e404520a5af4920 (diff)
autoconf introduce enable mingw and adapt compiler options
Based on work from Radu Sorici <soriciradu@gmail.com> Signed-off-by: Andy Green <andy.green@linaro.org>
Diffstat (limited to 'test-server')
-rw-r--r--test-server/Makefile.am25
-rw-r--r--test-server/Makefile.in79
2 files changed, 80 insertions, 24 deletions
diff --git a/test-server/Makefile.am b/test-server/Makefile.am
index 84f3bf1..cfbeacc 100644
--- a/test-server/Makefile.am
+++ b/test-server/Makefile.am
@@ -8,11 +8,28 @@ libwebsockets_test_server_extpoll_LDADD=-L../lib -lwebsockets
libwebsockets_test_fraggle_SOURCES=test-fraggle.c
libwebsockets_test_fraggle_LDADD=-L../lib -lwebsockets
+if MINGW
+libwebsockets_test_server_CFLAGS:= -w -I../win32port/win32helpers
+libwebsockets_test_client_CFLAGS:= -w -I../win32port/win32helpers
+libwebsockets_test_server_extpoll_CFLAGS:= -w -I../win32port/win32helpers
+libwebsockets_test_fraggle_CFLAGS:= -w -I../win32port/win32helpers
-libwebsockets_test_server_CFLAGS:= -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
-libwebsockets_test_client_CFLAGS:= -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
-libwebsockets_test_server_extpoll_CFLAGS:= -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
-libwebsockets_test_fraggle_CFLAGS:= -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
+libwebsockets_test_server_LDADD+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lpthread -ldl -lws2_32 -lz -L../win32port/win32helpers/ -lwebsock-w32
+libwebsockets_test_client_LDADD+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lpthread -ldl -lws2_32 -lz -L../win32port/win32helpers/ -lwebsock-w32
+libwebsockets_test_server_extpoll_LDADD+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lpthread -ldl -lws2_32 -lz -L../win32port/win32helpers/ -lwebsock-w32
+libwebsockets_test_fraggle_LDADD+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lpthread -ldl -lws2_32 -lz -L../win32port/win32helpers/ -lwebsock-w32
+
+else
+libwebsockets_test_server_CFLAGS:= -Werror
+libwebsockets_test_client_CFLAGS:= -Werror
+libwebsockets_test_server_extpoll_CFLAGS:= -Werror
+libwebsockets_test_fraggle_CFLAGS:= -Werror
+endif
+
+libwebsockets_test_server_CFLAGS+= -Wall -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
+libwebsockets_test_client_CFLAGS+= -Wall -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
+libwebsockets_test_server_extpoll_CFLAGS+= -Wall -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
+libwebsockets_test_fraggle_CFLAGS+= -Wall -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
if NOPING
diff --git a/test-server/Makefile.in b/test-server/Makefile.in
index 7f02435..f13f9de 100644
--- a/test-server/Makefile.in
+++ b/test-server/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -38,7 +38,11 @@ bin_PROGRAMS = libwebsockets-test-server$(EXEEXT) \
libwebsockets-test-client$(EXEEXT) \
libwebsockets-test-server-extpoll$(EXEEXT) \
libwebsockets-test-fraggle$(EXEEXT) $(am__EXEEXT_1)
-@NOPING_FALSE@am__append_1 = libwebsockets-test-ping
+@MINGW_TRUE@am__append_1 = -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lpthread -ldl -lws2_32 -lz -L../win32port/win32helpers/ -lwebsock-w32
+@MINGW_TRUE@am__append_2 = -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lpthread -ldl -lws2_32 -lz -L../win32port/win32helpers/ -lwebsock-w32
+@MINGW_TRUE@am__append_3 = -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lpthread -ldl -lws2_32 -lz -L../win32port/win32helpers/ -lwebsock-w32
+@MINGW_TRUE@am__append_4 = -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lpthread -ldl -lws2_32 -lz -L../win32port/win32helpers/ -lwebsock-w32
+@NOPING_FALSE@am__append_5 = libwebsockets-test-ping
subdir = test-server
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -56,7 +60,8 @@ am_libwebsockets_test_client_OBJECTS = \
libwebsockets_test_client-test-client.$(OBJEXT)
libwebsockets_test_client_OBJECTS = \
$(am_libwebsockets_test_client_OBJECTS)
-libwebsockets_test_client_DEPENDENCIES =
+am__DEPENDENCIES_1 =
+libwebsockets_test_client_DEPENDENCIES = $(am__DEPENDENCIES_1)
libwebsockets_test_client_LINK = $(LIBTOOL) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(libwebsockets_test_client_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
@@ -65,7 +70,7 @@ am_libwebsockets_test_fraggle_OBJECTS = \
libwebsockets_test_fraggle-test-fraggle.$(OBJEXT)
libwebsockets_test_fraggle_OBJECTS = \
$(am_libwebsockets_test_fraggle_OBJECTS)
-libwebsockets_test_fraggle_DEPENDENCIES =
+libwebsockets_test_fraggle_DEPENDENCIES = $(am__DEPENDENCIES_1)
libwebsockets_test_fraggle_LINK = $(LIBTOOL) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(libwebsockets_test_fraggle_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
@@ -84,7 +89,7 @@ am_libwebsockets_test_server_OBJECTS = \
libwebsockets_test_server-test-server.$(OBJEXT)
libwebsockets_test_server_OBJECTS = \
$(am_libwebsockets_test_server_OBJECTS)
-libwebsockets_test_server_DEPENDENCIES =
+libwebsockets_test_server_DEPENDENCIES = $(am__DEPENDENCIES_1)
libwebsockets_test_server_LINK = $(LIBTOOL) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(libwebsockets_test_server_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
@@ -92,7 +97,8 @@ libwebsockets_test_server_LINK = $(LIBTOOL) --tag=CC \
am_libwebsockets_test_server_extpoll_OBJECTS = libwebsockets_test_server_extpoll-test-server-extpoll.$(OBJEXT)
libwebsockets_test_server_extpoll_OBJECTS = \
$(am_libwebsockets_test_server_extpoll_OBJECTS)
-libwebsockets_test_server_extpoll_DEPENDENCIES =
+libwebsockets_test_server_extpoll_DEPENDENCIES = \
+ $(am__DEPENDENCIES_1)
libwebsockets_test_server_extpoll_LINK = $(LIBTOOL) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(libwebsockets_test_server_extpoll_CFLAGS) $(CFLAGS) \
@@ -238,17 +244,45 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
libwebsockets_test_server_SOURCES = test-server.c
-libwebsockets_test_server_LDADD = -L../lib -lwebsockets
+libwebsockets_test_server_LDADD = -L../lib -lwebsockets \
+ $(am__append_1)
libwebsockets_test_client_SOURCES = test-client.c
-libwebsockets_test_client_LDADD = -L../lib -lwebsockets
+libwebsockets_test_client_LDADD = -L../lib -lwebsockets \
+ $(am__append_2)
libwebsockets_test_server_extpoll_SOURCES = test-server-extpoll.c
-libwebsockets_test_server_extpoll_LDADD = -L../lib -lwebsockets
+libwebsockets_test_server_extpoll_LDADD = -L../lib -lwebsockets \
+ $(am__append_3)
libwebsockets_test_fraggle_SOURCES = test-fraggle.c
-libwebsockets_test_fraggle_LDADD = -L../lib -lwebsockets
-libwebsockets_test_server_CFLAGS := -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
-libwebsockets_test_client_CFLAGS := -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
-libwebsockets_test_server_extpoll_CFLAGS := -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
-libwebsockets_test_fraggle_CFLAGS := -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
+libwebsockets_test_fraggle_LDADD = -L../lib -lwebsockets \
+ $(am__append_4)
+@MINGW_FALSE@libwebsockets_test_server_CFLAGS := -Werror -Wall \
+@MINGW_FALSE@ -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" \
+@MINGW_FALSE@ -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
+@MINGW_TRUE@libwebsockets_test_server_CFLAGS := -w \
+@MINGW_TRUE@ -I../win32port/win32helpers -Wall -std=gnu99 \
+@MINGW_TRUE@ -pedantic -DDATADIR=\"@datadir@\" \
+@MINGW_TRUE@ -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
+@MINGW_FALSE@libwebsockets_test_client_CFLAGS := -Werror -Wall \
+@MINGW_FALSE@ -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" \
+@MINGW_FALSE@ -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
+@MINGW_TRUE@libwebsockets_test_client_CFLAGS := -w \
+@MINGW_TRUE@ -I../win32port/win32helpers -Wall -std=gnu99 \
+@MINGW_TRUE@ -pedantic -DDATADIR=\"@datadir@\" \
+@MINGW_TRUE@ -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
+@MINGW_FALSE@libwebsockets_test_server_extpoll_CFLAGS := -Werror -Wall \
+@MINGW_FALSE@ -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" \
+@MINGW_FALSE@ -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
+@MINGW_TRUE@libwebsockets_test_server_extpoll_CFLAGS := -w \
+@MINGW_TRUE@ -I../win32port/win32helpers -Wall -std=gnu99 \
+@MINGW_TRUE@ -pedantic -DDATADIR=\"@datadir@\" \
+@MINGW_TRUE@ -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
+@MINGW_FALSE@libwebsockets_test_fraggle_CFLAGS := -Werror -Wall \
+@MINGW_FALSE@ -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" \
+@MINGW_FALSE@ -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
+@MINGW_TRUE@libwebsockets_test_fraggle_CFLAGS := -w \
+@MINGW_TRUE@ -I../win32port/win32helpers -Wall -std=gnu99 \
+@MINGW_TRUE@ -pedantic -DDATADIR=\"@datadir@\" \
+@MINGW_TRUE@ -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
@NOPING_FALSE@libwebsockets_test_ping_SOURCES = test-ping.c
@NOPING_FALSE@libwebsockets_test_ping_LDADD = -L../lib -lwebsockets
@NOPING_FALSE@libwebsockets_test_ping_CFLAGS := -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
@@ -553,10 +587,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic: