1 bin_PROGRAMS=libwebsockets-test-server
2 libwebsockets_test_server_SOURCES=test-server.c
3 libwebsockets_test_server_LDADD=-L../lib -lwebsockets
6 # cook a random test cert and key
7 # notice your real cert and key will want to be 0600 permissions
8 libwebsockets-test-server.pem libwebsockets-test-server.key.pem:
9 printf "GB\nErewhon\nAll around\nlibwebsockets-test\n\nlocalhost\nnone@invalid.org\n" | \
10 openssl req -new -newkey rsa:1024 -days 10000 -nodes -x509 -keyout \
11 ./libwebsockets-test-server.key.pem -out ./libwebsockets-test-server.pem >/dev/null 2>&1 && \
12 chmod 644 ./libwebsockets-test-server.key.pem \
13 ./libwebsockets-test-server.pem
16 rm -f ./libwebsockets-test-server.key.pem ./libwebsockets-test-server.pem
18 install-data-local:libwebsockets-test-server.key.pem libwebsockets-test-server.pem
19 mkdir -p $(DESTDIR)$(datadir)/libwebsockets-test-server
20 cp -a test.html favicon.ico libwebsockets-test-server.key.pem libwebsockets-test-server.pem \
21 $(DESTDIR)$(datadir)/libwebsockets-test-server