diff --git a/external/.gitignore b/external/.gitignore index fd9b925c8..dd07bff2c 100644 --- a/external/.gitignore +++ b/external/.gitignore @@ -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-* diff --git a/external/Makefile b/external/Makefile index c922657ce..ce8310dbe 100644 --- a/external/Makefile +++ b/external/Makefile @@ -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