-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (26 loc) · 854 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (26 loc) · 854 Bytes
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
SELF := $(patsubst %/,%,$(dir $(abspath $(firstword $(MAKEFILE_LIST)))))
PACKAGE_NAME := tproxy
PACKAGE_LIB := lib$(PACKAGE_NAME)
PACKAGE_BIN := $(PACKAGE_NAME)
RUST_LOG := debug
RUST_BACKTRACE := full
export
.PHONY: all t test b build c config d debug p purge
all: build
t test: build
cd $(SELF)/ && cargo test --lib --bins --tests -- --nocapture --test-threads=1
t-% test-%: build
cd $(SELF)/ && cargo test $* -- --nocapture
b build:
cd $(SELF)/ && cargo build
c config: build
cd $(SELF)/ && sudo ./target/debug/$(PACKAGE_BIN) config
d debug: build
cd $(SELF)/ && sudo ./target/debug/$(PACKAGE_BIN) start
p purge:
rm -rf $(SELF)/target/
.PHONY: s static
s static:
cd $(SELF) && nix build
cd $(SELF) && install -m u=rwx,go=rx ./result/bin/tproxy ./tproxy
cd $(SELF) && nix develop --command strip --strip-unneeded ./tproxy