-
Notifications
You must be signed in to change notification settings - Fork 35
/
Makefile
35 lines (27 loc) · 930 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
###############################################################################
### Build ###
###############################################################################
# Default target
all: install
# Build directory
BUILDDIR := ./build
# Build the project
build: go.sum $(BUILDDIR)/
@echo "Warning: Building without version information"
@echo "Warning: To build with version info and defaults please use './ignite chain build'"
go build -tags=ledger -mod=readonly -o $(BUILDDIR)/ ./...
# Create the build directory
$(BUILDDIR)/:
mkdir -p $(BUILDDIR)/
# Install binary to ~/go/bin/
install: build
cp $(BUILDDIR)/cardchaind ~/go/bin/
# Verify dependencies
go.sum: go.mod
@echo "Ensure dependencies have not been modified ..." >&2
@go mod verify
# Clean build directory
clean:
rm -rf $(BUILDDIR)/
# Phony targets
.PHONY: all build install clean