-
Notifications
You must be signed in to change notification settings - Fork 49
/
makefile
87 lines (65 loc) · 2.16 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
79
80
81
82
83
84
85
86
87
#
# OUTPUT PATHS
#
PREFIX ?= /usr/local
QBIN_DIR ?= $(PREFIX)/bin
QCONFIG_DIR ?= /etc/quark
QLOG_DIR ?= /var/log/quark
#
# BUILD PATHS
#
QKERNEL_BUILD = build
QTARGET_RELEASE = target/release
QTARGET_DEBUG = target/debug
QKERNEL_DEBUG = $(QKERNEL_BUILD)/qkernel_d.bin
QKERNEL_RELEASE = $(QKERNEL_BUILD)/qkernel.bin
QUARK_DEBUG = $(QTARGET_DEBUG)/quark
QUARK_RELEASE = $(QTARGET_RELEASE)/quark
VDSO = vdso/vdso.so
ARCH := ${shell uname -m}
RUST_TOOLCHAIN = nightly-2023-12-11-$(ARCH)-unknown-linux-gnu
.PHONY: all release debug clean install qvisor_release qvisor_debug cuda_make cuda_all cleanall
all:: release debug
cuda_all:: cuda_release cuda_debug
release:: qvisor_release qkernel_release $(VDSO)
debug:: qvisor_debug qkernel_debug $(VDSO)
qvisor_release:
make -C ./qvisor TOOLCHAIN=$(RUST_TOOLCHAIN) release
qkernel_release:
make -C ./qkernel TOOLCHAIN=$(RUST_TOOLCHAIN) release
qvisor_debug:
make -C ./qvisor TOOLCHAIN=$(RUST_TOOLCHAIN) debug
qkernel_debug:
make -C ./qkernel TOOLCHAIN=$(RUST_TOOLCHAIN) debug
$(VDSO):
make -C ./vdso
clean:
rm -rf target build
make -C ./vdso clean
cleanall: clean
make -C ./qservice clean
make -C ./qserverless clean
make -C ./rdma_cli clean
make -C ./rdma_srv clean
docker:
sudo systemctl restart docker
cuda_release:: qvisor_cuda_release qkernel_release cuda_make
cuda_debug:: qvisor_cuda_debug qkernel_debug cuda_make
qvisor_cuda_release:
make -C ./qvisor TOOLCHAIN=$(RUST_TOOLCHAIN) cuda_release
qvisor_cuda_debug:
make -C ./qvisor TOOLCHAIN=$(RUST_TOOLCHAIN) cuda_debug
install:
-sudo cp -f $(QKERNEL_RELEASE) $(QBIN_DIR)/
-sudo cp -f $(QUARK_RELEASE) $(QBIN_DIR)/quark
-sudo cp -f $(QUARK_RELEASE) $(QBIN_DIR)/containerd-shim-quark-v1
-sudo cp -f $(QKERNEL_DEBUG) $(QBIN_DIR)/
-sudo cp -f $(QUARK_DEBUG) $(QBIN_DIR)/quark_d
-sudo cp -f $(QUARK_DEBUG) $(QBIN_DIR)/containerd-shim-quarkd-v1
sudo cp -f $(VDSO) $(QBIN_DIR)/vdso.so
sudo mkdir -p $(QCONFIG_DIR)
sudo cp -f config.json $(QCONFIG_DIR)
cuda_make:
make -C cudaproxy release
sudo cp -f $(QTARGET_RELEASE)/libcudaproxy.so $(QBIN_DIR)/libcudaproxy.so
sudo cp -f $(QTARGET_RELEASE)/libcudaproxy.so $(QROOT_DIR)/test