rgb-cln/bitcoin
Rusty Russell 3e672b784d Makefile: use a library archive for CCAN
The linker discards whole files in an archive if it doesn't need them,
so saves a bit of space (and time).  Also allows us to add more niche
things to CCAN (e.g. runes support!) without bloating all the binaries.

We also had many places which depended on $(CCAN_FILES), but that was
already a dependent of $(ALL_PROGRAMS) and $(ALL_TEST_PROGRAMS).

Before:

```
$ size lightningd/lightning*d
   text	   data	    bss	    dec	    hex	filename
2247683	   8696	  39008	2295387	 23065b	lightningd/lightning_channeld
2086607	   7432	  38880	2132919	 208bb7	lightningd/lightning_closingd
2227916	   8056	  39200	2275172	 22b764	lightningd/lightning_connectd
3369236	 119288	  39240	3527764	 35d454	lightningd/lightningd
2183551	   8352	  38880	2230783	 2209ff	lightningd/lightning_dualopend
2196389	   8024	  39136	2243549	 223bdd	lightningd/lightning_gossipd
2086216	   7488	  39264	2132968	 208be8	lightningd/lightning_hsmd
2134396	   8136	  39424	2181956	 214b44	lightningd/lightning_onchaind
2133391	   8352	  38880	2180623	 21460f	lightningd/lightning_openingd
1512168	   2136	  34384	1548688	 17a190	lightningd/lightning_websocketd
```

After:
```
text	   data	    bss	    dec	    hex	filename
2192065	   8488	  38912	2239465	 222be9	lightningd/lightning_channeld
2030957	   7224	  38816	2076997	 1fb145	lightningd/lightning_closingd
2179571	   7968	  39104	2226643	 21f9d3	lightningd/lightning_connectd
3354296	 119288	  39208	3512792	 3599d8	lightningd/lightningd
2127933	   8144	  38816	2174893	 212fad	lightningd/lightning_dualopend
2141699	   7856	  39072	2188627	 216553	lightningd/lightning_gossipd
2024482	   7288	   5240	2037010	 1f1512	lightningd/lightning_hsmd
2072074	   7920	   5400	2085394	 1fd212	lightningd/lightning_onchaind
2077773	   8144	  38816	2124733	 206bbd	lightningd/lightning_openingd
1408958	   1752	    344	1411054	 1587ee	lightningd/lightning_websocketd
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-07-17 08:51:02 +09:30
..
test Makefile: use a library archive for CCAN 2022-07-17 08:51:02 +09:30
Makefile bitcoin: add to check-source-bolt, and (minor) quotes fixup. 2022-06-18 13:45:09 +09:30
README
address.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
base58.c memleak: handle libwally allocations better. 2022-03-21 10:19:50 +10:30
base58.h bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
block.c bitcoin: fix header order for make check-source. 2022-06-18 13:45:09 +09:30
block.h bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
chainparams.c lightnind: remove`DEFAULT_PORT` global definition 2022-06-28 06:09:01 +09:30
chainparams.h lightnind: remove`DEFAULT_PORT` global definition 2022-06-28 06:09:01 +09:30
feerate.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
feerate.h feerate: remove duplicate method 2020-10-20 14:27:19 +10:30
locktime.c bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
locktime.h bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
preimage.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
preimage.h
privkey.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
privkey.h
psbt.c bitcoin: add to check-source-bolt, and (minor) quotes fixup. 2022-06-18 13:45:09 +09:30
psbt.h doc: update c-lightning to Core Lightning almost everywhere. 2022-04-07 06:53:26 +09:30
pubkey.c bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
pubkey.h bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
script.c bitcoin: add to check-source-bolt, and (minor) quotes fixup. 2022-06-18 13:45:09 +09:30
script.h bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
shadouble.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
shadouble.h
short_channel_id.c bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
short_channel_id.h lightningd: Add RPC for populating DB with stub channels and set an error on reconnecting 2022-07-14 12:24:48 -05:00
signature.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
signature.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
tx.c bitcoin: fix header order for make check-source. 2022-06-18 13:45:09 +09:30
tx.h bitcoin: Comment typo fix 2022-03-03 11:22:19 +10:30
tx_parts.c memleak: handle libwally allocations better. 2022-03-21 10:19:50 +10:30
tx_parts.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
varint.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
varint.h

README

These are standard bitcoin manipulation routines which should be
provided by any normal bitcoin library in whatever language you choose.

The ones here are standalone ones taken from bitcoin core and some I
wrote, many taken from bitcoin-iterate and pasted in here.