forked from hyperledger/fabric-private-chaincode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (36 loc) · 1.24 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
# Copyright 2019 Intel Corporation
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#GOFLAGS :=
#GO := go $(GOFLAGS)
TOP = ..
include $(TOP)/build.mk
FABRIC_FPC_PLUGINS = $(FABRIC_PATH)/fpc_plugins
ECC_VSCC_SRC = ecc-vscc/ecc_validation_plugin.go ecc-vscc/ecc_validation_logic.go
ECC_VSCC_OUT = ecc-vscc.so
ERCC_VSCC_SRC = ercc-vscc/ercc_validation_plugin.go ercc-vscc/ercc_validation_logic.go
ERCC_VSCC_OUT = ercc-vscc.so
ERCC_DECO_SRC = ercc-decorator/decoration.go
ERCC_DECO_OUT = ercc-decorator.so
$(FABRIC_FPC_PLUGINS):
ln -sfn $$(/bin/pwd) $(FABRIC_FPC_PLUGINS)
build: $(FABRIC_FPC_PLUGINS)
cd $(FABRIC_FPC_PLUGINS) && \
$(MAKE) build-from-fabric;
.PHONY: build-from-fabric
build-from-fabric: godeps ecc-vscc ercc-vscc ercc-decorator
godeps:
$(GO) get github.com/hyperledger/fabric-chaincode-go/shim
$(GO) get github.com/hyperledger/fabric-chaincode-go/shimtest
.PHONY: ecc-vscc
ecc-vscc: $(ECC_VSCC_SRC)
$(GO) build -o $(ECC_VSCC_OUT) -buildmode=plugin $^
.PHONY: ercc-vscc
ercc-vscc: $(ERCC_VSCC_SRC)
$(GO) build -o $(ERCC_VSCC_OUT) -buildmode=plugin $^
.PHONY: ercc-decorator
ercc-decorator: $(ERCC_DECO_SRC)
$(GO) build -o $(ERCC_DECO_OUT) -buildmode=plugin $^
clean:
rm -rf *.so $(FABRIC_FPC_PLUGINS)