<commit_before>CPP=g++
#CPP=clang++

 DEBUG = -g
V8_DIR = /home/xaxxon/v8
V8_INCLUDE_DIR = ${V8_DIR}
V8_TARGET = native

# OS X put libs in first location, linux puts in second two
V8_LIB_DIR = ${V8_DIR}/out/${V8_TARGET}/
V8_LIB_DIR2 = ${V8_LIB_DIR}/obj.target/tools/gyp/
V8_LIB_DIR3 = ${V8_LIB_DIR}/obj.target/third_party/icu/

#V8_LIB_DIR_FLAGS = -L${V8_LIB_DIR}
V8_LIB_DIR_FLAGS = -L${V8_LIB_DIR2} -L${V8_LIB_DIR3}

#V8_LIB_DIR = ${V8_DIR}/out/x64.release
#V8_LIB_DIR = ${V8_DIR}/out/x64.debug

LINUX_LIBS = -lpthread -licuuc -licudata -ldl

# Whether you want to use snapshot files, but easier not to use them.  I see a .05s decrease in startup speed by not using them
ifdef USE_SNAPSHOTS
DEFINES = -DUSE_SNAPSHOTS -DV8TOOLKIT_JAVASCRIPT_DEBUG 
V8_LIBS = -lv8_base -lv8_libbase -licudata -licuuc -licui18n -lv8_base -lv8_libplatform -lv8_external_snapshot
else
#DEFINES = -DV8TOOLKIT_JAVASCRIPT_DEBUG 
V8_LIBS = -lv8_base -lv8_libbase -lv8_base -lv8_libplatform -lv8_nosnapshot -licudata -licuuc -licui18n 
endif

CPPFLAGS = -I${V8_INCLUDE_DIR} ${DEBUG} -std=c++14 -I/usr/local/include ${DEFINES} -Wall -Werror

# LIBS = -L/usr/local/lib -L${V8_LIB_DIR}  libv8toolkit.a ${V8_LIBS} -lboost_system -lboost_filesystem
LIBS = -L/usr/local/lib ${V8_LIB_DIR_FLAGS}  libv8toolkit.a ${V8_LIBS} ${LINUX_LIBS}




all: warning thread_sample javascript sample toolbox_sample exception_sample

SRCS=v8toolkit.cpp javascript.cpp

OBJS=$(SRCS:.cpp=.o)


warning:
	$(info )<commit_msg>organized linux and OS X build parameters into a single, easy to control section<commit_after>
ifdef LINUX_BUILD
CPP=g++
V8_DIR = /home/xaxxon/v8

V8_LIB_DIR2 = ${V8_LIB_DIR}/obj.target/tools/gyp/
V8_LIB_DIR3 = ${V8_LIB_DIR}/obj.target/third_party/icu/
V8_LIB_DIR_FLAGS = -L${V8_LIB_DIR2} -L${V8_LIB_DIR3}

LINUX_LIBS = -lpthread -licuuc -licudata -ldl

else
V8_DIR = /Users/xaxxon/v8

CPP=clang++
V8_LIB_DIR = ${V8_DIR}/out/${V8_TARGET}/
V8_LIB_DIR_FLAGS = -L${V8_LIB_DIR}


endif



DEBUG = -g
V8_INCLUDE_DIR = ${V8_DIR}
V8_TARGET = native



#V8_LIB_DIR = ${V8_DIR}/out/x64.release
#V8_LIB_DIR = ${V8_DIR}/out/x64.debug


# Whether you want to use snapshot files, but easier not to use them.  I see a .05s decrease in startup speed by not using them
ifdef USE_SNAPSHOTS
DEFINES = -DUSE_SNAPSHOTS -DV8TOOLKIT_JAVASCRIPT_DEBUG 
V8_LIBS = -lv8_base -lv8_libbase -licudata -licuuc -licui18n -lv8_base -lv8_libplatform -lv8_external_snapshot
else
#DEFINES = -DV8TOOLKIT_JAVASCRIPT_DEBUG 
V8_LIBS = -lv8_base -lv8_libbase -lv8_base -lv8_libplatform -lv8_nosnapshot -licudata -licuuc -licui18n 
endif

CPPFLAGS = -I${V8_INCLUDE_DIR} ${DEBUG} -std=c++14 -I/usr/local/include ${DEFINES} -Wall -Werror

# LIBS = -L/usr/local/lib -L${V8_LIB_DIR}  libv8toolkit.a ${V8_LIBS} -lboost_system -lboost_filesystem
LIBS = -L/usr/local/lib ${V8_LIB_DIR_FLAGS}  libv8toolkit.a ${V8_LIBS} ${LINUX_LIBS}




all: warning thread_sample javascript sample toolbox_sample exception_sample

SRCS=v8toolkit.cpp javascript.cpp

OBJS=$(SRCS:.cpp=.o)


warning:
	$(info )
{'fraction_non_alphanumeric': 0.12168435013262599, 'fraction_numerical': 0.03978779840848806, 'mean_word_length': 4.835589941972921, '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': '991751', 'n_tokens_mistral': 1402, 'n_tokens_neox': 1331, 'n_words': 262}