<commit_before>CXX:=g++
JSLIBS:=../src/libjsapi/dist/Debug/GNU-Linux-x86/libjsapi.a ../externals/installed/lib/libjs_static.ajs -Wl,--whole-archive ../externals/installed/lib/libmozglue.a -Wl,--no-whole-archive
CXXFLAGS:=--std=c++11 -I ../src/libjsapi -I ../externals/installed/include/mozjs-50/ $(JSLIBS) -lpthread `pkg-config --libs zlib` -ldl --coverage -g

all: helloworld square object dynamicobject dynamicarray

.PHONY: clean

helloworld: helloworld.cpp
	$(CXX) $? $(CXXFLAGS) $(LDFLAGS) -o $@
	
square: square.cpp
	$(CXX) $? $(CXXFLAGS) $(LDFLAGS) -o $@
	
object: object.cpp
	$(CXX) $? $(CXXFLAGS) $(LDFLAGS) -o $@

dynamicobject: dynamicobject.cpp
	$(CXX) $? $(CXXFLAGS) $(LDFLAGS) -o $@

dynamicarray: dynamicarray.cpp
	$(CXX) $? $(CXXFLAGS) $(LDFLAGS) -o $@

clean:
	rm helloworld square object dynamicobject dynamicarray<commit_msg>Optionally link the examples with lrt<commit_after>CXX:=g++
JSLIBS:=../src/libjsapi/dist/Debug/GNU-Linux-x86/libjsapi.a ../externals/installed/lib/libjs_static.ajs -Wl,--whole-archive ../externals/installed/lib/libmozglue.a -Wl,--no-whole-archive
CXXFLAGS:=--std=c++11 -I ../src/libjsapi -I ../externals/installed/include/mozjs-50/ $(JSLIBS) -lpthread `pkg-config --libs zlib` -ldl --coverage -g

LDLIBS:=$(shell echo 'int main(){}' | $(CXX) -x c++ -o /dev/null -lrt - > /dev/null 2>&1 && echo '-lrt')
LDFLAGS+=$(LDLIBS)

all: helloworld square object dynamicobject dynamicarray

.PHONY: clean

helloworld: helloworld.cpp
	$(CXX) $? $(CXXFLAGS) $(LDFLAGS) -o $@
	
square: square.cpp
	$(CXX) $? $(CXXFLAGS) $(LDFLAGS) -o $@
	
object: object.cpp
	$(CXX) $? $(CXXFLAGS) $(LDFLAGS) -o $@

dynamicobject: dynamicobject.cpp
	$(CXX) $? $(CXXFLAGS) $(LDFLAGS) -o $@

dynamicarray: dynamicarray.cpp
	$(CXX) $? $(CXXFLAGS) $(LDFLAGS) -o $@

clean:
	rm -f helloworld square object dynamicobject dynamicarray
{'fraction_non_alphanumeric': 0.1983695652173913, 'fraction_numerical': 0.007608695652173913, 'mean_word_length': 4.215297450424929, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6227604', 'n_tokens_mistral': 778, 'n_tokens_neox': 694, 'n_words': 148}