forked from primihub/primihub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (46 loc) · 1.18 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
BUILD_FLAG ?=
TARGET := //:node \
//:cli \
//src/primihub/cli:reg_cli \
//src/primihub/pybind_warpper:linkcontext \
//src/primihub/pybind_warpper:opt_paillier_c2py \
//src/primihub/task/pybind_wrapper:ph_secure_lib \
//:task_main
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