2020-03-11 03:32:08 +00:00
|
|
|
.PHONY: all clean test c t netsim-shell pat
|
2020-02-21 21:51:19 +00:00
|
|
|
|
2020-03-11 04:01:38 +00:00
|
|
|
all: release-build
|
2020-03-09 16:41:41 +00:00
|
|
|
|
|
|
|
debug-build:
|
2020-02-21 21:51:19 +00:00
|
|
|
cargo build
|
2020-03-14 00:28:33 +00:00
|
|
|
cp ./target/debug/hptp-recv ./3700recv
|
|
|
|
cp ./target/debug/hptp-send ./3700send
|
2020-02-21 21:51:19 +00:00
|
|
|
|
2020-03-09 16:41:41 +00:00
|
|
|
release-build:
|
|
|
|
cargo build --release
|
|
|
|
cp ./target/release/hptp-recv ./3700recv
|
|
|
|
cp ./target/release/hptp-send ./3700send
|
|
|
|
|
2020-02-21 21:51:19 +00:00
|
|
|
clean:
|
|
|
|
cargo clean
|
2020-03-09 16:41:41 +00:00
|
|
|
rm -f 3700send 3700recv
|
2020-02-21 21:51:19 +00:00
|
|
|
|
|
|
|
test:
|
|
|
|
cargo test
|
|
|
|
|
|
|
|
c: clean
|
|
|
|
|
|
|
|
t: test
|
|
|
|
|
2020-03-11 03:21:47 +00:00
|
|
|
.netsim:
|
|
|
|
mkdir $@
|
|
|
|
curl -Ss https://course.ccs.neu.edu/cs3700sp20/archive/tcp-sim.tgz | tar xzf - -C $@
|
|
|
|
sed -i '/.usr.bin.sudo/d' .netsim/netsim
|
2020-03-11 03:57:53 +00:00
|
|
|
cd .netsim; ln -s ../3700send .; ln -s ../3700recv .
|
2020-03-11 03:53:51 +00:00
|
|
|
cd /usr/include; h2ph -d $(HOME)/perl5/lib/perl5/ -a sys/syscall.h
|
2020-03-11 03:21:47 +00:00
|
|
|
|
|
|
|
netsim-shell: .netsim
|
2020-03-14 03:42:16 +00:00
|
|
|
cp scripts/grade .netsim/
|
2020-03-11 03:21:47 +00:00
|
|
|
./scripts/create-net-ns.sh
|
2020-03-11 03:32:08 +00:00
|
|
|
|
|
|
|
pat:
|
|
|
|
cat scripts/data.txt
|