<commit_before>
# mpicxx must be on your path; on googoo, this means that
# /usr/local/mpich2-1.0.2/bin must be on your path.

# For now, use g++ most of the time.
# When compiling MPI stuff, specify myfile.cc instead of myfile.o so that ${MPICC} is 
# invoked instead of the generic .o rule (or it'll use g++).
# This makes it less annoying to build on non-mpi hosts for dev work, and seems to 
# behave just fine...  change ${CC} back to mpicxx if you get paranoid.

CC = g++
CFLAGS = -g -Wall -I. -D_FILE_OFFSET_BITS=64 -DMPICH_IGNORE_CXX_SEEK -D_REENTRANT -D_THREAD_SAFE
LIBS = -lpthread 
CRYPTOLIBS = /usr/lib/libcrypto++5.2.so

#for normal mpich2 machines
MPICC = mpicxx
MPICFLAGS = ${CFLAGS}
MPILIBS = ${LIBS}

#for LLNL boxes without mpicxx
#MPICC = g++
#MPICFLAGS = ${CFLAGS} -I/usr/lib/mpi/include -L/usr/lib/mpi/mpi_gnu/lib
#MPILIBS = ${LIBS} -lelan -lmpi

EBOFS_OBJS= \
	ebofs/BlockDevice.o\
	ebofs/BufferCache.o\
	ebofs/Ebofs.o\
	ebofs/Allocator.o

MDS_OBJS= \
	mds/MDS.o\
	mds/journal.o\
	mds/Server.o\
	mds/MDCache.o\
	mds/Locker.o\
	mds/Migrator.o\
	mds/Renamer.o\
	mds/MDBalancer.o\
	mds/CDentry.o\
	mds/CDir.o\
	mds/CInode.o\
	mds/AnchorTable.o\
	mds/AnchorClient.o\
	mds/MDStore.o\
	mds/LogEvent.o\
	mds/IdAllocator.o\
	mds/MDLog.o

OSD_OBJS= \
	osd/PG.o\
	osd/Ager.o\
	osd/FakeStore.o\
	osd/OSD.o

OSDC_OBJS= \
	osdc/Objecter.o\
	osdc/ObjectCacher.o\
	osdc/Filer.o\
	osdc/Journaler.o

MON_OBJS= \
	mon/Monitor.o\
	mon/OSDMonitor.o\
	mon/MDSMonitor.o\
	mon/Elector.o

COMMON_OBJS= \
	msg/Messenger.o\
	msg/Message.o\
	msg/HostMonitor.o\
	common/Logger.o\
	common/Clock.o\
	common/Timer.o\
	config.o


CLIENT_OBJS= \
	client/FileCache.o\
	client/Client.o\
	client/SyntheticClient.o\
	client/Trace.o

TCP_OBJS = \
	msg/TCPMessenger.o\
	msg/TCPDirectory.o

CRYPTO_OBJS = \
	crypto/CryptoLib.o

TARGETS = cosd cfuse newsyn fakesyn

