Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,8 @@ PKGLIBEXEC_PROGRAMS = \
lightningd/lightning_hsmd \
lightningd/lightning_onchaind \
lightningd/lightning_openingd
PLUGINS=plugins/pay plugins/autoclean plugins/fundchannel plugins/bcli plugins/keysend

# $(PLUGINS) is defined in plugins/Makefile.

install-program: installdirs $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS)
@$(NORMAL_INSTALL)
Expand Down
35 changes: 28 additions & 7 deletions plugins/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ PLUGIN_LIB_SRC := plugins/libplugin.c plugins/libplugin-pay.c
PLUGIN_LIB_HEADER := plugins/libplugin.h plugins/libplugin-pay.h
PLUGIN_LIB_OBJS := $(PLUGIN_LIB_SRC:.c=.o)

PLUGIN_ALL_SRC := \
$(PLUGIN_AUTOCLEAN_SRC) \
$(PLUGIN_BCLI_SRC) \
$(PLUGIN_FUNDCHANNEL_SRC) \
$(PLUGIN_KEYSEND_SRC) \
$(PLUGIN_LIB_SRC) \
$(PLUGIN_PAY_SRC)
PLUGIN_ALL_HEADER := \
$(PLUGIN_LIB_HEADER)
PLUGIN_ALL_OBJS := $(PLUGIN_ALL_SRC:.c=.o)

PLUGINS := \
plugins/autoclean \
plugins/bcli \
plugins/fundchannel \
plugins/keysend \
plugins/pay

PLUGIN_COMMON_OBJS := \
bitcoin/base58.o \
bitcoin/privkey.o \
Expand Down Expand Up @@ -65,17 +83,20 @@ plugins/bcli: bitcoin/chainparams.o $(PLUGIN_BCLI_OBJS) $(PLUGIN_LIB_OBJS) $(PLU

plugins/keysend: bitcoin/chainparams.o wire/tlvstream.o wire/gen_onion_wire.o $(PLUGIN_KEYSEND_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)

$(PLUGIN_PAY_OBJS) $(PLUGIN_AUTOCLEAN_OBJS) $(PLUGIN_FUNDCHANNEL_OBJS) $(PLUGIN_BCLI_OBJS) $(PLUGIN_LIB_OBJS): $(PLUGIN_LIB_HEADER)
$(PLUGIN_ALL_OBJS): $(PLUGIN_LIB_HEADER)

# Make sure these depend on everything.
ALL_PROGRAMS += plugins/pay plugins/autoclean plugins/fundchannel plugins/bcli plugins/keysend
ALL_OBJS += $(PLUGIN_PAY_OBJS) $(PLUGIN_AUTOCLEAN_OBJS) $(PLUGIN_FUNDCHANNEL_OBJS) $(PLUGIN_BCLI_OBJS) $(PLUGIN_KEYSEND_OBJS) $(PLUGIN_LIB_OBJS)
ALL_PROGRAMS += $(PLUGINS)
ALL_OBJS += $(PLUGIN_ALL_OBJS)

check-source: $(PLUGIN_PAY_SRC:%=check-src-include-order/%) $(PLUGIN_AUTOCLEAN_SRC:%=check-src-include-order/%) $(PLUGIN_FUNDCHANNEL_SRC:%=check-src-include-order/%) $(PLUGIN_BCLI_SRC:%=check-src-include-order/%)
check-source-bolt: $(PLUGIN_PAY_SRC:%=bolt-check/%) $(PLUGIN_AUTOCLEAN_SRC:%=bolt-check/%) $(PLUGIN_FUNDCHANNEL_SRC:%=bolt-check/%) $(PLUGIN_BCLI_SRC:%=bolt-check/%)
check-whitespace: $(PLUGIN_PAY_SRC:%=check-whitespace/%) $(PLUGIN_AUTOCLEAN_SRC:%=check-whitespace/%) $(PLUGIN_FUNDCHANNEL_SRC:%=check-whitespace/%) $(PLUGIN_BCLI_SRC:%=check-whitespace/%)
check-source: $(PLUGIN_ALL_SRC:%=check-src-include-order/%)
check-source: $(PLUGIN_ALL_HEADER:%=check-hdr-include-order/%)
check-source-bolt: $(PLUGIN_ALL_SRC:%=bolt-check/%)
check-source-bolt: $(PLUGIN_ALL_HEADER:%=bolt-check/%)
check-whitespace: $(PLUGIN_ALL_SRC:%=check-whitespace/%)
check-whitespace: $(PLUGIN_ALL_HEADER:%=check-whitespace/%)

clean: plugin-clean

plugin-clean:
$(RM) $(PLUGIN_PAY_OBJS) $(PLUGIN_AUTOCLEAN_OBJS) $(PLUGIN_FUNDCHANNEL_OBJS) $(PLUGIN_LIB_OBJS)
$(RM) $(PLUGIN_ALL_OBJS)
8 changes: 4 additions & 4 deletions plugins/libplugin-pay.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "common/type_to_string.h"
#include <plugins/libplugin-pay.h>
#include <stdio.h>

#include <bitcoin/preimage.h>
#include <ccan/array_size/array_size.h>
#include <ccan/tal/str/str.h>
#include <common/json_stream.h>
#include <common/type_to_string.h>
#include <plugins/libplugin-pay.h>
#include <stdio.h>


#define DEFAULT_FINAL_CLTV_DELTA 9

Expand Down
2 changes: 1 addition & 1 deletion plugins/libplugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <common/json_stream.h>
#include <common/utils.h>
#include <errno.h>
#include <poll.h>
#include <plugins/libplugin.h>
#include <poll.h>
#include <stdarg.h>
#include <string.h>
#include <sys/socket.h>
Expand Down