-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
62 lines (54 loc) · 1.51 KB
/
Makefile
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
50
51
52
53
54
55
56
57
58
59
60
61
export PATH := $(GOPATH)/bin:./scripts:$(PATH)
ifeq (run,$(firstword $(MAKECMDGOALS)))
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(RUN_ARGS):;@:)
endif
.PHONY: all
all: fmt install build
.PHONY: install
install:
@echo "Install dependencies"
@go get ./...
.PHONY: run
run:
ifeq (,$(wildcard OpenRansim))
@echo "To run OpenRansim first run 'make all'"
@for e in $(RUN_ARGS) ; do echo Running $$e module && ./OpenRansim $$e ; done
else
@echo "To run OpenRansim first run 'make all'"
endif
.PHONY: build
build:
@echo "Building OpenRansim"
go build -o OpenRansim
.PHONY: fmt
fmt:
@echo "Formatting all go code..."
go fmt `go list ./... | grep -v vendor`
.PHONY: clean
clean:
@echo "Cleaning build..."
@rm -rf OpenRansim
.PHONY: test
test:
@echo "------------------ Test ------------------"
@echo "######### Insider #########"
time ./OpenRansim inside-crypto
@echo "######### Locky #########"
time ./OpenRansim locky
@echo "######### Mover #########"
time ./OpenRansim mover
@echo "######### Replacer #########"
time ./OpenRansim replacer
@echo "######### strong-cryptor #########"
time ./OpenRansim strong-cryptor
@echo "######### strong-cryptor-fast #########"
time ./OpenRansim strong-cryptor-fast
@echo "######### strong-cryptor-net #########"
time ./OpenRansim strong-cryptor-net
@echo "######### thor #########"
time ./OpenRansim thor
@echo "######### weak-cryptor #########"
time ./OpenRansim weak-cryptor
@echo "######### streamer #########"
time ./OpenRansim streamer