<commit_before>COPTFLAGS?=	-O2
CFLAGS?=	-Wall -g -std=c99 $(COPTFLAGS)
CXXFLAGS?=	-Wall -std=c++11 -I../chacha-opt/app/include \
		-I../poly1305-opt/app/include -g $(COPTFLAGS)
CC?=	cc
CXX?=	c++
AR?=	ar
ARFLAGS?=	rcs
LIBS?=	-lcrypto
LDFLAGS?=	-L../poly1305-opt/bin/ -L../chacha-opt/bin/ -pthread
INSTALL?=	/usr/bin/install
PREFIX?=	/usr/local

DEPS=	aead.h \
	common.h \
	util.h \
	nonce.h \
	encrypt.h \
	decrypt.h \
	thread_pool.h
	
OBJS=	aead.o \
	util.o \
	main.o \
	nonce.o \
	kdf.o \
	encrypt.o \
	decrypt.o 
	
all: hpenc

hpenc: $(OBJS)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJS) \
		../chacha-opt/bin/chacha.lib ../poly1305-opt/bin/poly1305.lib \
		-o hpenc $(LIBS)

aead.o: aead.cc $(DEPS)
	$(CXX) $(CXXFLAGS) -c aead.cc -o aead.o

util.o: util.cc $(DEPS)
	$(CXX) $(CXXFLAGS) -c util.cc -o util.o

main.o: main.cc $(DEPS)
	$(CXX) $(CXXFLAGS) -c main.cc -o main.o

nonce.o: nonce.cc $(DEPS)
	$(CXX) $(CXXFLAGS) -c nonce.cc -o nonce.o

kdf.o: kdf.cc $(DEPS)
	$(CXX) $(CXXFLAGS) -c kdf.cc -o kdf.o

encrypt.o: encrypt.cc $(DEPS)
	$(CXX) $(CXXFLAGS) -c encrypt.cc -o encrypt.o

decrypt.o: decrypt.cc $(DEPS)
	$(CXX) $(CXXFLAGS) -c decrypt.cc -o decrypt.o

clean:
	rm $(OBJS) hpenc || true

install: hpenc
	$(INSTALL) -m 0755 hpenc $(DESTDIR)$(PREFIX)/bin/hpenc

.PHONY: clean install<commit_msg>Honor make flags from environment.<commit_after>COPTFLAGS?=	-O2
CFLAGS+=	-Wall -g -std=c99 $(COPTFLAGS)
CXXFLAGS+=	-Wall -std=c++11 -I../chacha-opt/app/include \
		-I../poly1305-opt/app/include -g $(COPTFLAGS)
CC?=	cc
CXX?=	c++
AR?=	ar
ARFLAGS?=	rcs
LIBS+=	-lcrypto
LDFLAGS+=	-L../poly1305-opt/bin/ -L../chacha-opt/bin/ -pthread
INSTALL?=	/usr/bin/install
PREFIX?=	/usr/local

DEPS=	aead.h \
	common.h \
	util.h \
	nonce.h \
	encrypt.h \
	decrypt.h \
	thread_pool.h
	
OBJS=	aead.o \
	util.o \
	main.o \
	nonce.o \
	kdf.o \
	encrypt.o \
	decrypt.o 
	
all: hpenc

hpenc: $(OBJS)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJS) \
		../chacha-opt/bin/chacha.lib ../poly1305-opt/bin/poly1305.lib \
		-o hpenc $(LIBS)

aead.o: aead.cc $(DEPS)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c aead.cc -o aead.o

util.o: util.cc $(DEPS)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c util.cc -o util.o

main.o: main.cc $(DEPS)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c main.cc -o main.o

nonce.o: nonce.cc $(DEPS)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c nonce.cc -o nonce.o

kdf.o: kdf.cc $(DEPS)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c kdf.cc -o kdf.o

encrypt.o: encrypt.cc $(DEPS)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c encrypt.cc -o encrypt.o

decrypt.o: decrypt.cc $(DEPS)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c decrypt.cc -o decrypt.o

clean:
	rm $(OBJS) hpenc || true

install: hpenc
	$(INSTALL) -m 0755 hpenc $(DESTDIR)$(PREFIX)/bin/hpenc

.PHONY: clean install
{'fraction_non_alphanumeric': 0.21431219873934002, 'fraction_numerical': 0.01853911753800519, 'mean_word_length': 2.997037037037037, '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': '1143168', 'n_tokens_mistral': 1409, 'n_tokens_neox': 1313, 'n_words': 288}