SRCS=*.cc */*.cc *.h */*.h */*/*.h

all: depend ${TARGETS}

test: depend ${TEST_TARGETS}

obfs: depend obfstest


# real bits
cmon: cmon.cc mon.o ebofs.o msg/NewerMessenger.o common.o
	${CC} ${CFLAGS} ${MPILIBS} $^ -o $@

cosd: cosd.cc osd.o ebofs.o msg/NewerMessenger.o common.o
	${CC} ${CFLAGS} ${MPILIBS} $^ -o $@

cmds: cmds.cc mds.o osdc.o msg/NewerMessenger.o common.o
	${CC} ${CFLAGS} ${MPILIBS} $^ -o $@

cfuse: cfuse.cc client.o osdc.o client/fuse.o msg/NewerMessenger.o common.o
	${CC} ${CFLAGS} ${LIBS} -lfuse $^ -o $@


# misc
gprof-helper.so: test/gprof-helper.c
	gcc -shared -fPIC test/gprof-helper.c -o gprof-helper.so -lpthread -ldl 



# fuse
fakefuse: fakefuse.cc mon.o mds.o client.o osd.o osdc.o ebofs.o client/fuse.o msg/FakeMessenger.cc common.o
	${CC} -pg ${CFLAGS} ${LIBS} -lfuse $^ -o $@

tcpfuse: tcpfuse.cc mds.o client.o client/fuse.o ${TCP_OBJS} common.o
	${MPICC} ${CFLAGS} ${LIBS} -lfuse $^ -o $@

mpifuse: mpifuse.cc mds.o client.o client/fuse.o ${TCP_OBJS} common.o
	${MPICC} ${CFLAGS} ${LIBS} -lfuse $^ -o $@


# synthetic workload
fakesyn: fakesyn.o mon.o mds.o client.o osd.o ebofs.o osdc.o msg/FakeMessenger.o common.o crypto.o
	${CC} -pg ${CFLAGS} ${LIBS} $^ -o $@

tcpsyn: tcpsyn.cc mon.o mds.o client.o osd.o ebofs.o osdc.o ${TCP_OBJS} common.o
	${MPICC} ${MPICFLAGS} ${MPILIBS} $^ -o $@

newsyn: newsyn.cc mon.o mds.o client.o osd.o ebofs.o osdc.o msg/NewerMessenger.o common.o
	${MPICC} -pg ${MPICFLAGS} ${MPILIBS} $^ -o $@

newsyn.nopg: newsyn.cc mon.o mds.o client.o osd.o ebofs.o osdc.o msg/NewerMessenger.o common.o
	${MPICC} ${MPICFLAGS} ${MPILIBS} $^ -o $@

# + obfs
fakesynobfs: fakesyn.cc mds.o client.o osd_obfs.o msg/FakeMessenger.o common.o
	${CC} -DUSE_OBFS ${CFLAGS} ${LIBS} ${CRYPTOLIBS} $^ -o $@

tcpsynobfs: tcpsyn.cc mds.o client.o osd_obfs.o ${TCP_OBJS} common.o
	${MPICC} -DUSE_OBFS ${MPICFLAGS} ${MPILIBS} $^ -o $@ <commit_msg>fixed a make bug<commit_after>
# mpicxx must be on your path; on googoo, this means that
# /usr/local/mpich2-1.0.2/bin must be on your path.

# For now, use g++ most of the time.
# When compiling MPI stuff, specify myfile.cc instead of myfile.o so that ${MPICC} is 
# invoked instead of the generic .o rule (or it'll use g++).
# This makes it less annoying to build on non-mpi hosts for dev work, and seems to 
# behave just fine...  change ${CC} back to mpicxx if you get paranoid.

CC = g++
CFLAGS = -g -Wall -I. -D_FILE_OFFSET_BITS=64 -DMPICH_IGNORE_CXX_SEEK -D_REENTRANT -D_THREAD_SAFE
LIBS = -lpthread 
CRYPTOLIBS = /usr/lib/libcrypto++5.2.so

#for normal mpich2 machines
MPICC = mpicxx
MPICFLAGS = ${CFLAGS}
MPILIBS = ${LIBS}

#for LLNL boxes without mpicxx
#MPICC = g++
#MPICFLAGS = ${CFLAGS} -I/usr/lib/mpi/include -L/usr/lib/mpi/mpi_gnu/lib
#MPILIBS = ${LIBS} -lelan -lmpi

EBOFS_OBJS= \
	ebofs/BlockDevice.o\
	ebofs/BufferCache.o\
	ebofs/Ebofs.o\
	ebofs/Allocator.o

MDS_OBJS= \
	mds/MDS.o\
	mds/journal.o\
	mds/Server.o\
	mds/MDCache.o\
	mds/Locker.o\
	mds/Migrator.o\
	mds/Renamer.o\
	mds/MDBalancer.o\
	mds/CDentry.o\
	mds/CDir.o\
	mds/CInode.o\
	mds/AnchorTable.o\
	mds/AnchorClient.o\
	mds/MDStore.o\
	mds/LogEvent.o\
	mds/IdAllocator.o\
	mds/MDLog.o

OSD_OBJS= \
	osd/PG.o\
	osd/Ager.o\
	osd/FakeStore.o\
	osd/OSD.o

OSDC_OBJS= \
	osdc/Objecter.o\
	osdc/ObjectCacher.o\
	osdc/Filer.o\
	osdc/Journaler.o

MON_OBJS= \
	mon/Monitor.o\
	mon/OSDMonitor.o\
	mon/MDSMonitor.o\
	mon/Elector.o

COMMON_OBJS= \
	msg/Messenger.o\
	msg/Message.o\
	msg/HostMonitor.o\
	common/Logger.o\
	common/Clock.o\
	common/Timer.o\
	config.o


CLIENT_OBJS= \
	client/FileCache.o\
	client/Client.o\
	client/SyntheticClient.o\
	client/Trace.o

TCP_OBJS = \
	msg/TCPMessenger.o\
	msg/TCPDirectory.o

CRYPTO_OBJS = \
	crypto/CryptoLib.o

TARGETS = cosd cfuse newsyn fakesyn

SRCS=*.cc */*.cc *.h */*.h */*/*.h

all: depend ${TARGETS}

test: depend ${TEST_TARGETS}

obfs: depend obfstest


# real bits
cmon: cmon.cc mon.o ebofs.o msg/NewerMessenger.o common.o
	${CC} ${CFLAGS} ${MPILIBS} $^ -o $@

cosd: cosd.cc osd.o ebofs.o msg/NewerMessenger.o common.o
	${CC} ${CFLAGS} ${MPILIBS} $^ -o $@

cmds: cmds.cc mds.o osdc.o msg/NewerMessenger.o common.o
	${CC} ${CFLAGS} ${MPILIBS} $^ -o $@

cfuse: cfuse.cc client.o osdc.o client/fuse.o msg/NewerMessenger.o common.o
	${CC} ${CFLAGS} ${LIBS} -lfuse $^ -o $@


# misc
gprof-helper.so: test/gprof-helper.c
	gcc -shared -fPIC test/gprof-helper.c -o gprof-helper.so -lpthread -ldl 



# fuse
fakefuse: fakefuse.cc mon.o mds.o client.o osd.o osdc.o ebofs.o client/fuse.o msg/FakeMessenger.cc common.o
	${CC} -pg ${CFLAGS} ${LIBS} -lfuse $^ -o $@

tcpfuse: tcpfuse.cc mds.o client.o client/fuse.o ${TCP_OBJS} common.o
	${MPICC} ${CFLAGS} ${LIBS} -lfuse $^ -o $@

mpifuse: mpifuse.cc mds.o client.o client/fuse.o ${TCP_OBJS} common.o
	${MPICC} ${CFLAGS} ${LIBS} -lfuse $^ -o $@


# synthetic workload
fakesyn: fakesyn.o mon.o mds.o client.o osd.o ebofs.o osdc.o msg/FakeMessenger.o common.o crypto.o
	${CC} -pg ${CFLAGS} ${LIBS} ${CRYPTOLIBS} $^ -o $@

tcpsyn: tcpsyn.cc mon.o mds.o client.o osd.o ebofs.o osdc.o ${TCP_OBJS} common.o
	${MPICC} ${MPICFLAGS} ${MPILIBS} $^ -o $@

newsyn: newsyn.cc mon.o mds.o client.o osd.o ebofs.o osdc.o msg/NewerMessenger.o common.o
	${MPICC} -pg ${MPICFLAGS} ${MPILIBS} $^ -o $@

newsyn.nopg: newsyn.cc mon.o mds.o client.o osd.o ebofs.o osdc.o msg/NewerMessenger.o common.o
	${MPICC} ${MPICFLAGS} ${MPILIBS} $^ -o $@

# + obfs
fakesynobfs: fakesyn.cc mds.o client.o osd_obfs.o msg/FakeMessenger.o common.o
	${CC} -DUSE_OBFS ${CFLAGS} ${LIBS} ${CRYPTOLIBS} $^ -o $@

tcpsynobfs: tcpsyn.cc mds.o client.o osd_obfs.o ${TCP_OBJS} common.o
	${MPICC} -DUSE_OBFS ${MPICFLAGS} ${MPILIBS} $^ -o $@ 
{'fraction_non_alphanumeric': 0.16811323274135398, 'fraction_numerical': 0.0024035251702496994, 'mean_word_length': 3.2726754135767258, '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': '4997427', 'n_tokens_mistral': 3671, 'n_tokens_neox': 3512, 'n_words': 756}