-
Notifications
You must be signed in to change notification settings - Fork 169
/
Makefile
72 lines (58 loc) · 1.46 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
BUILD_FLAG ?=
TARGET := //:node \
//:cli \
//:task_main
ifneq ($(disable_py_task), y)
TARGET += //src/primihub/pybind_warpper:linkcontext \
//src/primihub/pybind_warpper:opt_paillier_c2py \
//src/primihub/task/pybind_wrapper:ph_secure_lib
BUILD_FLAG += --define enable_py_task=true
endif
ifneq ($(disable_mpc_task), y)
BUILD_FLAG += --define enable_mpc_task=true
endif
ifneq ($(disable_pir_task), y)
BUILD_FLAG += --define enable_pir_task=true
endif
ifneq ($(disable_psi_task), y)
BUILD_FLAG += --define enable_psi_task=true
endif
ifeq ($(mysql), y)
BUILD_FLAG += --define enable_mysql_driver=true
endif
ifeq ($(protos), y)
TARGET += //src/primihub/protos:worker_py_pb2_grpc \
//src/primihub/protos:service_py_pb2_grpc
endif
JOBS?=
ifneq ($(jobs), )
JOBS = $(jobs)
BUILD_FLAG += --jobs=$(JOBS)
endif
ifeq ($(tee), y)
BUILD_FLAG += --cxxopt=-DSGX
BUILD_FLAG += --define enable_sgx=true
endif
ifeq ($(debug), y)
BUILD_FLAG += --config=linux_asan
endif
release:
bazel build --config=PLATFORM_HARDWARE $(BUILD_FLAG) ${TARGET}
rm -f primihub-cli
ln -s -f bazel-bin/cli primihub-cli
rm -f primihub-node
ln -s -f bazel-bin/node primihub-node
#linux_x86_64:
# bazel build --config=linux_x86_64 ${TARGET}
#
#linux_aarch64:
# bazel build --config=linux_aarch64 ${TARGET}
#
#macos_arm64:
# bazel build --config=darwin_arm64 ${TARGET}
#
#macos_x86_64:
# bazel build --config=darwin_x86_64 ${TARGET}
.PHONY: clean
clean:
bazel clean