-
Notifications
You must be signed in to change notification settings - Fork 0
/
ltomake
49 lines (41 loc) · 1.37 KB
/
ltomake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -e
COMPONENT=$1
if [ $COMPONENT == client ]
then
SESSION_CREDITS=128
###
# Uncomment the below line when running Figure 5, the recovery experiment!
# This needs to be set lower for the client because proxies, only for the
# recovery experiment, make another connection to the client,
# so SESSION_CREDITS needs to be lower or the proxies run out of eRPC Ring buffers.
#
# If you already built the client you will need to cd client; make clean; make; cd ..
#
# For recovery the PLOT_RECOVERY flag should be set to 1 in common.h
###
# SESSION_CREDITS=64
elif [ $COMPONENT == proxy ]
then
SESSION_CREDITS=16
elif [ $COMPONENT == sequencer ]
then
SESSION_CREDITS=8
fi
SRC_DIR=`pwd`
COMMON_DIR=`cd ../; pwd`
LOGGER_DIR=$COMMON_DIR
echo COMMON_DIR $COMMON_DIR LOGGER_DIR $LOGGER_DIR
ERPC_DIR=`cd ../; pwd`/eRPC
APPS_DIR=$ERPC_DIR/apps/$COMPONENT
[ ! -d $APPS_DIR ] && mkdir $APPS_DIR
cp ./*.cc $APPS_DIR
cp ./*.h $APPS_DIR
cp ../common.h $APPS_DIR
cp ../logger.h $APPS_DIR
cp ../bitmap.h $APPS_DIR # not needed for client
cd $ERPC_DIR
echo $COMPONENT > scripts/autorun_app_file
cmake . -DPERF=ON -DTRANSPORT=dpdk -DCOMMON_DIR=$COMMON_DIR -DLOGGER_DIR=$LOGGER_DIR -DLOG_LEVEL="warn" -DSESSION_CREDITS=$SESSION_CREDITS #-DLOG_LEVEL="warn"
make -j -I /usr/include/boost/ -lboost_serialization
cp build/$COMPONENT $SRC_DIR