-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (23 loc) · 742 Bytes
/
Makefile
File metadata and controls
32 lines (23 loc) · 742 Bytes
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
# Base path used to install.
CMD_DESTDIR ?= /usr/local
GO111MODULE_VALUE=auto
PREFIX ?= $(CURDIR)/out/
CMD_BINARIES=$(addprefix $(PREFIX),$(CMD))
CMD=ctr-erofs containerd-erofs-grpc
all: build
build: $(CMD)
FORCE:
ctr-erofs: FORCE
cd cmd/ ; GO111MODULE=$(GO111MODULE_VALUE) go build -o $(PREFIX)$@ $(GO_BUILD_FLAGS) $(GO_LD_FLAGS) -v ./ctr-erofs
containerd-erofs-grpc: FORCE
cd cmd/ ; GO111MODULE=$(GO111MODULE_VALUE) go build -o $(PREFIX)$@ $(GO_BUILD_FLAGS) $(GO_LD_FLAGS) -v ./containerd-erofs-grpc
install:
@echo "$@"
@mkdir -p $(CMD_DESTDIR)/bin
@install $(CMD_BINARIES) $(CMD_DESTDIR)/bin
uninstall:
@echo "$@"
@rm -f $(addprefix $(CMD_DESTDIR)/bin/,$(notdir $(CMD_BINARIES)))
clean:
@echo "$@"
@rm -f $(CMD_BINARIES)