<commit_before>WS_SRC:=websocket/
WEBSOCKET_RT:=$(if $(findstring yy,$(WEBSOCKET_RT)$(SHARED)),y,n)
lib-$(WEBSOCKET_RT)+=ouistiti_ws
ouistiti_ws_SOURCES+=websocket.c utils.c
ouistiti_ws_LIBS+=dl
ouistiti_ws_CFLAGS+=$(LIBHTTPSERVER_CFLAGS)
ouistiti_ws_CFLAGS-$(DEBUG)+=-g -DDEBUG
ouistiti_ws_LIBS+=websocket
ouistiti_ws_LDFLAGS+=$(LIBHTTPSERVER_LDFLAGS)

ifneq ($(USE_PTHREAD),y)
  WS_ECHO=n
  WS_CHAT=n
  WS_JSONRPC=n
  WS_GPS=n
  WS_SYSLOGD=n
endif

bin-$(WS_ECHO)+=websocket_echo
websocket_echo_SOURCES+=$(WS_SRC)echo.c
websocket_echo_LDFLAGS-$(WEBSOCKET_RT)+=$(LIBHTTPSERVER_LDFLAGS)
websocket_echo_LIBS-$(WEBSOCKET_RT)+=ouistiti_ws websocket c
websocket_echo_LIBS-$(USE_PTHREAD)+=pthread

websocket_echo_CFLAGS-$(DEBUG)+=-g -DDEBUG

bin-$(WS_GPS)+=websocket_gps
websocket_gps_SOURCES+=$(WS_SRC)nmea.c
websocket_gps_CFLAGS+=-DPTHREAD
websocket_gps_LDFLAGS-$(WEBSOCKET_RT)+=$(LIBHTTPSERVER_LDFLAGS)
websocket_gps_LIBS-$(WEBSOCKET_RT)+=ouistiti_ws websocket
websocket_gps_LIBS+=pthread nmea

websocket_gps_CFLAGS-$(DEBUG)+=-g -DDEBUG

bin-$(WS_CHAT)+=websocket_chat
websocket_chat_SOURCES+=$(WS_SRC)chat.c
websocket_chat_LDFLAGS-$(WEBSOCKET_RT)+=$(LIBHTTPSERVER_LDFLAGS)
websocket_chat_LIBS-$(WEBSOCKET_RT)+=ouistiti_ws websocket

websocket_chat_CFLAGS-$(DEBUG)+=-g -DDEBUG

bin-$(WS_CHAT)+=client_chat
client_chat_SOURCES+=$(WS_SRC)client_chat.c
client_chat_CFLAGS+=-DPTHREAD
client_chat_CFLAGS-$(DEBUG)+=-g -DDEBUG

ifeq ($(MODULES),y)

bin-$(WS_JSONRPC)+=websocket_jsonrpc
websocket_jsonrpc_SOURCES+=$(WS_SRC)jsonrpc.c
websocket_jsonrpc_SOURCES+=jsonrpc/jsonrpc.c
websocket_jsonrpc_LDFLAGS-$(WEBSOCKET_RT)+=$(LIBHTTPSERVER_LDFLAGS)
websocket_jsonrpc_LIBS-$(WEBSOCKET_RT)+=ouistiti_ws websocket c
websocket_jsonrpc_LIBS+=dl jansson
websocket_jsonrpc_LIBS-$(USE_PTHREAD)+=pthread
websocket_jsonrpc_CFLAGS-$(DEBUG)+=-g -DDEBUG

modules-$(WS_JSONRPC)+=jsonsql
jsonsql_SOURCES+=$(WS_SRC)jsonsql.c
jsonsql_LIBRARY+=sqlite3
jsonsql_CFLAGS-$(DEBUG)+=-g -DDEBUG

modules-$(WS_JSONRPC)+=authrpc
authrpc_SOURCES+=$(WS_SRC)authrpc.c
authrpc_LIBRARY+=sqlite3
authrpc_LIBS+=ouihash
authrpc_LIBS-$(MBEDTLS)+=mbedcrypto
authrpc_CFLAGS-$(DEBUG)+=-g -DDEBUG
authrpc_CFLAGS+=$(LIBHTTPSERVER_CFLAGS)
authrpc_LDFLAGS+=$(LIBHTTPSERVER_LDFLAGS)

