Skip to content

Commit c53084b

Browse files
committed
chore: remove status-go mobile build logic
Move status-go build logic from mobile scripts to status-go repo. - #18377
1 parent 235ca08 commit c53084b

File tree

3 files changed

+23
-60
lines changed

3 files changed

+23
-60
lines changed

mobile/Makefile

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
-include ./scripts/EnvVariables.mk
22
-include ./scripts/Common.mk
3+
4+
STATUS_GO_LIB := $(LIB_PATH)/libstatus$(LIB_EXT)
5+
36
$(info Configuring build system for $(OS) $(ARCH) with QT $(QT_MAJOR))
47

58
# default rule
@@ -9,25 +12,32 @@ iosdevice: IPHONE_SDK=iphoneos
912
iosdevice: default
1013

1114
# dependencies
12-
status-go: clean-status-go $(STATUS_GO_LIB)
1315
statusq: clean-statusq $(STATUS_Q_LIB)
1416
dotherside: clean-dotherside $(DOTHERSIDE_LIB)
1517
openssl: clean-openssl $(OPENSSL_LIB)
1618
qrcodegen: clean-qrcodegen $(QRCODEGEN_LIB)
1719
nim-status-client: clean-nim-status-client $(NIM_STATUS_CLIENT_LIB)
1820
status-desktop-rcc: clean-status-desktop-rcc $(STATUS_DESKTOP_RCC)
1921

20-
$(STATUS_GO_LIB): $(STATUS_GO_FILES) $(STATUS_GO_SCRIPT)
21-
@echo "Building Status Go"
22-
ifeq ($(OS),ios)
23-
@STATUS_GO=$(STATUS_GO) \
24-
CC="$(shell xcrun --sdk ${SDK} --find clang)" \
25-
CGO_CFLAGS="-arch ${ARCH} -isysroot $(shell xcrun --sdk ${IPHONE_SDK} --show-sdk-path) -miphoneos-version-min=${IOS_TARGET} -fembed-bitcode" \
26-
$(STATUS_GO_SCRIPT) $(HANDLE_OUTPUT)
27-
else
28-
@STATUS_GO=$(STATUS_GO) $(STATUS_GO_SCRIPT) $(HANDLE_OUTPUT)
22+
$(STATUS_GO_LIB):
23+
@echo "Building status-go mobile library"
24+
ifeq ($(OS),android)
25+
CC="$(CC)" $(MAKE) -C ../vendor/status-go statusgo-android-library \
26+
ARCH=$(ARCH) \
27+
ANDROID_NDK_ROOT="$(ANDROID_NDK_ROOT)" \
28+
ANDROID_API="$(ANDROID_API)" \
29+
HOST_OS="$(HOST_OS)" \
30+
SHELL=/bin/sh
31+
else ifeq ($(OS),ios)
32+
$(MAKE) -C ../vendor/status-go statusgo-ios-library \
33+
ARCH=$(ARCH) \
34+
IPHONE_SDK="$(IPHONE_SDK)" \
35+
IOS_TARGET="$(IOS_TARGET)" \
36+
SHELL=/bin/sh
2937
endif
30-
@echo "Status Go built $(STATUS_GO_LIB)"
38+
@echo "Copying library to mobile lib directory"
39+
@mkdir -p $(LIB_PATH)
40+
@cp ../vendor/status-go/build/bin/libstatus$(LIB_EXT) $(LIB_PATH)/libstatus$(LIB_EXT)
3141

3242
$(STATUS_Q_LIB): $(STATUS_Q_FILES) $(STATUS_Q_SCRIPT) $(STATUS_Q_UI_FILES)
3343
@echo "Building StatusQ"
@@ -73,7 +83,7 @@ makedir:
7383
all: $(TARGET)
7484

7585
.PHONY: clean
76-
clean: clean-status-go clean-statusq clean-dotherside clean-openssl clean-qrcodegen clean-nim-status-client clean-status-desktop-rcc
86+
clean: clean-statusq clean-dotherside clean-openssl clean-qrcodegen clean-nim-status-client clean-status-desktop-rcc
7787
@echo "Cleaning"
7888
@rm -rf $(ROOT_DIR)/bin $(ROOT_DIR)/build $(ROOT_DIR)/lib
7989

@@ -82,11 +92,6 @@ run: makedir $(TARGET)
8292
@echo "Running"
8393
@APP=$(TARGET) QT_MAJOR=$(QT_MAJOR) USE_QML_SERVER=$(USE_QML_SERVER) $(RUN_SCRIPT)
8494

85-
.PHONY: clean-status-go
86-
clean-status-go:
87-
@rm -f $(STATUS_GO_LIB)
88-
@rm -rf $(STATUS_GO)/build
89-
9095
.PHONY: clean-statusq
9196
clean-statusq:
9297
@rm -f $(STATUS_Q_LIB)

mobile/scripts/buildStatusGo.sh

Lines changed: 0 additions & 42 deletions
This file was deleted.

vendor/status-go

Submodule status-go updated 93 files

0 commit comments

Comments
 (0)