From 135cfe32384e8eb483961fea203e193b67029a65 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Wed, 7 Nov 2018 12:33:33 -0800 Subject: [PATCH] Add some example shell scripts to build on Linux --- examples/chat/build_linux.sh | 15 +++++++++++++++ examples/ping_pong/build_linux.sh | 15 +++++++++++++++ examples/ws_connect/build_linux.sh | 20 ++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 examples/chat/build_linux.sh create mode 100644 examples/ping_pong/build_linux.sh create mode 100644 examples/ws_connect/build_linux.sh diff --git a/examples/chat/build_linux.sh b/examples/chat/build_linux.sh new file mode 100644 index 00000000..a5aa90d0 --- /dev/null +++ b/examples/chat/build_linux.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Author: Benjamin Sergeant +# Copyright (c) 2017-2018 Machine Zone, Inc. All rights reserved. +# + +# 'manual' way of building. You can also use cmake. + +g++ --std=c++11 \ + ../../ixwebsocket/IXSocket.cpp \ + ../../ixwebsocket/IXWebSocketTransport.cpp \ + ../../ixwebsocket/IXWebSocket.cpp \ + -I ../.. \ + cmd_websocket_chat.cpp \ + -o cmd_websocket_chat diff --git a/examples/ping_pong/build_linux.sh b/examples/ping_pong/build_linux.sh new file mode 100644 index 00000000..a5aa90d0 --- /dev/null +++ b/examples/ping_pong/build_linux.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Author: Benjamin Sergeant +# Copyright (c) 2017-2018 Machine Zone, Inc. All rights reserved. +# + +# 'manual' way of building. You can also use cmake. + +g++ --std=c++11 \ + ../../ixwebsocket/IXSocket.cpp \ + ../../ixwebsocket/IXWebSocketTransport.cpp \ + ../../ixwebsocket/IXWebSocket.cpp \ + -I ../.. \ + cmd_websocket_chat.cpp \ + -o cmd_websocket_chat diff --git a/examples/ws_connect/build_linux.sh b/examples/ws_connect/build_linux.sh new file mode 100644 index 00000000..5da47563 --- /dev/null +++ b/examples/ws_connect/build_linux.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Author: Benjamin Sergeant +# Copyright (c) 2017-2018 Machine Zone, Inc. All rights reserved. +# + +# 'manual' way of building. You can also use cmake. + +g++ --std=c++11 \ + -DIXWEBSOCKET_USE_TLS \ + -g \ + ../../ixwebsocket/IXEventFd.cpp \ + ../../ixwebsocket/IXSocket.cpp \ + ../../ixwebsocket/IXWebSocketTransport.cpp \ + ../../ixwebsocket/IXWebSocket.cpp \ + ../../ixwebsocket/IXSocketOpenSSL.cpp \ + -I ../.. \ + ws_connect.cpp \ + -o ws_connect \ + -lcrypto -lssl -lpthread