forked from hyperledger-archives/fabric-chaintool-original
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (28 loc) · 863 Bytes
/
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
NAME=chaintool
LEIN = $(shell which lein || echo ./lein)
BINDIR ?= /usr/local/bin
OUTPUT=target/$(NAME)
META=org.hyperledger.chaintool.meta
SRCS += $(shell find src -type f)
SRCS += $(shell find resources -type f)
PROTOS += $(shell find resources/proto -name "*.proto")
PROTOS += target/$(META).proto
all: $(OUTPUT)
$(OUTPUT): $(SRCS) Makefile project.clj
@$(LEIN) bin
$(PREFIX)$(BINDIR):
mkdir -p $@
# Bootstrap! We use chaintool to build a .proto for chaintool.
# If HEAD will not build, an older release of chaintool may be
# used to generate this file by hand
target/$(META).proto: resources/metadata/$(META).cci $(OUTPUT)
$(OUTPUT) proto -o $@ $<
proto: $(PROTOS)
protoc --java_out=./src $(PROTOS)
install: $(OUTPUT) $(PREFIX)$(BINDIR)
cp $(OUTPUT) $(PREFIX)$(BINDIR)
clean:
@echo "Cleaning up.."
@$(LEIN) clean
-@rm -rf target
-@rm -f *~