forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common: absorb remaining files from daemon/
Also, we split the more sophisticated json_add helpers to avoid pulling in everything into lightning-cli, and unify the routines to print struct short_channel_id (it's ':', not '/' too). Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information
1 parent
a3c5116
commit 8375857
Showing
86 changed files
with
387 additions
and
394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
LIGHTNING_CLI_SRC := cli/lightning-cli.c | ||
LIGHTNING_CLI_OBJS := $(LIGHTNING_CLI_SRC:.c=.o) | ||
|
||
JSMN_OBJS := daemon/jsmn.o | ||
JSMN_HEADERS := daemon/jsmn/jsmn.h | ||
|
||
LIGHTNING_CLI_COMMON_OBJS := \ | ||
common/configdir.o \ | ||
common/json.o \ | ||
common/version.o | ||
|
||
lightning-cli-all: cli/lightning-cli | ||
|
||
$(LIGHTNINGD_OPENING_OBJS): $(LIGHTNINGD_HEADERS) | ||
|
||
# Git submodules are seriously broken. | ||
daemon/jsmn/jsmn.h: | ||
git submodule update daemon/jsmn/ | ||
[ -f $@ ] || git submodule update --init daemon/jsmn/ | ||
|
||
# If we tell Make that the above builds both, it runs it twice in | ||
# parallel. So we lie :( | ||
daemon/jsmn/jsmn.c: daemon/jsmn/jsmn.h | ||
[ -f $@ ] | ||
|
||
daemon/jsmn.o: daemon/jsmn/jsmn.c | ||
$(COMPILE.c) -DJSMN_STRICT=1 $(OUTPUT_OPTION) $< | ||
|
||
$(LIGHTNING_CLI_OBJS) $(JSMN_OBJS): $(JSMN_HEADERS) $(COMMON_HEADERS) $(CCAN_HEADERS) | ||
|
||
cli/lightning-cli: $(LIGHTNING_CLI_OBJS) $(LIGHTNING_CLI_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) | ||
|
||
clean: lightning-cli-clean | ||
|
||
lightning-cli-clean: | ||
$(RM) $(LIGHTNING-CLI_LIB_OBJS) $(DAEMON_JSMN_OBJS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,37 @@ | ||
COMMON_SRC := \ | ||
common/close_tx.c \ | ||
common/configdir.c \ | ||
common/derive_basepoints.c \ | ||
common/funding_tx.c \ | ||
common/htlc_tx.c \ | ||
common/htlc_state.c \ | ||
common/initial_channel.c \ | ||
common/initial_commit_tx.c \ | ||
common/json.c \ | ||
common/permute_tx.c \ | ||
common/pseudorand.c \ | ||
common/timeout.c \ | ||
common/type_to_string.c \ | ||
common/utils.c \ | ||
common/version.c \ | ||
common/withdraw_tx.c | ||
|
||
COMMON_HEADERS := $(COMMON_SRC:.c=.h) common/overflows.h | ||
COMMON_HEADERS_NOGEN := $(COMMON_SRC:.c=.h) common/overflows.h common/htlc.h | ||
COMMON_HEADERS_GEN := common/gen_htlc_state_names.h | ||
|
||
COMMON_HEADERS := $(COMMON_HEADERS_GEN) $(COMMON_HEADERS_NOGEN) | ||
COMMON_OBJS := $(COMMON_SRC:.c=.o) | ||
|
||
common/gen_htlc_state_names.h: common/htlc_state.h ccan/ccan/cdump/tools/cdump-enumstr | ||
ccan/ccan/cdump/tools/cdump-enumstr common/htlc_state.h > $@ | ||
|
||
check-makefile: check-common-makefile | ||
|
||
check-common-makefile: | ||
@if [ x"`LC_ALL=C ls common/*.h | grep -v ^gen_`" != x"`echo $(COMMON_HEADERS) | tr ' ' '\n' | LC_ALL=C sort`" ]; then echo COMMON_HEADERS incorrect; exit 1; fi | ||
@if [ x"`LC_ALL=C ls common/*.h | grep -v ^common/gen_`" != x"`echo $(COMMON_HEADERS_NOGEN) | tr ' ' '\n' | LC_ALL=C sort`" ]; then echo COMMON_HEADERS_NOGEN incorrect; exit 1; fi | ||
|
||
check-source-bolt: $(COMMON_SRC:%=bolt-check/%) $(COMMON_HEADERS:%=bolt-check/%) | ||
check-whitespace: $(COMMON_SRC:%=check-whitespace/%) $(COMMON_HEADERS:%=check-whitespace/%) | ||
|
||
check-source: $(COMMON_SRC:%=check-src-include-order/%) \ | ||
$(COMMON_HEADERS:%=check-hdr-include-order/%) | ||
$(COMMON_HEADERS_NOGEN:%=check-hdr-include-order/%) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#include "lightningd.h" | ||
#include "timeout.h" | ||
#include <common/utils.h> | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.