<commit_before>
###-Platform dependent settings-###

OS_ARCH = amd64
PLATFORM = linux
JAVA_HOME = /usr/lib/jvm/java-7-openjdk-amd64

###-Customize the above if necessary-###

JAVA_INCLUDES := -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(PLATFORM)
JAVA_LDS := -L$(JAVA_HOME)/jre/lib/$(OS_ARCH)/server -ljvm

CC ?= gcc
CXX ?= g++

CFLAGS := -g -Wall -O0 $(JAVA_INCLUDES)
CXXFLAGS := -g -Wall -O0 $(JAVA_INCLUDES)
LDFLAGS := $(JAVA_LDS)

TARGETS := libtachyon.so tachyontest

OBJS := Tachyon.o Util.o JNIHelper.o
DEPS := $(OBJS:.o=.d)

all: $(TARGETS)

libtachyon.so: $(OBJS)
	$(CXX) -o $@ -shared -fPIC $(CXXFLAGS) $^

-include $(DEPS)

%.o :%.cc
	$(CXX) -MMD -c -fPIC $(CXXFLAGS) $< -o $@

tachyontest: TachyonTest.o libtachyon.so
	$(CXX) $(LDFLAGS) $^ -o $@

TachyonTest.o: TachyonTest.cc Tachyon.h
	$(CXX) $(CXXFLAGS) -c $<

clean:
	rm -f *.o *.d $(TARGETS)

.PHONY: all clean
<commit_msg>add platform support for OSX in makefile<commit_after>
###-BEGIN: platform dependent settings-###

ifeq ($(OS), Windows_NT)
  $(error Windows is not supported)
else
  UNAME := $(shell uname -s)
  ifeq ($(UNAME), Linux)
    PLATFORM = linux
  else ifeq ($(UNAME), Darwin)
    PLATFORM = darwin 
  else
    $(error OS version not supported)
  endif
  ifeq ($(shell uname -m), x86_64)
    ifeq ($(PLATFORM), linux)
      ## Typical Linux Java settings
      OS_ARCH = amd64
      JVM_ARCH = 64
      JAVA_HOME = /usr/lib/jvm/java-7-openjdk-amd64
    else
      ## Typical OS X Java settings
      OS_ARCH = 
      JVM_ARCH = 64
      JAVA_HOME = $(shell /usr/libexec/java_home)
    endif
  else
    ifeq ($(PLATFORM), linux)
      ## Typical Linux Java settings
      OS_ARCH = i386 
      JVM_ARCH = 32
      JAVA_HOME = /usr/lib/jvm/java-7-openjdk-i386
    else
      ## Typical OS X Java settings
      OS_ARCH = 
      JVM_ARCH = 32
      JAVA_HOME = $(shell /usr/libexec/java_home)
    endif
  endif
endif

###-END: platform dependent settings-###

JAVA_INCLUDES := -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(PLATFORM)
JAVA_LDS := -L$(JAVA_HOME)/jre/lib/$(OS_ARCH)/server -ljvm

CC ?= gcc
CXX ?= g++

CFLAGS := -g -Wall -O0 $(JAVA_INCLUDES) -m$(JVM_ARCH) 
CXXFLAGS := -g -Wall -O0 $(JAVA_INCLUDES) -m$(JVM_ARCH) 
LDFLAGS := $(JAVA_LDS)

TARGETS := libtachyon.so tachyontest

OBJS := Tachyon.o Util.o JNIHelper.o
DEPS := $(OBJS:.o=.d)

all: $(TARGETS)

libtachyon.so: $(OBJS)
	$(CXX) -o $@ -shared -fPIC $(CXXFLAGS) $(JAVA_LDS) $^

-include $(DEPS)

%.o :%.cc
	$(CXX) -MMD -c -fPIC $(CXXFLAGS) $< -o $@

tachyontest: TachyonTest.o libtachyon.so
	$(CXX) $(LDFLAGS) $^ -o $@

TachyonTest.o: TachyonTest.cc Tachyon.h
	$(CXX) $(CXXFLAGS) -c $<

clean:
	rm -f *.o *.d $(TARGETS)

.PHONY: all clean

{'fraction_non_alphanumeric': 0.17533432392273401, 'fraction_numerical': 0.01225854383358098, 'mean_word_length': 3.1558641975308643, 'pattern_counts': {'":': 0, '<': 7, '<?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': '27172', 'n_tokens_mistral': 1257, 'n_tokens_neox': 1123, 'n_words': 266}