From 911115ccc065dd6681eb61798af5b16edefc40a5 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Tue, 14 Oct 2014 10:05:12 +0000 Subject: [PATCH] Added -pthread to CFLAGS for linux --- examples/big_upload/Makefile | 2 +- examples/cookie_authentication/Makefile | 2 +- examples/digest_authentication/Makefile | 2 +- examples/file_upload/Makefile | 2 +- examples/form_submit/Makefile | 2 +- examples/hello_world/Makefile | 2 +- examples/http_client/Makefile | 4 ++-- examples/mjpg_streamer/Makefile | 2 +- examples/multi_threaded_server/Makefile | 2 +- examples/proxy_server/Makefile | 2 +- examples/restful_api/Makefile | 2 +- examples/send_file/Makefile | 2 +- examples/web_server/Makefile | 2 +- examples/websocket_chat/Makefile | 2 +- examples/websocket_echo_server/Makefile | 2 +- examples/websocket_ssl_proxy/Makefile | 5 ++--- 16 files changed, 18 insertions(+), 19 deletions(-) diff --git a/examples/big_upload/Makefile b/examples/big_upload/Makefile index 1f8720b7..a47d1884 100644 --- a/examples/big_upload/Makefile +++ b/examples/big_upload/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = big_upload -CFLAGS = -W -Wall -I../.. -g -O0 $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -pthread -I../.. -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c $(PROG): $(SOURCES) diff --git a/examples/cookie_authentication/Makefile b/examples/cookie_authentication/Makefile index 018c18ad..1eb0652b 100644 --- a/examples/cookie_authentication/Makefile +++ b/examples/cookie_authentication/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = cookie_auth -CFLAGS = -W -Wall -I../.. -g -O0 $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c $(PROG): $(SOURCES) diff --git a/examples/digest_authentication/Makefile b/examples/digest_authentication/Makefile index e666b6a0..86cd30db 100644 --- a/examples/digest_authentication/Makefile +++ b/examples/digest_authentication/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = digest_auth -CFLAGS = -W -Wall -I../.. -g -O0 $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c $(PROG): $(SOURCES) diff --git a/examples/file_upload/Makefile b/examples/file_upload/Makefile index 6e43388a..bf1e51df 100644 --- a/examples/file_upload/Makefile +++ b/examples/file_upload/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = file_upload -CFLAGS = -W -Wall -I../.. $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c all: $(PROG) diff --git a/examples/form_submit/Makefile b/examples/form_submit/Makefile index 1d7c0ff7..b233f285 100644 --- a/examples/form_submit/Makefile +++ b/examples/form_submit/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = form_submit -CFLAGS = -W -Wall -I../.. -g -O0 $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c $(PROG): $(SOURCES) diff --git a/examples/hello_world/Makefile b/examples/hello_world/Makefile index bab0dba7..d1384e01 100644 --- a/examples/hello_world/Makefile +++ b/examples/hello_world/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = hello_world -CFLAGS = -W -Wall -I../.. $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c all: $(PROG) diff --git a/examples/http_client/Makefile b/examples/http_client/Makefile index 906d32f0..422948ff 100644 --- a/examples/http_client/Makefile +++ b/examples/http_client/Makefile @@ -1,9 +1,9 @@ # Copyright (c) 2014 Cesanta Software # All rights reserved -CFLAGS = -W -Wall -I../.. -g -O0 $(CFLAGS_EXTRA) -SOURCES = http_client.c ../../mongoose.c PROG = http_client +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) +SOURCES = $(PROG).c ../../mongoose.c unix: $(SOURCES) $(CC) -o $(PROG) $(SOURCES) $(CFLAGS) diff --git a/examples/mjpg_streamer/Makefile b/examples/mjpg_streamer/Makefile index 0d16814a..35946c0a 100644 --- a/examples/mjpg_streamer/Makefile +++ b/examples/mjpg_streamer/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = mjpg_streamer -CFLAGS = -W -Wall -I../.. -g -O0 $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c $(PROG): $(SOURCES) diff --git a/examples/multi_threaded_server/Makefile b/examples/multi_threaded_server/Makefile index f3a4ff0c..b85aa97a 100644 --- a/examples/multi_threaded_server/Makefile +++ b/examples/multi_threaded_server/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = multi_threaded_server -CFLAGS = -W -Wall -I../.. -g -O0 $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c $(PROG): $(SOURCES) diff --git a/examples/proxy_server/Makefile b/examples/proxy_server/Makefile index 38d1a4db..0e1871df 100644 --- a/examples/proxy_server/Makefile +++ b/examples/proxy_server/Makefile @@ -3,7 +3,7 @@ PROG = proxy_server FLAGS = -I../.. -I../../../net_skeleton -DNS_ENABLE_SSL -CFLAGS = -W -Wall -g -O0 -lssl $(FLAGS) $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -g -O0 -pthread -lssl $(FLAGS) $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c unix: $(SOURCES) diff --git a/examples/restful_api/Makefile b/examples/restful_api/Makefile index e56fed32..97fcf3f9 100644 --- a/examples/restful_api/Makefile +++ b/examples/restful_api/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = restful_api -CFLAGS = -W -Wall -I../.. -g -O0 $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c $(PROG): $(SOURCES) diff --git a/examples/send_file/Makefile b/examples/send_file/Makefile index 0badd358..4c20d6ac 100644 --- a/examples/send_file/Makefile +++ b/examples/send_file/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = send_file -CFLAGS = -W -Wall -I../.. $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c all: $(PROG) diff --git a/examples/web_server/Makefile b/examples/web_server/Makefile index efc2e3e7..888f2148 100644 --- a/examples/web_server/Makefile +++ b/examples/web_server/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = web_server -CFLAGS = -W -Wall -I../.. -g -O0 $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c $(PROG): $(SOURCES) diff --git a/examples/websocket_chat/Makefile b/examples/websocket_chat/Makefile index 5b027268..780276ef 100644 --- a/examples/websocket_chat/Makefile +++ b/examples/websocket_chat/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = websocket_chat -CFLAGS = -W -Wall -I../.. -g -O0 $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c $(PROG): $(SOURCES) diff --git a/examples/websocket_echo_server/Makefile b/examples/websocket_echo_server/Makefile index 3e875230..f6b132dc 100644 --- a/examples/websocket_echo_server/Makefile +++ b/examples/websocket_echo_server/Makefile @@ -2,7 +2,7 @@ # All rights reserved PROG = websocket_echo_server -CFLAGS = -W -Wall -I../.. -g -O0 $(CFLAGS_EXTRA) +CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA) SOURCES = $(PROG).c ../../mongoose.c $(PROG): $(SOURCES) diff --git a/examples/websocket_ssl_proxy/Makefile b/examples/websocket_ssl_proxy/Makefile index b4fc4faf..e0076a33 100644 --- a/examples/websocket_ssl_proxy/Makefile +++ b/examples/websocket_ssl_proxy/Makefile @@ -1,10 +1,9 @@ # Copyright (c) 2014 Cesanta Software # All rights reserved -CFLAGS = -W -Wall -I../.. -I. -g -O0 $(CFLAGS_EXTRA) - -SOURCES = ws_ssl.c ../../mongoose.c net_skeleton.c ssl_wrapper.c PROG = ws_ssl +CFLAGS = -W -Wall -I../.. -I. -pthread -g -O0 $(CFLAGS_EXTRA) +SOURCES = ws_ssl.c ../../mongoose.c net_skeleton.c ssl_wrapper.c all: $(PROG)