-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
46 lines (39 loc) · 1019 Bytes
/
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
retro=retro-httpaf-bench
IMAGES = cohttp-eio \
httpaf-eio \
httpaf-effects \
cohttp-lwt-unix \
httpaf-lwt \
http-async \
nethttp-go \
rust-hyper \
BUILD=./build
# nc is --no-cache option sent to docker build
# use is like make nc=--no-cache-build cohttp-eio
#
run: build
mkdir -p output
docker create --name $(retro)-tmp $(retro)
docker cp ./run_benchmarks.sh $(retro)-tmp:/
docker cp ./build/. $(retro)-tmp:/build/
docker commit $(retro)-tmp $(retro)
docker rm $(retro)-tmp
docker run --rm -it --privileged -v $(PWD)/output:/output $(retro)
main: build-dir
docker build $(nc) -t $(retro) .
build: cohttp-eio \
httpaf-eio \
httpaf-effects \
cohttp-lwt-unix \
httpaf-lwt \
http-async \
nethttp-go \
rust-hyper
docker build $(nc) -t $(retro) .
build-dir:
mkdir -p build
$(IMAGES): build-dir
cd $@; docker build $(nc) -t $@ .
cd $@; docker create -ti --name $@-c $@:latest
cd $@; docker cp $@-c:/src/[email protected] ../build/$(subst -,_,$@).exe
cd $@; docker rm $@-c