forked from hyperledger/fabric-private-chaincode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (43 loc) · 1.73 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
# Copyright 2019 Intel Corporation
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
TOP = .
include $(TOP)/build.mk
SUB_DIRS = protos common internal ercc ecc_enclave ecc fabric client_sdk samples utils integration # docs
FPC_SDK_DEP_DIRS = protos common utils/fabric ecc_enclave ecc
FPC_PEER_DEP_DIRS = protos common ercc fabric ecc_enclave ecc
# FPC_PEER_DEP_DIRS has to include protos, ecc, ecc_enclave, common and ercc only if we run chaincode in external builder directly on host and not indirectly via docker
FPC_PEER_CLI_WRAPPER_DEP_DIRS = utils/fabric
.PHONY: license
build: godeps
build test clean clobber:
$(foreach DIR, $(SUB_DIRS), $(MAKE) -C $(DIR) $@ || exit;)
checks: linter license
license:
@echo "License: Running licence checks.."
@scripts/check_license.sh
linter: gotools
@echo "LINT: Running code checks for Go files..."
@./scripts/golinter.sh ${FPC_PATH}
@echo "LINT: Running code checks for Cpp/header files..."
@./scripts/cpplinter.sh ${FPC_PATH}
@echo "LINT completed."
gotools:
# install go tools if not present
# (for faster docker-build, also replicte these commands
# in 'utils/docker/base-dev/Dockerfile')
$(GO) install golang.org/x/tools/cmd/goimports
$(GO) install google.golang.org/protobuf/cmd/protoc-gen-go
$(GO) install honnef.co/go/tools/cmd/[email protected]
$(GO) install github.com/client9/misspell/cmd/misspell
godeps: gotools
$(GO) mod download
fpc-sdk: godeps
$(foreach DIR, $(FPC_SDK_DEP_DIRS), $(MAKE) -C $(DIR) build || exit;)
fpc-peer: godeps
$(foreach DIR, $(FPC_PEER_DEP_DIRS), $(MAKE) -C $(DIR) build || exit;)
fpc-peer-cli: godeps
$(foreach DIR, $(FPC_PEER_CLI_WRAPPER_DEP_DIRS), $(MAKE) -C $(DIR) build || exit;)
docker:
$(MAKE) -C utils/docker