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_LDADD=-L../lib -lwebsockets -lz
4 libwebsockets_test_client_SOURCES=test-client.c
5 libwebsockets_test_client_LDADD=-L../lib -lwebsockets -lz
6 libwebsockets_test_server_extpoll_SOURCES=test-server-extpoll.c
7 libwebsockets_test_server_extpoll_LDADD=-L../lib -lwebsockets -lz
8 libwebsockets_test_fraggle_SOURCES=test-fraggle.c
9 libwebsockets_test_fraggle_LDADD=-L../lib -lwebsockets -lz
12 libwebsockets_test_server_CFLAGS= -w -I../win32port/win32helpers
13 libwebsockets_test_client_CFLAGS= -w -I../win32port/win32helpers
14 libwebsockets_test_server_extpoll_CFLAGS= -w -I../win32port/win32helpers
15 libwebsockets_test_fraggle_CFLAGS= -w -I../win32port/win32helpers
17 libwebsockets_test_server_LDADD+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lws2_32 -lz
18 libwebsockets_test_client_LDADD+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lws2_32 -lz
19 libwebsockets_test_server_extpoll_LDADD+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lws2_32 -lz
20 libwebsockets_test_fraggle_LDADD+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc -lws2_32 -lz
23 libwebsockets_test_server_CFLAGS= -Werror
24 libwebsockets_test_client_CFLAGS= -Werror
25 libwebsockets_test_server_extpoll_CFLAGS= -Werror
26 libwebsockets_test_fraggle_CFLAGS= -Werror
29 libwebsockets_test_server_CFLAGS+= -Wall -std=gnu99 -pedantic -DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
30 libwebsockets_test_client_CFLAGS+= -Wall -std=gnu99 -pedantic -DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
31 libwebsockets_test_server_extpoll_CFLAGS+= -Wall -std=gnu99 -pedantic -DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
32 libwebsockets_test_fraggle_CFLAGS+= -Wall -std=gnu99 -pedantic -DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
37 bin_PROGRAMS+=libwebsockets-test-ping
38 libwebsockets_test_ping_SOURCES=test-ping.c
39 libwebsockets_test_ping_LDADD=-L../lib -lwebsockets
40 libwebsockets_test_ping_CFLAGS= -Wall -Werror -std=gnu99 -pedantic -DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
45 # cook a random test cert and key
46 # notice your real cert and key will want to be 0600 permissions
47 libwebsockets-test-server.pem libwebsockets-test-server.key.pem:
48 printf "GB\nErewhon\nAll around\nlibwebsockets-test\n\nlocalhost\nnone@invalid.org\n" | \
49 openssl req -new -newkey rsa:1024 -days 10000 -nodes -x509 -keyout \
50 ./libwebsockets-test-server.key.pem -out ./libwebsockets-test-server.pem >/dev/null 2>&1 && \
51 chmod 644 ./libwebsockets-test-server.key.pem \
52 ./libwebsockets-test-server.pem
55 rm -f ./libwebsockets-test-server.key.pem ./libwebsockets-test-server.pem
57 install-data-local:libwebsockets-test-server.key.pem libwebsockets-test-server.pem
58 mkdir -p $(DESTDIR)$(datadir)/libwebsockets-test-server
59 cp -a test.html favicon.ico libwebsockets-test-server.key.pem libwebsockets-test-server.pem \
60 $(DESTDIR)$(datadir)/libwebsockets-test-server