-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
78 lines (57 loc) · 2.06 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#
# Makefile - Builds the Docker images and host SDK for Lind
#
# AUTHOR: Nicholas Renner <[email protected]>
# AUTHOR: Joey Pabalinas <[email protected]>
# default target shows `select` menu
all lind:
@./src/mklind
.PHONY: Makefile all lind run shell list show
.PHONY: latest lind-full lind-base
.PHONY: stack deploy pull clean prune
# targets like `make nacl` and `make lind/nacl` run their respective `./ src/mklind -e nacl` command
%:
@$(MAKE) "lind/$(basename $(notdir $*))"
lind/%:
@./src/mklind $*
# run a clean, temporary containter with target tag
docker/%:
docker run --rm --label=lind --ipc=host --cap-add=SYS_PTRACE -it securesystemslab/lind:$*
# the `--ipc=host` flag is needed to mount /dev/shm with PROT_EXEC
run shell: | pull
docker create --name=lind --label=lind --ipc=host --cap-add=SYS_PTRACE -it securesystemslab/lind
docker start lind
docker exec -it lind
list show:
docker image list -f label=lind -a
@echo
docker container list -f label=lind -a
lamp: | lind-full
docker build --cache-from=securesystemslab/lind:latest -t securesystemslab/lind-lamp:latest ./src/docker/lind-lamp
latest: | lind-full
docker build --cache-from=securesystemslab/lind:$| -t securesystemslab/lind:$@ ./src/docker/$|
lind-full: | lind-glibc
docker build -t securesystemslab/lind:$@ ./src/docker/$@
lind-glibc: | lind-base
docker build -t securesystemslab/lind:$@ ./src/docker/$@
lind-base:
docker build -t securesystemslab/lind:$@ ./src/docker/$@
stack deploy:
docker stack deploy -c ./src/docker/docker-compose.yml lindstack
pull:
docker pull securesystemslab/lind
test:
cd tests/test_cases && bash suite.sh nondet.txt -d dettests.txt
test-verbose:
cd tests/test_cases && bash suite.sh nondet.txt -d dettests.txt -v
coreutils-test:
cd tests/test_cases/coreutils_suite && bash coreutils_suite.sh nondets.txt -d bashdets.txt
coreutils-test-verbose:
cd tests/test_cases/coreutils_suite && bash coreutils_suite.sh nondets.txt -d bashdets.txt -v
clean:
@$(MAKE) cleanall
prune:
docker stack rm lindstack
docker container prune
docker image prune
# vi:ft=make