Move unix specific logic into _unix.go
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
18
Makefile
18
Makefile
@@ -15,8 +15,12 @@
|
||||
GO := go
|
||||
GOOS := $(shell $(GO) env GOOS)
|
||||
GOARCH := $(shell $(GO) env GOARCH)
|
||||
WHALE = "🇩"
|
||||
ONI = "👹"
|
||||
WHALE := "🇩"
|
||||
ONI := "👹"
|
||||
ifeq ($(GOOS),windows)
|
||||
WHALE = "+"
|
||||
ONI = "-"
|
||||
endif
|
||||
EPOCH_TEST_COMMIT := f9e02affccd51702191e5312665a16045ffef8ab
|
||||
PROJECT := github.com/containerd/cri
|
||||
BINDIR := ${DESTDIR}/usr/local/bin
|
||||
@@ -26,13 +30,19 @@ BUILD_DIR := _output
|
||||
VERSION := $(shell git rev-parse --short HEAD)
|
||||
TARBALL_PREFIX := cri-containerd
|
||||
TARBALL := $(TARBALL_PREFIX)-$(VERSION).$(GOOS)-$(GOARCH).tar.gz
|
||||
BUILD_TAGS := seccomp apparmor
|
||||
ifneq ($(GOOS),windows)
|
||||
BUILD_TAGS := seccomp apparmor
|
||||
endif
|
||||
# Add `-TEST` suffix to indicate that all binaries built from this repo are for test.
|
||||
GO_LDFLAGS := -X $(PROJECT)/vendor/github.com/containerd/containerd/version.Version=$(VERSION)-TEST
|
||||
SOURCES := $(shell find cmd/ pkg/ vendor/ -name '*.go')
|
||||
PLUGIN_SOURCES := $(shell ls *.go)
|
||||
INTEGRATION_SOURCES := $(shell find integration/ -name '*.go')
|
||||
|
||||
ifeq ($(GOOS),windows)
|
||||
BIN_EXT := .exe
|
||||
endif
|
||||
|
||||
all: binaries
|
||||
|
||||
help: ## this help
|
||||
@@ -74,7 +84,7 @@ update-vendor: sync-vendor sort-vendor ## Syncs containerd/vendor.conf -> vendor
|
||||
|
||||
$(BUILD_DIR)/containerd: $(SOURCES) $(PLUGIN_SOURCES)
|
||||
@echo "$(WHALE) $@"
|
||||
$(GO) build -o $@ \
|
||||
$(GO) build -o $@$(BIN_EXT) \
|
||||
-tags '$(BUILD_TAGS)' \
|
||||
-ldflags '$(GO_LDFLAGS)' \
|
||||
-gcflags '$(GO_GCFLAGS)' \
|
||||
|
||||
Reference in New Issue
Block a user