<commit_before>

JSC = java -jar utils/compiler.jar \
		   --warning_level VERBOSE \
		   --compilation_level ADVANCED_OPTIMIZATIONS \
		   --formatting PRETTY_PRINT --debug

EXTERNS = node-externs.js pg-externs.js

CC = clang 

CFLAGS = -g3 -fno-inline -O3 -Wall -fPIC
LINK_FLAGS = -shared

LIBS = pq v8

BUILD_DIR = bin
INCLUDE_DIRS = /usr/local/include/node \
			   /usr/include/node \
			   /usr/include/postgresql 

VPATH = src


all : cpp js

#
#	C++
#

cpp : pg.node

pg.node : pg.o \
		  errors.o \
		  exec_task.o \
		  connect_task.o 
	$(CC) $(LINK_FLAGS) -o $(BUILD_DIR)/$@ \
	   	  $(addprefix $(BUILD_DIR)/, $^) \
	   	  $(addprefix -l, $(LIBS)) 

%.o : %.cc
	$(CC) $(CFLAGS) $(addprefix -I, $(INCLUDE_DIRS)) -o $(BUILD_DIR)/$@  -c $<


#
#	JavaScript
#

js : index.js
	cat lib/requires.js > /tmp/out && \
	cat $(addprefix $(BUILD_DIR)/, $^) >> /tmp/out && \
	mv /tmp/out $(addprefix $(BUILD_DIR)/, $^)

index.js : lib/pg/pg.js \
		   lib/pg/connection.js \
		   lib/index.js
	$(JSC) $(addprefix --js , $^) \
		   $(addprefix --externs lib/, $(EXTERNS)) \
		   $(addprefix --js_output_file $(BUILD_DIR)/, $@)



#
#	Misc
#


clean :
	rm -rf $(BUILD_DIR)/*.o $(BUILD_DIR)/*.node
	<commit_msg>makefile<commit_after>

JSC = java -jar utils/compiler.jar \
		   --warning_level VERBOSE \
		   --compilation_level ADVANCED_OPTIMIZATIONS \
		   --formatting PRETTY_PRINT --debug

EXTERNS = node-externs.js pg-externs.js

CC = clang 

CFLAGS = -g3 -fno-inline -O3 -Wall -fPIC
LINK_FLAGS = -shared

LIBS = pq v8

BUILD_DIR = bin
INCLUDE_DIRS = /usr/local/include/node \
			   /usr/include/node \
			   /usr/include/postgresql 

VPATH = src


#
#	Global
#


all : cpp js


clean :
	rm -rf $(BUILD_DIR)/*


#
#	C++
#


cpp : pg.node


pg.node : pg.o \
		  errors.o \
		  exec_task.o \
		  connect_task.o 
	$(CC) $(LINK_FLAGS) -o $(BUILD_DIR)/$@ \
	   	  $(addprefix $(BUILD_DIR)/, $^) \
	   	  $(addprefix -l, $(LIBS)) 


%.o : %.cc
	$(CC) $(CFLAGS) $(addprefix -I, $(INCLUDE_DIRS)) -o $(BUILD_DIR)/$@  -c $<


#
#	JavaScript
#


js : index.js
	cat lib/requires.js > /tmp/out && \
	cat $(addprefix $(BUILD_DIR)/, $^) >> /tmp/out && \
	mv /tmp/out $(addprefix $(BUILD_DIR)/, $^)


index.js : lib/pg/pg.js \
		   lib/pg/connection.js \
		   lib/index.js
	$(JSC) $(addprefix --js , $^) \
		   $(addprefix --externs lib/, $(EXTERNS)) \
		   $(addprefix --js_output_file $(BUILD_DIR)/, $@)


	
{'fraction_non_alphanumeric': 0.19288702928870294, 'fraction_numerical': 0.002510460251046025, 'mean_word_length': 2.33008356545961, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '1927184', 'n_tokens_mistral': 1116, 'n_tokens_neox': 998, 'n_words': 199}