https://github.com/cilium/cilium
Raw File
Tip revision: 6298f7e366a4a720acfd21022ce277165d2125c7 authored by Ian Vernon on 11 July 2019, 20:05:31 UTC
Prepare for v1.4.6 release
Tip revision: 6298f7e
Makefile
# We keep track of the SHA over bindata.go plus the go version used to
# generate the bindata.go as it affects the generated code. A change
# of version is likely causing a SHA conflict as well.
include bpf.sha

# GOBUILD relies on the order of makefile list to get VERSION file
include ../Makefile.defs


TARGET=cilium-agent
LINKS=cilium-node-monitor cilium
SOURCES := $(shell find ../api ../common ../daemon ../pkg ../monitor . \( -name '*.go'  ! -name '*_test.go' \))
$(TARGET): $(SOURCES) check-bindata
	@$(ECHO_GO)
	$(QUIET)$(GO) build $(GOBUILD) -o $(TARGET)

GO_BINDATA := $(QUIET) go-bindata -prefix ../ -mode 0640 -modtime 1450269211 \
	-ignore Makefile -ignore bpf_features.h -ignore lxc_config.h \
	-ignore netdev_config.h -ignore node_config.h -ignore filter_config.h \
	-ignore '.+\.o$$' -ignore '.+\.orig$$' -ignore '.+~$$' \
	-ignore '\.DS_Store'

all: $(TARGET) links

links:
	$(foreach link,$(LINKS), ln -f -s $(TARGET) $(link);)

clean:
	@$(ECHO_CLEAN)
	$(QUIET)rm -f $(TARGET)
	$(QUIET)$(GO) clean
	$(foreach link,$(LINKS), rm -f $(link);)

ifeq ("$(PKG_BUILD)","")

install:
	groupadd -f cilium
	$(INSTALL) -m 0755 -d $(DESTDIR)$(BINDIR)
	$(INSTALL) -m 0755 $(TARGET) $(DESTDIR)$(BINDIR)
	$(foreach link,$(LINKS), ln -f -s $(TARGET) $(DESTDIR)$(BINDIR)/$(link);)

else

install:
	$(INSTALL) -m 0755 -d $(DESTDIR)$(BINDIR)
	$(INSTALL) -m 0755 $(TARGET) $(DESTDIR)$(BINDIR)
	$(foreach link,$(LINKS), ln -f -s $(TARGET) $(DESTDIR)$(BINDIR)/$(link);)

endif

.PHONY: check-bindata
check-bindata: bindata.go
	@$(ECHO_CHECK) contrib/scripts/bindata.sh
	$(QUIET) ../contrib/scripts/bindata.sh $(GO_BINDATA_SHA1SUM)

apply-bindata: go-bindata
	@$(ECHO_GEN)bpf.sha
	$(QUIET) ../contrib/scripts/bindata.sh apply

bindata.go go-bindata: $(BPF_FILES)
	@$(ECHO_GEN) $@
	$(GO_BINDATA) -o ./bindata.go $(BPF_FILES)
back to top