CS3700-project3/Makefile

39 lines
754 B
Makefile

.PHONY: all clean test c t netsim-shell pat
all: release-build
debug-build:
cargo build
cp ./target/debug/hptp-recv ./3700recv
cp ./target/debug/hptp-send ./3700send
release-build:
cargo build --release
cp ./target/release/hptp-recv ./3700recv
cp ./target/release/hptp-send ./3700send
clean:
cargo clean
rm -f 3700send 3700recv
test:
cargo test
c: clean
t: test
.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
cd .netsim; ln -s ../3700send .; ln -s ../3700recv .
cd /usr/include; h2ph -d $(HOME)/perl5/lib/perl5/ -a sys/syscall.h
netsim-shell: .netsim
cp scripts/grade .netsim/
./scripts/create-net-ns.sh
pat:
cat scripts/data.txt