<commit_before># all common objects that need to be build for all targets except for windows version
common_objs := flaggedarrayset.o utils.o p2pclient.o ./crypto/sha2.o

MINGW_CXX = i686-w64-mingw32-g++

COMMON_CXXFLAGS := -I.

variant ?= production
ifeq ($(variant),test)
  COMMON_CXXFLAGS += -DFOR_VALGRIND -g
else
  COMMON_CXXFLAGS += -DNDEBUG -O2 -flto
endif

COMMON_CXXFLAGS += -std=c++11 -Wall
UNIX_CXXFLAGS := -pthread -I/usr/include

CXXFLAGS := $(COMMON_CXXFLAGS) $(UNIX_CXXFLAGS)

# list of all targets
targets = $(addprefix relaynetwork,client terminator proxy outbound)

all: $(filter %client,$(targets))

all-targets: $(targets)

relaynetworkclient: $(common_objs) client.o

relaynetworkclient.exe: $(patsubst %.o,%.cpp,$(common_objs) client.o)
	$(MINGW_CXX) $(COMMON_CXXFLAGS) -DWIN32 -mno-ms-bitfields -static -static-libgcc -lwsock32 -lmingwthrd -lws2_32 $^ -o $@

relaynetworkserver: $(common_objs) server.o

relaynetworkterminator: $(common_objs) bitcoindterminator.o

relaynetworkproxy: $(common_objs) relayproxy.o

relaynetworkoutbound: $(common_objs) p2poutbound.o

relaynetwork%:
	$(CXX) $(LDFLAGS) $^ -o $@

clean:
	rm -f *.o crypto/*.o crypto/*~ *~ *.exe $(targets)<commit_msg>c++ - CXXFLAGS added to the link rule, to link with pthread library properly<commit_after># all common objects that need to be build for all targets except for windows version
common_objs := flaggedarrayset.o utils.o p2pclient.o ./crypto/sha2.o

MINGW_CXX = i686-w64-mingw32-g++

COMMON_CXXFLAGS := -I.

variant ?= production
ifeq ($(variant),test)
  COMMON_CXXFLAGS += -DFOR_VALGRIND -g
else
  COMMON_CXXFLAGS += -DNDEBUG -O2 -flto
endif

COMMON_CXXFLAGS += -std=c++11 -Wall
UNIX_CXXFLAGS := -pthread -I/usr/include

CXXFLAGS := $(COMMON_CXXFLAGS) $(UNIX_CXXFLAGS)


# list of all targets
targets = $(addprefix relaynetwork,client terminator proxy outbound)

all: $(filter %client,$(targets))

all-targets: $(targets)

relaynetworkclient: $(common_objs) client.o

relaynetworkclient.exe: $(patsubst %.o,%.cpp,$(common_objs) client.o)
	$(MINGW_CXX) $(COMMON_CXXFLAGS) -DWIN32 -mno-ms-bitfields -static -static-libgcc -lwsock32 -lmingwthrd -lws2_32 $^ -o $@

relaynetworkserver: $(common_objs) server.o

relaynetworkterminator: $(common_objs) bitcoindterminator.o

relaynetworkproxy: $(common_objs) relayproxy.o

relaynetworkoutbound: $(common_objs) p2poutbound.o

relaynetwork%:
	$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@

clean:
	rm -f *.o crypto/*.o crypto/*~ *~ *.exe $(targets)
{'fraction_non_alphanumeric': 0.14153225806451614, 'fraction_numerical': 0.016129032258064516, 'mean_word_length': 5.187032418952619, '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': '7003748', 'n_tokens_mistral': 999, 'n_tokens_neox': 929, 'n_words': 218}