Makefile: make sure ALL_PROGRAMS doesn't include cln-grpc plugin.

$(ALL_PROGRAMS) are assumed to be C programs for now.

Add $(C_PLUGINS) as a new variable.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2022-04-10 20:08:15 +09:30
parent a3ec140c03
commit c598d4df74
1 changed files with 14 additions and 12 deletions

View File

@ -75,7 +75,7 @@ PLUGIN_ALL_HEADER := \
$(PLUGIN_SPENDER_HEADER)
PLUGIN_ALL_OBJS := $(PLUGIN_ALL_SRC:.c=.o)
PLUGINS := \
C_PLUGINS := \
plugins/autoclean \
plugins/bcli \
plugins/fetchinvoice \
@ -87,10 +87,22 @@ PLUGINS := \
plugins/txprepare \
plugins/spenderp
PLUGINS := $(C_PLUGINS)
ifneq ($(RUST),0)
# Builtin plugins must be in this plugins dir to work when we're executed
# *without* make install.
plugins/cln-grpc: target/${RUST_PROFILE}/cln-grpc
@cp $< $@
DEFAULT_TARGETS += $(CLN_PLUGIN_EXAMPLES) plugins/cln-grpc
PLUGINS += plugins/cln-grpc
endif
# Make sure these depend on everything.
ALL_C_SOURCES += $(PLUGIN_ALL_SRC)
ALL_C_HEADERS += $(PLUGIN_ALL_HEADER)
ALL_PROGRAMS += $(PLUGINS)
ALL_PROGRAMS += $(C_PLUGINS)
PLUGIN_COMMON_OBJS := \
bitcoin/base58.o \
@ -168,16 +180,6 @@ plugins/fetchinvoice: bitcoin/chainparams.o $(PLUGIN_FETCHINVOICE_OBJS) $(PLUGIN
plugins/funder: bitcoin/chainparams.o bitcoin/psbt.o common/psbt_open.o $(PLUGIN_FUNDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
ifneq ($(RUST),0)
# Builtin plugins must be in this plugins dir to work when we're executed
# *without* make install.
plugins/cln-grpc: target/${RUST_PROFILE}/cln-grpc
@cp $< $@
DEFAULT_TARGETS += $(CLN_PLUGIN_EXAMPLES) plugins/cln-grpc
PLUGINS += plugins/cln-grpc
endif
# Generated from PLUGINS definition in plugins/Makefile
ALL_C_HEADERS += plugins/list_of_builtin_plugins_gen.h
plugins/list_of_builtin_plugins_gen.h: plugins/Makefile Makefile