else<commit_msg>[utils] small build rule<commit_after>WS_SRC:=websocket/
WEBSOCKET_RT:=$(if $(findstring yy,$(WEBSOCKET_RT)$(SHARED)),y,n)
lib-$(WEBSOCKET_RT)+=ouistiti_ws
ouistiti_ws_SOURCES+=websocket.c utils.c
ouistiti_ws_LIBS+=dl
ouistiti_ws_CFLAGS+=$(LIBHTTPSERVER_CFLAGS)
ouistiti_ws_CFLAGS-$(DEBUG)+=-g -DDEBUG
ouistiti_ws_LIBS+=websocket
ouistiti_ws_LDFLAGS+=$(LIBHTTPSERVER_LDFLAGS)

ifneq ($(USE_PTHREAD),y)
  WS_ECHO=n
  WS_CHAT=n
  WS_JSONRPC=n
  WS_GPS=n
  WS_SYSLOGD=n
endif

bin-$(WS_ECHO)+=websocket_echo
websocket_echo_SOURCES+=$(WS_SRC)echo.c
websocket_echo_LDFLAGS-$(WEBSOCKET_RT)+=$(LIBHTTPSERVER_LDFLAGS)
websocket_echo_LIBS-$(WEBSOCKET_RT)+=ouistiti_ws websocket c
websocket_echo_LIBS-$(USE_PTHREAD)+=pthread

websocket_echo_CFLAGS-$(DEBUG)+=-g -DDEBUG

bin-$(WS_GPS)+=websocket_gps
websocket_gps_SOURCES+=$(WS_SRC)nmea.c
websocket_gps_CFLAGS+=-DPTHREAD
websocket_gps_LDFLAGS-$(WEBSOCKET_RT)+=$(LIBHTTPSERVER_LDFLAGS)
websocket_gps_LIBS-$(WEBSOCKET_RT)+=ouistiti_ws websocket
websocket_gps_LIBS+=pthread nmea

websocket_gps_CFLAGS-$(DEBUG)+=-g -DDEBUG

bin-$(WS_CHAT)+=websocket_chat
websocket_chat_SOURCES+=$(WS_SRC)chat.c
websocket_chat_LDFLAGS-$(WEBSOCKET_RT)+=$(LIBHTTPSERVER_LDFLAGS)
websocket_chat_LIBS-$(WEBSOCKET_RT)+=ouistiti_ws websocket

websocket_chat_CFLAGS-$(DEBUG)+=-g -DDEBUG

bin-$(WS_CHAT)+=client_chat
client_chat_SOURCES+=$(WS_SRC)client_chat.c
client_chat_CFLAGS+=-DPTHREAD
client_chat_CFLAGS-$(DEBUG)+=-g -DDEBUG

ifeq ($(MODULES),y)

bin-$(WS_JSONRPC)+=websocket_jsonrpc
websocket_jsonrpc_SOURCES+=$(WS_SRC)jsonrpc.c
websocket_jsonrpc_SOURCES+=jsonrpc/jsonrpc.c
websocket_jsonrpc_LDFLAGS-$(WEBSOCKET_RT)+=$(LIBHTTPSERVER_LDFLAGS)
websocket_jsonrpc_LIBS-$(WEBSOCKET_RT)+=ouistiti_ws websocket c
websocket_jsonrpc_LIBS+=jansson
websocket_jsonrpc_LIBS+=dl
websocket_jsonrpc_LIBS-$(USE_PTHREAD)+=pthread
websocket_jsonrpc_CFLAGS-$(DEBUG)+=-g -DDEBUG

modules-$(WS_JSONRPC)+=jsonsql
jsonsql_SOURCES+=$(WS_SRC)jsonsql.c
jsonsql_LIBRARY+=sqlite3
jsonsql_CFLAGS-$(DEBUG)+=-g -DDEBUG

modules-$(WS_JSONRPC)+=authrpc
authrpc_SOURCES+=$(WS_SRC)authrpc.c
authrpc_LIBRARY+=sqlite3
authrpc_LIBS+=ouihash
authrpc_LIBS-$(MBEDTLS)+=mbedcrypto
authrpc_CFLAGS-$(DEBUG)+=-g -DDEBUG
authrpc_CFLAGS+=$(LIBHTTPSERVER_CFLAGS)
authrpc_LDFLAGS+=$(LIBHTTPSERVER_LDFLAGS)

else
{'fraction_non_alphanumeric': 0.14244636142446362, 'fraction_numerical': 0.0008847600088476001, 'mean_word_length': 12.95679012345679, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2313388', 'n_tokens_mistral': 2081, 'n_tokens_neox': 1998, 'n_words': 164}