2022-10-17 11:07:05 +10:30
|
|
|
PLUGIN_PAY_SRC := plugins/pay.c
|
2023-04-11 06:57:45 +09:30
|
|
|
PLUGIN_PAY_HEADER :=
|
2019-01-15 14:44:27 +10:30
|
|
|
PLUGIN_PAY_OBJS := $(PLUGIN_PAY_SRC:.c=.o)
|
|
|
|
|
|
2019-05-21 17:02:39 +09:30
|
|
|
PLUGIN_AUTOCLEAN_SRC := plugins/autoclean.c
|
|
|
|
|
PLUGIN_AUTOCLEAN_OBJS := $(PLUGIN_AUTOCLEAN_SRC:.c=.o)
|
|
|
|
|
|
2022-06-24 06:59:36 +05:30
|
|
|
PLUGIN_chanbackup_SRC := plugins/chanbackup.c
|
|
|
|
|
PLUGIN_chanbackup_OBJS := $(PLUGIN_chanbackup_SRC:.c=.o)
|
|
|
|
|
|
2021-06-15 06:37:38 +09:30
|
|
|
PLUGIN_TOPOLOGY_SRC := plugins/topology.c
|
|
|
|
|
PLUGIN_TOPOLOGY_OBJS := $(PLUGIN_TOPOLOGY_SRC:.c=.o)
|
|
|
|
|
|
2020-08-28 12:01:57 +09:30
|
|
|
PLUGIN_TXPREPARE_SRC := plugins/txprepare.c
|
|
|
|
|
PLUGIN_TXPREPARE_OBJS := $(PLUGIN_TXPREPARE_SRC:.c=.o)
|
|
|
|
|
|
2020-01-02 21:04:03 +01:00
|
|
|
PLUGIN_BCLI_SRC := plugins/bcli.c
|
|
|
|
|
PLUGIN_BCLI_OBJS := $(PLUGIN_BCLI_SRC:.c=.o)
|
|
|
|
|
|
2022-07-16 22:48:21 +09:30
|
|
|
PLUGIN_COMMANDO_SRC := plugins/commando.c
|
|
|
|
|
PLUGIN_COMMANDO_OBJS := $(PLUGIN_COMMANDO_SRC:.c=.o)
|
|
|
|
|
|
2020-03-27 14:31:00 +01:00
|
|
|
PLUGIN_KEYSEND_SRC := plugins/keysend.c
|
|
|
|
|
PLUGIN_KEYSEND_OBJS := $(PLUGIN_KEYSEND_SRC:.c=.o)
|
|
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
PLUGIN_LIB_SRC := plugins/libplugin.c
|
|
|
|
|
PLUGIN_LIB_HEADER := plugins/libplugin.h
|
2019-01-15 14:43:27 +10:30
|
|
|
PLUGIN_LIB_OBJS := $(PLUGIN_LIB_SRC:.c=.o)
|
|
|
|
|
|
2024-08-02 18:28:45 +02:00
|
|
|
PLUGIN_PAY_LIB_SRC := \
|
|
|
|
|
plugins/channel_hint.c \
|
|
|
|
|
plugins/libplugin-pay.c
|
|
|
|
|
|
|
|
|
|
PLUGIN_PAY_LIB_HEADER := \
|
|
|
|
|
plugins/channel_hint.h \
|
|
|
|
|
plugins/libplugin-pay.h
|
|
|
|
|
|
2020-08-05 22:01:20 +08:00
|
|
|
PLUGIN_PAY_LIB_OBJS := $(PLUGIN_PAY_LIB_SRC:.c=.o)
|
|
|
|
|
|
2024-07-17 12:53:00 +09:30
|
|
|
PLUGIN_OFFERS_SRC := plugins/offers.c plugins/offers_offer.c plugins/offers_invreq_hook.c plugins/offers_inv_hook.c plugins/establish_onion_path.c plugins/fetchinvoice.c
|
2020-12-16 13:43:23 +10:30
|
|
|
PLUGIN_OFFERS_OBJS := $(PLUGIN_OFFERS_SRC:.c=.o)
|
2021-01-08 05:05:47 +10:30
|
|
|
PLUGIN_OFFERS_HEADER := $(PLUGIN_OFFERS_SRC:.c=.h)
|
2020-12-16 13:43:23 +10:30
|
|
|
|
2023-01-30 16:54:17 +10:30
|
|
|
PLUGIN_SQL_SRC := plugins/sql.c
|
2023-04-11 06:57:45 +09:30
|
|
|
PLUGIN_SQL_HEADER :=
|
2023-01-30 16:54:17 +10:30
|
|
|
PLUGIN_SQL_OBJS := $(PLUGIN_SQL_SRC:.c=.o)
|
|
|
|
|
|
2024-09-06 15:07:57 +09:30
|
|
|
PLUGIN_EXPOSESECRET_SRC := plugins/exposesecret.c
|
|
|
|
|
PLUGIN_EXPOSESECRET_HEADER :=
|
|
|
|
|
PLUGIN_EXPOSESECRET_OBJS := $(PLUGIN_EXPOSESECRET_SRC:.c=.o)
|
|
|
|
|
|
2020-09-09 19:55:20 +09:30
|
|
|
PLUGIN_SPENDER_SRC := \
|
2020-08-21 17:58:20 +08:00
|
|
|
plugins/spender/fundchannel.c \
|
2020-09-09 19:56:14 +09:30
|
|
|
plugins/spender/main.c \
|
2020-08-21 17:31:33 +08:00
|
|
|
plugins/spender/multifundchannel.c \
|
2020-10-20 20:18:19 -05:00
|
|
|
plugins/spender/multiwithdraw.c \
|
2024-11-11 13:19:24 +10:30
|
|
|
plugins/spender/openchannel.c \
|
|
|
|
|
plugins/spender/splice.c
|
2020-09-09 19:56:14 +09:30
|
|
|
PLUGIN_SPENDER_HEADER := \
|
2020-08-21 17:31:33 +08:00
|
|
|
plugins/spender/multifundchannel.h \
|
2020-08-21 17:58:20 +08:00
|
|
|
plugins/spender/multiwithdraw.h \
|
|
|
|
|
plugins/spender/fundchannel.h \
|
2020-10-20 20:18:19 -05:00
|
|
|
plugins/spender/multifundchannel.h \
|
2024-11-11 13:19:24 +10:30
|
|
|
plugins/spender/openchannel.h \
|
|
|
|
|
plugins/spender/splice.h
|
2020-09-09 19:55:20 +09:30
|
|
|
PLUGIN_SPENDER_OBJS := $(PLUGIN_SPENDER_SRC:.c=.o)
|
|
|
|
|
|
2023-12-11 13:34:22 +05:30
|
|
|
PLUGIN_RECOVER_SRC := plugins/recover.c
|
|
|
|
|
PLUGIN_RECOVER_OBJS := $(PLUGIN_RECOVER_SRC:.c=.o)
|
|
|
|
|
|
2021-04-22 17:51:22 -05:00
|
|
|
PLUGIN_FUNDER_SRC := \
|
|
|
|
|
plugins/funder.c \
|
|
|
|
|
plugins/funder_policy.c
|
|
|
|
|
PLUGIN_FUNDER_HEADER := \
|
|
|
|
|
plugins/funder_policy.h
|
|
|
|
|
PLUGIN_FUNDER_OBJS := $(PLUGIN_FUNDER_SRC:.c=.o)
|
|
|
|
|
|
2024-07-08 14:43:07 -05:00
|
|
|
PLUGIN_RECKLESSRPC_SRC := plugins/recklessrpc.c
|
|
|
|
|
PLUGIN_RECKLESSRPC_OBJS := $(PLUGIN_RECKLESSRPC_SRC:.c=.o)
|
|
|
|
|
|
2020-06-19 14:22:25 +08:00
|
|
|
PLUGIN_ALL_SRC := \
|
|
|
|
|
$(PLUGIN_AUTOCLEAN_SRC) \
|
2022-06-24 06:59:36 +05:30
|
|
|
$(PLUGIN_chanbackup_SRC) \
|
2020-06-19 14:22:25 +08:00
|
|
|
$(PLUGIN_BCLI_SRC) \
|
2022-07-16 22:48:21 +09:30
|
|
|
$(PLUGIN_COMMANDO_SRC) \
|
2021-04-22 17:51:22 -05:00
|
|
|
$(PLUGIN_FUNDER_SRC) \
|
2021-06-15 06:37:38 +09:30
|
|
|
$(PLUGIN_TOPOLOGY_SRC) \
|
2024-09-06 15:07:57 +09:30
|
|
|
$(PLUGIN_EXPOSESECRET_SRC) \
|
2020-06-19 14:22:25 +08:00
|
|
|
$(PLUGIN_KEYSEND_SRC) \
|
2020-08-28 12:01:57 +09:30
|
|
|
$(PLUGIN_TXPREPARE_SRC) \
|
2020-06-19 14:22:25 +08:00
|
|
|
$(PLUGIN_LIB_SRC) \
|
2021-01-13 19:28:38 +10:30
|
|
|
$(PLUGIN_OFFERS_SRC) \
|
2020-08-05 22:01:20 +08:00
|
|
|
$(PLUGIN_PAY_LIB_SRC) \
|
2020-09-09 19:55:20 +09:30
|
|
|
$(PLUGIN_PAY_SRC) \
|
2023-12-11 13:34:22 +05:30
|
|
|
$(PLUGIN_SPENDER_SRC) \
|
2024-07-08 14:43:07 -05:00
|
|
|
$(PLUGIN_RECOVER_SRC) \
|
|
|
|
|
$(PLUGIN_RECKLESSRPC_SRC)
|
2020-12-16 13:43:23 +10:30
|
|
|
|
2020-06-19 14:22:25 +08:00
|
|
|
PLUGIN_ALL_HEADER := \
|
2022-10-17 11:07:05 +10:30
|
|
|
$(PLUGIN_PAY_HEADER) \
|
2020-08-05 22:01:20 +08:00
|
|
|
$(PLUGIN_LIB_HEADER) \
|
2021-04-22 17:51:22 -05:00
|
|
|
$(PLUGIN_FUNDER_HEADER) \
|
2020-09-09 19:55:20 +09:30
|
|
|
$(PLUGIN_PAY_LIB_HEADER) \
|
2020-12-16 13:43:28 +10:30
|
|
|
$(PLUGIN_OFFERS_HEADER) \
|
2020-09-09 19:55:20 +09:30
|
|
|
$(PLUGIN_SPENDER_HEADER)
|
2020-06-19 14:22:25 +08:00
|
|
|
|
2022-04-10 20:08:15 +09:30
|
|
|
C_PLUGINS := \
|
2020-06-19 14:22:25 +08:00
|
|
|
plugins/autoclean \
|
2022-06-24 06:59:36 +05:30
|
|
|
plugins/chanbackup \
|
2020-06-19 14:22:25 +08:00
|
|
|
plugins/bcli \
|
2022-07-16 22:48:21 +09:30
|
|
|
plugins/commando \
|
2021-04-22 17:51:22 -05:00
|
|
|
plugins/funder \
|
2021-06-15 06:37:38 +09:30
|
|
|
plugins/topology \
|
2024-09-06 15:07:57 +09:30
|
|
|
plugins/exposesecret \
|
2020-06-19 14:22:25 +08:00
|
|
|
plugins/keysend \
|
2021-01-13 19:28:38 +10:30
|
|
|
plugins/offers \
|
2020-08-28 12:01:57 +09:30
|
|
|
plugins/pay \
|
2024-07-08 14:43:07 -05:00
|
|
|
plugins/recklessrpc \
|
2023-12-11 13:34:22 +05:30
|
|
|
plugins/recover \
|
2020-09-09 19:55:20 +09:30
|
|
|
plugins/txprepare \
|
2023-07-31 11:21:22 +09:30
|
|
|
plugins/cln-renepay \
|
2024-11-17 16:11:06 +10:30
|
|
|
plugins/cln-xpay \
|
2024-08-07 11:19:53 +09:30
|
|
|
plugins/spenderp \
|
|
|
|
|
plugins/cln-askrene
|
2020-06-19 14:22:25 +08:00
|
|
|
|
2023-02-06 12:21:30 +10:30
|
|
|
ifeq ($(HAVE_SQLITE3),1)
|
|
|
|
|
C_PLUGINS += plugins/sql
|
|
|
|
|
PLUGIN_ALL_SRC += $(PLUGIN_SQL_SRC)
|
|
|
|
|
PLUGIN_ALL_HEADER += $(PLUGIN_SQL_HEADER)
|
|
|
|
|
endif
|
|
|
|
|
|
2023-07-15 14:12:59 +09:30
|
|
|
# This is non-python plugins (PY_PLUGINS need their whole directory!)
|
2022-04-10 20:08:15 +09:30
|
|
|
PLUGINS := $(C_PLUGINS)
|
|
|
|
|
|
2025-02-07 13:56:20 -08:00
|
|
|
# Remove clnrest directory if exists which is the old python plugin code
|
|
|
|
|
$(shell test -d plugins/clnrest && $(RM) -r plugins/clnrest || true)
|
2025-02-11 16:05:44 +01:00
|
|
|
# Remove wss-proxy directory if exists which is the old python plugin code
|
|
|
|
|
$(shell test -d plugins/wss-proxy && $(RM) -r plugins/wss-proxy || true)
|
2025-02-07 13:56:20 -08:00
|
|
|
|
2022-04-10 20:08:15 +09:30
|
|
|
ifneq ($(RUST),0)
|
|
|
|
|
# Builtin plugins must be in this plugins dir to work when we're executed
|
|
|
|
|
# *without* make install.
|
2025-07-28 15:11:29 +02:00
|
|
|
plugins/cln-grpc: $(RUST_TARGET_DIR)/cln-grpc
|
2022-04-10 20:08:15 +09:30
|
|
|
@cp $< $@
|
2025-07-28 15:11:29 +02:00
|
|
|
plugins/clnrest: $(RUST_TARGET_DIR)/clnrest
|
2024-07-31 13:44:18 +02:00
|
|
|
@cp $< $@
|
2025-07-28 15:11:29 +02:00
|
|
|
plugins/cln-lsps-client: $(RUST_TARGET_DIR)/cln-lsps-client
|
2025-04-04 12:27:38 +02:00
|
|
|
@cp $< $@
|
2025-07-28 15:11:29 +02:00
|
|
|
plugins/cln-lsps-service: $(RUST_TARGET_DIR)/cln-lsps-service
|
2025-04-10 13:08:45 +02:00
|
|
|
@cp $< $@
|
2025-07-28 15:11:29 +02:00
|
|
|
plugins/wss-proxy: $(RUST_TARGET_DIR)/wss-proxy
|
2025-02-11 16:05:44 +01:00
|
|
|
@cp $< $@
|
2025-07-28 15:11:29 +02:00
|
|
|
plugins/cln-bip353: $(RUST_TARGET_DIR)/cln-bip353
|
2025-06-18 20:01:13 +02:00
|
|
|
@cp $< $@
|
2022-04-10 20:08:15 +09:30
|
|
|
|
2025-06-18 20:01:13 +02:00
|
|
|
PLUGINS += plugins/cln-grpc plugins/clnrest plugins/cln-lsps-client plugins/cln-lsps-service plugins/wss-proxy plugins/cln-bip353
|
2022-04-10 20:08:15 +09:30
|
|
|
endif
|
|
|
|
|
|
2024-08-07 11:19:53 +09:30
|
|
|
include plugins/askrene/Makefile
|
2022-07-19 14:37:26 +09:30
|
|
|
include plugins/bkpr/Makefile
|
2023-07-31 11:21:22 +09:30
|
|
|
include plugins/renepay/Makefile
|
2024-11-17 16:11:06 +10:30
|
|
|
include plugins/xpay/Makefile
|
2022-07-19 14:37:26 +09:30
|
|
|
|
2022-07-19 15:26:04 +09:30
|
|
|
# Make sure these depend on everything.
|
|
|
|
|
ALL_C_SOURCES += $(PLUGIN_ALL_SRC)
|
|
|
|
|
ALL_C_HEADERS += $(PLUGIN_ALL_HEADER)
|
|
|
|
|
ALL_PROGRAMS += $(C_PLUGINS)
|
|
|
|
|
|
2024-11-06 21:31:36 +10:30
|
|
|
PLUGIN_ALL_OBJS := $(PLUGIN_ALL_SRC:.c=.o)
|
|
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
# Make all plugins depend on all plugin headers, for simplicity (and this file!)
|
|
|
|
|
$(PLUGIN_ALL_OBJS): $(PLUGIN_ALL_HEADER) plugins/Makefile
|
2021-11-30 13:35:44 +10:30
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/pay: $(PLUGIN_PAY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) libcommon.a
|
2019-01-15 14:44:27 +10:30
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/autoclean: $(PLUGIN_AUTOCLEAN_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
|
2019-05-21 17:02:39 +09:30
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/chanbackup: $(PLUGIN_chanbackup_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
|
2022-06-24 06:59:36 +05:30
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/commando: $(PLUGIN_COMMANDO_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
|
2022-07-16 22:48:21 +09:30
|
|
|
|
2021-06-15 06:37:38 +09:30
|
|
|
# Topology wants to decode node_announcement, and peer_wiregen which
|
|
|
|
|
# pulls in some of bitcoin/.
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/topology: $(PLUGIN_TOPOLOGY_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
|
2021-06-15 06:37:38 +09:30
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/txprepare: $(PLUGIN_TXPREPARE_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
|
2020-08-28 12:01:57 +09:30
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/exposesecret: $(PLUGIN_EXPOSESECRET_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
|
2024-09-06 15:07:57 +09:30
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/bcli: $(PLUGIN_BCLI_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
|
2020-01-02 21:04:03 +01:00
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/keysend: $(PLUGIN_KEYSEND_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) libcommon.a
|
2025-10-22 19:44:26 +10:30
|
|
|
$(PLUGIN_KEYSEND_OBJS): $(PLUGIN_PAY_LIB_HEADER) libcommon.a
|
2020-03-27 14:31:00 +01:00
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/spenderp: $(PLUGIN_SPENDER_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
|
2020-09-09 19:55:20 +09:30
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/offers: $(PLUGIN_OFFERS_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
|
2020-12-16 13:43:23 +10:30
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/funder: $(PLUGIN_FUNDER_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
|
2021-04-22 17:51:22 -05:00
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/recover: $(PLUGIN_RECOVER_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
|
2023-12-11 13:34:22 +05:30
|
|
|
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/recklessrpc: $(PLUGIN_RECKLESSRPC_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
|
2024-07-08 14:43:07 -05:00
|
|
|
|
2023-01-30 16:54:17 +10:30
|
|
|
# This covers all the low-level list RPCs which return simple arrays
|
2025-08-19 10:30:46 +09:30
|
|
|
SQL_LISTRPCS := listchannels listforwards listhtlcs listinvoices listnodes listoffers listpeers listpeerchannels listclosedchannels listtransactions listsendpays listchainmoves listchannelmoves bkpr-listaccountevents bkpr-listincome
|
2025-01-27 19:42:51 -08:00
|
|
|
SQL_LISTRPCS_SCHEMAS := $(foreach l,$(SQL_LISTRPCS),doc/schemas/$l.json)
|
2024-09-16 16:53:54 +09:30
|
|
|
SQL_SCHEMA_PARTS := $(foreach l,$(SQL_LISTRPCS), plugins/sql-schema_$l_gen.h)
|
2024-03-03 18:29:52 -08:00
|
|
|
|
|
|
|
|
# RES_JSON is generated by:
|
|
|
|
|
# 1: deleting description array (used for field details) but keeping description keys
|
|
|
|
|
# 2: deleting additionalProperties, required, enum, maxLength, minLength, pre_return_value_notes, post_return_value_notes, anyOf, oneOf, hidden, untyped, default, comment, added, maximum, minimum, pattern, format
|
|
|
|
|
# (We only need [field].type, [field].name, [field].deprecated, [field].allOf, [field].items.allOf and allOf from response.properties)
|
|
|
|
|
# 3: deleting empty objects from .response.properties
|
|
|
|
|
# But these simple removals drop us from 100k to 18k.
|
2025-01-27 19:42:51 -08:00
|
|
|
plugins/sql-schema_%_gen.h: doc/schemas/%.json
|
2024-09-16 16:53:54 +09:30
|
|
|
@jq 'walk(if type == "object" then if has("description") and (.description | type) == "array" then del(.description) else . end else . end ) | walk(if type == "object" then del(.additionalProperties, .required, .enum, .maxLength, .minLength, .pre_return_value_notes, .post_return_value_notes, .anyOf, .oneOf, .hidden, .untyped, .default, .comment, .added, .maximum, .minimum, .pattern, .format) else . end) | walk(if type == "object" then with_entries(select(.value != {})) else . end) | .response.properties' < $< > $@
|
|
|
|
|
|
|
|
|
|
# Regen if these rules change!
|
|
|
|
|
$(SQL_SCHEMA_PARTS): plugins/Makefile
|
|
|
|
|
|
|
|
|
|
plugins/sql-schema_gen.h: $(SQL_SCHEMA_PARTS)
|
|
|
|
|
@$(call VERBOSE,GEN $@, set -e; (\
|
|
|
|
|
SEP=""; \
|
|
|
|
|
echo "\"{"; \
|
|
|
|
|
for l in $(SQL_LISTRPCS); do \
|
2025-10-14 10:36:43 +10:30
|
|
|
echo "$$SEP\"$$l\":{\"properties\":$$(cat plugins/sql-schema_$${l}_gen.h)}" | $(SED) s/\"/\\\"/g; \
|
2024-09-16 16:53:54 +09:30
|
|
|
SEP=","; \
|
2025-10-14 10:36:43 +10:30
|
|
|
done | $(SED) "s/\\\"/\\\\\"/g"; \
|
2024-09-16 16:53:54 +09:30
|
|
|
echo "}\"") | tr -d " \n" > $@ \
|
2024-03-03 18:29:52 -08:00
|
|
|
)
|
2023-01-30 16:54:17 +10:30
|
|
|
|
|
|
|
|
plugins/sql.o: plugins/sql-schema_gen.h
|
2025-10-22 19:44:26 +10:30
|
|
|
plugins/sql: $(PLUGIN_SQL_OBJS) $(PLUGIN_LIB_OBJS) gossipd/gossip_store_wiregen.o libcommon.a
|
2023-01-30 16:54:17 +10:30
|
|
|
|
2020-09-24 11:02:54 +09:30
|
|
|
# Generated from PLUGINS definition in plugins/Makefile
|
2020-10-22 10:21:08 +10:30
|
|
|
ALL_C_HEADERS += plugins/list_of_builtin_plugins_gen.h
|
2023-07-15 14:12:59 +09:30
|
|
|
PLUGIN_BASES := $(PLUGINS:plugins/%=%) $(PY_PLUGINS:plugins/%=%)
|
|
|
|
|
|
2022-09-12 09:35:52 +09:30
|
|
|
plugins/list_of_builtin_plugins_gen.h: plugins/Makefile Makefile config.vars
|
2023-07-15 14:12:59 +09:30
|
|
|
@$(call VERBOSE,GEN $@,echo "static const char *list_of_builtin_plugins[] = { $(PLUGIN_BASES:%=\"%\",) NULL };" > $@)
|
2021-04-22 17:53:28 -05:00
|
|
|
|
2025-07-28 15:11:29 +02:00
|
|
|
$(RUST_TARGET_DIR)/examples/cln-subscribe-wildcard: ${CLN_PLUGIN_SRC} plugins/examples/cln-subscribe-wildcard.rs
|
2024-02-23 09:29:03 +01:00
|
|
|
cargo build ${CARGO_OPTS} --example cln-subscribe-wildcard
|
|
|
|
|
|
2022-12-21 12:26:46 +01:00
|
|
|
CLN_PLUGIN_EXAMPLES := \
|
2025-07-28 15:11:29 +02:00
|
|
|
$(RUST_TARGET_DIR)/examples/cln-plugin-startup \
|
|
|
|
|
$(RUST_TARGET_DIR)/examples/cln-plugin-reentrant \
|
|
|
|
|
$(RUST_TARGET_DIR)/examples/cln-rpc-getinfo \
|
|
|
|
|
$(RUST_TARGET_DIR)/examples/cln-subscribe-wildcard
|
2022-01-17 12:59:09 +01:00
|
|
|
|
2022-12-21 12:26:46 +01:00
|
|
|
CLN_PLUGIN_SRC = $(shell find plugins/src -name "*.rs")
|
2024-02-14 15:34:44 +01:00
|
|
|
CLN_GRPC_PLUGIN_SRC = $(shell find plugins/grpc-plugin/src -name "*.rs")
|
2025-02-07 13:55:22 -08:00
|
|
|
CLN_REST_PLUGIN_SRC = $(shell find plugins/rest-plugin/src -name "*.rs")
|
2025-03-14 18:49:56 +01:00
|
|
|
CLN_LSPS_PLUGIN_SRC = $(shell find plugins/lsps-plugin/src -name "*.rs")
|
2025-02-11 16:05:44 +01:00
|
|
|
CLN_WSS_PROXY_PLUGIN_SRC = $(shell find plugins/wss-proxy-plugin/src -name "*.rs")
|
2025-06-18 20:01:13 +02:00
|
|
|
CLN_BIP353_PLUGIN_SRC = $(shell find plugins/bip353-plugin/src -name "*.rs")
|
2022-01-17 12:59:09 +01:00
|
|
|
|
2025-07-28 15:11:29 +02:00
|
|
|
$(RUST_TARGET_DIR)/cln-grpc: ${CLN_PLUGIN_SRC} ${CLN_GRPC_PLUGIN_SRC} $(MSGGEN_GENALL) $(MSGGEN_GEN_ALL)
|
2022-03-22 16:49:12 +01:00
|
|
|
cargo build ${CARGO_OPTS} --bin cln-grpc
|
2025-07-28 15:11:29 +02:00
|
|
|
$(RUST_TARGET_DIR)/clnrest: ${CLN_REST_PLUGIN_SRC}
|
2024-07-31 13:44:18 +02:00
|
|
|
cargo build ${CARGO_OPTS} --bin clnrest
|
2025-07-28 15:11:29 +02:00
|
|
|
$(RUST_TARGET_DIR)/cln-lsps-client: ${CLN_LSPS_PLUGIN_SRC}
|
2025-04-04 12:27:38 +02:00
|
|
|
cargo build ${CARGO_OPTS} --bin cln-lsps-client
|
2025-07-28 15:11:29 +02:00
|
|
|
$(RUST_TARGET_DIR)/cln-lsps-service: ${CLN_LSPS_PLUGIN_SRC}
|
2025-04-10 13:08:45 +02:00
|
|
|
cargo build ${CARGO_OPTS} --bin cln-lsps-service
|
2025-07-28 15:11:29 +02:00
|
|
|
$(RUST_TARGET_DIR)/wss-proxy: ${CLN_WSS_PROXY_PLUGIN_SRC}
|
2025-02-11 16:05:44 +01:00
|
|
|
cargo build ${CARGO_OPTS} --bin wss-proxy
|
2025-07-28 15:11:29 +02:00
|
|
|
$(RUST_TARGET_DIR)/cln-bip353: ${CLN_BIP353_PLUGIN_SRC}
|
2025-06-18 20:01:13 +02:00
|
|
|
cargo build ${CARGO_OPTS} --bin cln-bip353
|
2022-01-17 16:53:52 +01:00
|
|
|
|
2022-04-12 15:55:55 +09:30
|
|
|
ifneq ($(RUST),0)
|
2025-02-11 13:01:27 +10:30
|
|
|
include plugins/rest-plugin/Makefile
|
2025-02-11 16:05:44 +01:00
|
|
|
include plugins/wss-proxy-plugin/Makefile
|
2025-06-18 20:01:13 +02:00
|
|
|
DEFAULT_TARGETS += $(CLN_PLUGIN_EXAMPLES) plugins/cln-grpc plugins/clnrest plugins/cln-lsps-client plugins/cln-lsps-service plugins/wss-proxy plugins/cln-bip353
|
2022-04-12 15:55:55 +09:30
|
|
|
endif
|
|
|
|
|
|
2023-04-12 11:34:57 +09:30
|
|
|
clean: plugins-clean
|
|
|
|
|
plugins-clean:
|
|
|
|
|
$(RM) $(PLUGINS) $(CLN_PLUGIN_EXAMPLES)
|
|
|
|
|
$(RM) plugins/sql-schema_gen.h
|
|
|
|
|
|
2021-04-22 17:53:28 -05:00
|
|
|
include plugins/test/Makefile
|