Skip to content

Commit

Permalink
fix(Makefile): Bugfixes and minor improvements (#10423)
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-sirotin authored Apr 25, 2023
1 parent e6f8875 commit 70e8370
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
30 changes: 20 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ QML_DEBUG_PORT ?= 49152

ifneq ($(QML_DEBUG), false)
DOTHERSIDE_CMAKE_PARAMS := -DCMAKE_BUILD_TYPE=Debug -DQML_DEBUG_PORT=$(QML_DEBUG_PORT)
DOTHERSIDE_BUILD_CMD := cmake --build . --config Debug $(HANDLE_OUTPUT)
DOTHERSIDE_BUILD_CMD := cmake --build . --config Debug
else
DOTHERSIDE_CMAKE_PARAMS := -DCMAKE_BUILD_TYPE=Release
DOTHERSIDE_BUILD_CMD := cmake --build . --config Release $(HANDLE_OUTPUT)
DOTHERSIDE_BUILD_CMD := cmake --build . --config Release
endif

MONITORING ?= false
Expand Down Expand Up @@ -265,6 +265,7 @@ $(STATUSQ_CMAKE_CACHE): | deps
$(STATUSQ_CMAKE_CONFIG_PARAMS) \
-B $(STATUSQ_BUILD_PATH) \
-S ui/StatusQ \
-Wno-dev \
$(HANDLE_OUTPUT)

statusq-configure: | $(STATUSQ_CMAKE_CACHE)
Expand All @@ -273,8 +274,7 @@ statusq-build: | statusq-configure
echo -e "\033[92mBuilding:\033[39m StatusQ"
cmake --build $(STATUSQ_BUILD_PATH) \
--target StatusQ \
--config Release
-DCMAKE_BUILD_TYPE=Release \
--config Release \
$(HANDLE_OUTPUT)

statusq-install: | statusq-build
Expand Down Expand Up @@ -322,18 +322,29 @@ $(DOTHERSIDE): | deps
-DENABLE_DOCS=OFF \
-DENABLE_TESTS=OFF \
.. $(HANDLE_OUTPUT) && \
$(DOTHERSIDE_BUILD_CMD)
$(DOTHERSIDE_BUILD_CMD) \
$(HANDLE_OUTPUT)

dotherside: $(DOTHERSIDE)

dotherside-clean:
$(MAKE) -C vendor/DOtherSide/build --no-print-directory clean

STATUSGO := vendor/status-go/build/bin/libstatus.$(LIBSTATUS_EXT)
STATUSGO_LIBDIR := $(shell pwd)/$(shell dirname "$(STATUSGO)")
export STATUSGO_LIBDIR

status-go: $(STATUSGO)
$(STATUSGO): | deps
echo -e $(BUILD_MSG) "status-go"
+ cd vendor/status-go && \
$(MAKE) statusgo-shared-library $(STATUSGO_MAKE_PARAMS) $(HANDLE_OUTPUT)

status-go: $(STATUSGO)

status-go-clean:
echo -e "\033[92mCleaning:\033[39m status-go"
rm -f $(STATUSGO)

STATUSKEYCARDGO := vendor/status-keycard-go/build/libkeycard/libkeycard.$(LIBSTATUS_EXT)
STATUSKEYCARDGO_LIBDIR := $(shell pwd)/$(shell dirname "$(STATUSKEYCARDGO)")
export STATUSKEYCARDGO_LIBDIR
Expand All @@ -349,7 +360,7 @@ QRCODEGEN := vendor/QR-Code-generator/c/libqrcodegen.a
$(QRCODEGEN): | deps
echo -e $(BUILD_MSG) "QR-Code-generator"
+ cd vendor/QR-Code-generator/c && \
$(MAKE) $(QRCODEGEN_MAKE_PARAMS)
$(MAKE) $(QRCODEGEN_MAKE_PARAMS) $(HANDLE_OUTPUT)

FLEETS := fleets.json
$(FLEETS):
Expand Down Expand Up @@ -713,9 +724,8 @@ pkg-windows: check-pkg-target-windows $(STATUS_CLIENT_EXE)

zip-windows: check-pkg-target-windows $(STATUS_CLIENT_7Z)

clean: | clean-common statusq-clean
rm -rf bin/* node_modules bottles/* pkg/* tmp/* $(STATUSGO) $(STATUSKEYCARDGO)
+ $(MAKE) -C vendor/DOtherSide/build --no-print-directory clean
clean: | clean-common statusq-clean status-go-clean dotherside-clean
rm -rf bin/* node_modules bottles/* pkg/* tmp/* $(STATUSKEYCARDGO)
+ $(MAKE) -C vendor/QR-Code-generator/c/ --no-print-directory clean

clean-git:
Expand Down
3 changes: 3 additions & 0 deletions ui/StatusQ/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ find_package(Qt5 COMPONENTS
add_subdirectory(../../vendor/SortFilterProxyModel SortFilterProxyModel)
add_subdirectory(../../vendor/qzxing/src qzxing)

target_compile_options(qzxing PRIVATE -w)
target_compile_options(SortFilterProxyModel PRIVATE -w)

### StatusQ library
### TODO: Move to a subdirectory for readability and better structure

Expand Down
1 change: 0 additions & 1 deletion ui/StatusQ/src/statusq.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,5 @@
<file>StatusQ/Controls/StatusLinkText.qml</file>
<file>StatusQ/Core/Utils/ModelChangeGuard.qml</file>
<file>StatusQ/Core/Utils/StackViewStates.qml</file>
<file>StatusQ/Components/StatusDraggableListItem.qml</file>
</qresource>
</RCC>

0 comments on commit 70e8370

Please sign in to comment.