1 bin_PROGRAMS=libwebsockets-test-server libwebsockets-test-client libwebsockets-test-server-extpoll libwebsockets-test-fraggle
2 libwebsockets_test_server_SOURCES=test-server.c
3 libwebsockets_test_server_CFLAGS=
4 libwebsockets_test_server_LDADD=-L../lib -lwebsockets -lz
5 libwebsockets_test_client_SOURCES=test-client.c
6 libwebsockets_test_client_CFLAGS=
7 libwebsockets_test_client_LDADD=-L../lib -lwebsockets -lz
8 libwebsockets_test_server_extpoll_SOURCES=test-server.c
9 libwebsockets_test_server_extpoll_CFLAGS=$(AM_CFLAGS) -DEXTERNAL_POLL
10 libwebsockets_test_server_extpoll_LDADD=-L../lib -lwebsockets -lz
11 libwebsockets_test_fraggle_SOURCES=test-fraggle.c
12 libwebsockets_test_fraggle_CFLAGS=
13 libwebsockets_test_fraggle_LDADD=-L../lib -lwebsockets -lz
16 libwebsockets_test_server_CFLAGS+= -w -I../win32port/win32helpers
17 libwebsockets_test_client_CFLAGS+= -w -I../win32port/win32helpers
18 libwebsockets_test_server_extpoll_CFLAGS+= -w -I../win32port/win32helpers
19 libwebsockets_test_fraggle_CFLAGS+= -w -I../win32port/win32helpers
21 libwebsockets_test_server_LDADD+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lws2_32 -lz
22 libwebsockets_test_client_LDADD+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lws2_32 -lz
23 libwebsockets_test_server_extpoll_LDADD+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lws2_32 -lz
24 libwebsockets_test_fraggle_LDADD+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lws2_32 -lz
27 libwebsockets_test_server_CFLAGS+= -Werror
28 libwebsockets_test_client_CFLAGS+= -Werror
29 libwebsockets_test_server_extpoll_CFLAGS+= -Werror
30 libwebsockets_test_fraggle_CFLAGS+= -Werror
33 libwebsockets_test_server_CFLAGS+= -Wall -std=gnu99 -pedantic -DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
34 libwebsockets_test_client_CFLAGS+= -Wall -std=gnu99 -pedantic -DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
35 libwebsockets_test_server_extpoll_CFLAGS+= -Wall -std=gnu99 -pedantic -DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
36 libwebsockets_test_fraggle_CFLAGS+= -Wall -std=gnu99 -pedantic -DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
41 bin_PROGRAMS+=libwebsockets-test-ping
42 libwebsockets_test_ping_SOURCES=test-ping.c
43 libwebsockets_test_ping_LDADD=-L../lib -lwebsockets
44 libwebsockets_test_ping_CFLAGS= -Wall -Werror -std=gnu99 -pedantic -DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
47 EXTRA_DIST=test.html favicon.ico libwebsockets.org-logo.png
50 # cook a random test cert and key
51 # notice your real cert and key will want to be 0600 permissions
52 libwebsockets-test-server.pem libwebsockets-test-server.key.pem:
53 printf "GB\nErewhon\nAll around\nlibwebsockets-test\n\nlocalhost\nnone@invalid.org\n" | \
54 openssl req -new -newkey rsa:1024 -days 10000 -nodes -x509 -keyout \
55 ./libwebsockets-test-server.key.pem -out ./libwebsockets-test-server.pem >/dev/null 2>&1 && \
56 chmod 644 ./libwebsockets-test-server.key.pem \
57 ./libwebsockets-test-server.pem
60 rm -f ./libwebsockets-test-server.key.pem ./libwebsockets-test-server.pem
62 install-data-local:libwebsockets-test-server.key.pem libwebsockets-test-server.pem
63 mkdir -p $(DESTDIR)$(datadir)/libwebsockets-test-server
64 cp -a $(EXTRA_DIST) libwebsockets-test-server.key.pem libwebsockets-test-server.pem \
65 $(DESTDIR)$(datadir)/libwebsockets-test-server