From 502f021a0ed924ede1e71c890b9390b32c1c2802 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Sat, 30 May 2020 11:23:39 -0700 Subject: [PATCH] embedded help for httpd tool --- httpd.cpp | 7 ++++--- makefile | 27 ++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/httpd.cpp b/httpd.cpp index 1fa60e53..b1e580f1 100644 --- a/httpd.cpp +++ b/httpd.cpp @@ -14,9 +14,10 @@ int main(int argc, char** argv) { if (argc != 3) { - std::cerr << "Usage: httpd " << std::endl; - std::cerr << " ./a.out 9090 127.0.0.1" << std::endl; - std::cerr << " ./a.out 9090 0.0.0.0" << std::endl; + std::cerr << "Usage: " << argv[0] + << " " << std::endl; + std::cerr << " " << argv[0] << " 9090 127.0.0.1" << std::endl; + std::cerr << " " << argv[0] << " 9090 0.0.0.0" << std::endl; return 1; } diff --git a/makefile b/makefile index ff59e16b..93db0e83 100644 --- a/makefile +++ b/makefile @@ -189,7 +189,32 @@ httpd: ixwebsocket/IXConnectionState.cpp \ ixwebsocket/IXUrlParser.cpp \ ixwebsocket/IXSelectInterrupt.cpp \ - ixwebsocket/apple/IXSetThreadName_apple.cpp -lz + ixwebsocket/apple/IXSetThreadName_apple.cpp \ + -lz + +httpd_linux: + g++ --std=c++11 -o ixhttpd httpd.cpp -Iixwebsocket \ + ixwebsocket/IXSelectInterruptFactory.cpp \ + ixwebsocket/IXCancellationRequest.cpp \ + ixwebsocket/IXSocketTLSOptions.cpp \ + ixwebsocket/IXUserAgent.cpp \ + ixwebsocket/IXDNSLookup.cpp \ + ixwebsocket/IXBench.cpp \ + ixwebsocket/IXWebSocketHttpHeaders.cpp \ + ixwebsocket/IXSelectInterruptPipe.cpp \ + ixwebsocket/IXHttp.cpp \ + ixwebsocket/IXSocketConnect.cpp \ + ixwebsocket/IXSocket.cpp \ + ixwebsocket/IXSocketServer.cpp \ + ixwebsocket/IXNetSystem.cpp \ + ixwebsocket/IXHttpServer.cpp \ + ixwebsocket/IXSocketFactory.cpp \ + ixwebsocket/IXConnectionState.cpp \ + ixwebsocket/IXUrlParser.cpp \ + ixwebsocket/IXSelectInterrupt.cpp \ + ixwebsocket/linux/IXSetThreadName_linux.cpp \ + -lz -lpthread + cp -f ixhttpd /usr/local/bin # For the fork that is configured with appveyor rebase_upstream: