introduce fraggle test app
[profile/ivi/libwebsockets.git] / test-server / Makefile.am
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
4 libwebsockets_test_client_SOURCES=test-client.c
5 libwebsockets_test_client_LDADD=-L../lib -lwebsockets
6 libwebsockets_test_server_extpoll_SOURCES=test-server-extpoll.c
7 libwebsockets_test_server_extpoll_LDADD=-L../lib -lwebsockets
8 libwebsockets_test_fraggle_SOURCES=test-fraggle.c
9 libwebsockets_test_fraggle_LDADD=-L../lib -lwebsockets
10
11
12 libwebsockets_test_server_CFLAGS:= -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
13 libwebsockets_test_client_CFLAGS:= -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
14 libwebsockets_test_server_extpoll_CFLAGS:= -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
15 libwebsockets_test_fraggle_CFLAGS:= -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
16
17
18 if NOPING
19 else
20 bin_PROGRAMS+=libwebsockets-test-ping
21 libwebsockets_test_ping_SOURCES=test-ping.c
22 libwebsockets_test_ping_LDADD=-L../lib -lwebsockets
23 libwebsockets_test_ping_CFLAGS:= -Wall -Werror -std=gnu99 -pedantic -DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
24 endif
25
26
27 #
28 # cook a random test cert and key
29 # notice your real cert and key will want to be 0600 permissions
30 libwebsockets-test-server.pem libwebsockets-test-server.key.pem:
31         printf "GB\nErewhon\nAll around\nlibwebsockets-test\n\nlocalhost\nnone@invalid.org\n" | \
32         openssl req -new -newkey rsa:1024 -days 10000 -nodes -x509 -keyout \
33         ./libwebsockets-test-server.key.pem -out ./libwebsockets-test-server.pem >/dev/null 2>&1  && \
34         chmod 644       ./libwebsockets-test-server.key.pem \
35                         ./libwebsockets-test-server.pem
36
37 clean-local:
38         rm -f ./libwebsockets-test-server.key.pem ./libwebsockets-test-server.pem
39
40 install-data-local:libwebsockets-test-server.key.pem libwebsockets-test-server.pem
41         mkdir -p $(DESTDIR)$(datadir)/libwebsockets-test-server
42         cp -a test.html favicon.ico libwebsockets-test-server.key.pem libwebsockets-test-server.pem \
43                 $(DESTDIR)$(datadir)/libwebsockets-test-server
44