mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 02:47:48 +08:00
This preloads the peerlog plugin in the ipfs binary, but keeps it disabled by default. To enabled it, set Enabled=true in its config. The motivation is to simplify building and deploying gateways, and for them to use binaries that are more similar to release bins.
25 lines
759 B
Makefile
25 lines
759 B
Makefile
include mk/header.mk
|
|
|
|
$(d)_plugins:=$(d)/git $(d)/badgerds $(d)/flatfs $(d)/levelds $(d)/peerlog
|
|
$(d)_plugins_so:=$(addsuffix .so,$($(d)_plugins))
|
|
$(d)_plugins_main:=$(addsuffix /main/main.go,$($(d)_plugins))
|
|
|
|
|
|
$($(d)_plugins_main): d:=$(d)
|
|
$($(d)_plugins_main):
|
|
$(d)/gen_main.sh "$(dir $@).." "$(call go-pkg-name,$(dir $@)/..)"
|
|
$(GOCC) fmt $@ >/dev/null
|
|
|
|
$($(d)_plugins_so): %.so : %/main/main.go
|
|
$($(d)_plugins_so): $$(DEPS_GO) ALWAYS
|
|
$(GOCC) build -buildmode=plugin -pkgdir "$(GOPATH)/pkg/linux_amd64_dynlink" $(go-flags-with-tags) -o "$@" "$(call go-pkg-name,$(basename $@))/main"
|
|
chmod +x "$@"
|
|
|
|
CLEAN += $($(d)_plugins_so)
|
|
CLEAN += $(foreach main_dir,$($(d)_plugins_main),$(dir $(main_dir)))
|
|
|
|
build_plugins: $($(d)_plugins_so)
|
|
|
|
|
|
include mk/footer.mk
|