mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
fix: prefixing external build dir
This is a simplification for our build system that allows for managing and cleaning the external build artefacts in an easy way. We have a hard time with the suffix `-modded` inside the version with some architecture when building a tagged version. Link: https://discord.com/channels/899980449231814676/899989729183940629/1110957992158965770 Reported-by: @ctrlbreak- Suggested-by: Rusty Russell <rusty@rustcorp.com.au> Co-developed-by: @jsarenik Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
parent
4f30857401
commit
15e86f2bba
19
external/.gitignore
vendored
19
external/.gitignore
vendored
@ -1,18 +1 @@
|
||||
x86_64-linux-gnu
|
||||
aarch64-linux-gnu
|
||||
arm-linux-gnueabihf
|
||||
x86_64-pc-linux-gnu
|
||||
arm64-apple-darwin*
|
||||
x86_64-apple-darwin*
|
||||
|
||||
libbacktrace-build/
|
||||
libbacktrace.a
|
||||
libbacktrace.la
|
||||
libbase58/
|
||||
libbase58.a
|
||||
libwally-core-build/
|
||||
libjsmn.a
|
||||
libsecp256k1.a
|
||||
libsecp256k1.la
|
||||
libwallycore.a
|
||||
libwallycore.la
|
||||
build-*
|
||||
|
14
external/Makefile
vendored
14
external/Makefile
vendored
@ -13,9 +13,9 @@ endif
|
||||
TOP := ../..
|
||||
ifdef BUILD
|
||||
CROSSCOMPILE_OPTS := --host="$(MAKE_HOST)" --build="$(BUILD)"
|
||||
TARGET_DIR := external/$(MAKE_HOST)
|
||||
TARGET_DIR := external/build-$(MAKE_HOST)
|
||||
else
|
||||
TARGET_DIR := external/$(shell ${CC} -dumpmachine)
|
||||
TARGET_DIR := external/build-$(shell ${CC} -dumpmachine)
|
||||
endif
|
||||
|
||||
LIBSODIUM_HEADERS := external/libsodium/src/libsodium/include/sodium.h
|
||||
@ -123,14 +123,8 @@ distclean: external-distclean
|
||||
clean: external-clean
|
||||
|
||||
external-clean:
|
||||
$(RM) $(EXTERNAL_LIBS) $(TARGET_DIR)/*.la $(TARGET_DIR)/*.o
|
||||
$(RM) $(TARGET_DIR)/jsmn-build/jsmn.o
|
||||
$(RM) -r $(TARGET_DIR)/lowdown-build/*
|
||||
if [ -f ${TARGET_DIR}/libsodium-build/Makefile ]; then make -C ${TARGET_DIR}/libsodium-build clean; fi
|
||||
if [ -f ${TARGET_DIR}/libwally-core-build/Makefile ]; then make -C ${TARGET_DIR}/libwally-core-build clean; fi
|
||||
if [ -f ${TARGET_DIR}/libwally-core-build/src/Makefile ]; then make -C ${TARGET_DIR}/libwally-core-build/src clean; fi
|
||||
if [ -f ${TARGET_DIR}/libbacktrace-build/Makefile ]; then make -C ${TARGET_DIR}/libbacktrace-build clean; fi
|
||||
if [ -f external/lowdown/Makefile.configure ]; then $(MAKE) -C external/lowdown clean; fi
|
||||
$(RM) $(EXTERNAL_LIBS)
|
||||
$(RM) -rf $(TARGET_DIR)
|
||||
|
||||
external-distclean:
|
||||
make -C external/libsodium distclean || true
|
||||
|
Loading…
Reference in New Issue
Block a user