<commit_before>CC=g++
AR=ar
ARFLAGS=rcu
LDFLAGS=-lpthread -lm
INCLUDES=-IcommonCode -Ijlmbignum -Ijlmcrypto
DEBUG_CFLAGS=-g -DDEBUG
RELEASE_CFLAGS=-O3 -Wno-unknown-pragmas
CFLAGS=-c $(INCLUDES) -Wall -Werror -Wno-format -DLINUX -DTEST -D__FLUSHIO__ $(DEBUG_CFLAGS)
OBJS=obj
TEST=test
LIB=lib
OBJROOT=~/jlmcrypt

BIGNUM_SOURCE=jlmbignum/mpBasicArith.cpp \
		jlmbignum/mpModArith.cpp \
		jlmbignum/mpNumTheory.cpp \
		jlmbignum/mpRand.cpp
BIGNUM_OBJ=$(BIGNUM_SOURCE:%.cpp=obj/%.o)

COMMON_SOURCE=commonCode/jlmUtility.cpp \
		commonCode/logging.cpp \
		commonCode/tinystr.cpp \
		commonCode/tinyxml.cpp \
		commonCode/tinyxmlerror.cpp \
		commonCode/tinyxmlparser.cpp
COMMON_OBJ=$(COMMON_SOURCE:%.cpp=obj/%.o)

CRYPTO_SOURCE=jlmcrypto/encryptedblockIO.cpp \
		jlmcrypto/fileHash.cpp \
		jlmcrypto/hmacsha256.cpp \
		jlmcrypto/jlmcrypto.cpp \
		jlmcrypto/keys.cpp \
		jlmcrypto/modesandpadding.cpp \
		jlmcrypto/rsaHelper.cpp \
		jlmcrypto/sha1.cpp \
		jlmcrypto/sha256.cpp \
		jlmcrypto/aes.cpp \
		jlmcrypto/aesni.cpp
CRYPTO_OBJ=$(CRYPTO_SOURCE:%.cpp=obj/%.o)

TESTS=tests/encryptedBlockIOTest
LIBS=$(LIB)/jlmbignum.a $(LIB)/commonCode.a $(LIB)/jlmcrypto.a 
LIB_SOURCES=$(COMMON_SOURCE) $(CRYPTO_SOURCE)

.PHONY: keyNegoServer tcService fileServer fileClient cryptUtility cryptotest aesspeed rsaspeedtest clean libs tests

all: keyNegoServer tcService fileServer fileClient cryptUtility cryptotest aesspeed rsaspeedtest

libs: $(LIB_SOURCES) $(LIBS)

tests: $(TESTS)

$(LIB)/jlmbignum.a: $(BIGNUM_OBJ)
	$(AR) $(ARFLAGS) $@ $(BIGNUM_OBJ)

$(LIB)/commonCode.a: $(COMMON_OBJ)
	$(AR) $(ARFLAGS) $@ $(COMMON_OBJ)

$(LIB)/jlmcrypto.a: $(CRYPTO_OBJ)
	$(AR) $(ARFLAGS) $@ $(CRYPTO_OBJ)

obj/%.o: %.cpp
	$(CC) $(CFLAGS) $< -o $@

tests/encryptedBlockIOTest: obj/Test/encryptedBlockIOTest.o $(LIB)/jlmcrypto.a $(LIB)/jlmbignum.a $(LIB)/commonCode.a
	$(CC) $^ -o $@ $(LDFLAGS)

tcService:
	$(MAKE) -C tcService -f tcService.mak

fileServer:
	$(MAKE) -C fileProxy -f fileServer.mak

fileClient:
	$(MAKE) -C fileProxy -f fileClient.mak

keyNegoServer:
	$(MAKE) -C keyNegoServer -f keyNegoServer.mak

cryptUtility:
	$(MAKE) -C cryptUtility -f cryptUtility.mak

cryptotest:
	$(MAKE) -C Test -f cryptotest.mak

aesspeed:
	$(MAKE) -C Test -f aesspeed.mak

rsaspeedtest:
	$(MAKE) -C Test -f rsaspeedtest.mak

clean:
	rm -f $(TESTS)
	rm -f $(CRYPTO_OBJ) $(COMMON_OBJ) $(BIGNUM_OBJ)
	rm -f $(LIBS)
	rm -f $(OBJROOT)/*objects/*
	rm -f $(OBJROOT)/*.o
	rm -f $(OBJROOT)/keyNegoServer.exe
	rm -f $(OBJROOT)/tcService.exe
	rm -f $(OBJROOT)/fileServer.exe
	rm -f $(OBJROOT)/fileClient.exe
	rm -f $(OBJROOT)/rsaspeedtest.exe
	rm -f $(OBJROOT)/cryptUtility.exe
	rm -f $(OBJROOT)/aesspeedtest.exe<commit_msg>Updated the makefile to use the old*.make files (except for oldcryptUtility.mak, which seems to be broken)<commit_after>OBJROOT=~/jlmcrypt

.PHONY: keyNegoServer tcService fileServer fileClient cryptUtility cryptotest aesspeed rsaspeedtest clean

all: keyNegoServer tcService fileServer fileClient cryptUtility cryptotest aesspeed rsaspeedtest

tcService:
	$(MAKE) -C tcService -f oldtcService.mak

fileServer:
	$(MAKE) -C fileProxy -f oldfileServer.mak

fileClient:
	$(MAKE) -C fileProxy -f oldfileClient.mak

keyNegoServer:
	$(MAKE) -C keyNegoServer -f oldkeyNegoServer.mak

cryptUtility:
	$(MAKE) -C cryptUtility -f cryptUtility.mak

cryptotest:
	$(MAKE) -C Test -f cryptotest.mak

aesspeed:
	$(MAKE) -C Test -f aesspeed.mak

rsaspeedtest:
	$(MAKE) -C Test -f rsaspeedtest.mak

clean:
	rm -f $(OBJROOT)/*objects/*
	rm -f $(OBJROOT)/*.o
	rm -f $(OBJROOT)/keyNegoServer.exe
	rm -f $(OBJROOT)/tcService.exe
	rm -f $(OBJROOT)/fileServer.exe
	rm -f $(OBJROOT)/fileClient.exe
	rm -f $(OBJROOT)/rsaspeedtest.exe
	rm -f $(OBJROOT)/cryptUtility.exe
	rm -f $(OBJROOT)/aesspeedtest.exe
{'fraction_non_alphanumeric': 0.1459387483355526, 'fraction_numerical': 0.0021304926764314247, 'mean_word_length': 4.605970149253731, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, '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': '4958137', 'n_tokens_mistral': 1668, 'n_tokens_neox': 1561, 'n_words': 306}