1
1
-include ./scripts/EnvVariables.mk
2
2
-include ./scripts/Common.mk
3
+
4
+ STATUS_GO_LIB := $(LIB_PATH ) /libstatus$(LIB_EXT )
5
+
3
6
$(info Configuring build system for $(OS) $(ARCH) with QT $(QT_MAJOR))
4
7
5
8
# default rule
@@ -9,25 +12,32 @@ iosdevice: IPHONE_SDK=iphoneos
9
12
iosdevice : default
10
13
11
14
# dependencies
12
- status-go : clean-status-go $(STATUS_GO_LIB )
13
15
statusq : clean-statusq $(STATUS_Q_LIB )
14
16
dotherside : clean-dotherside $(DOTHERSIDE_LIB )
15
17
openssl : clean-openssl $(OPENSSL_LIB )
16
18
qrcodegen : clean-qrcodegen $(QRCODEGEN_LIB )
17
19
nim-status-client : clean-nim-status-client $(NIM_STATUS_CLIENT_LIB )
18
20
status-desktop-rcc : clean-status-desktop-rcc $(STATUS_DESKTOP_RCC )
19
21
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
29
37
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)
31
41
32
42
$(STATUS_Q_LIB ) : $(STATUS_Q_FILES ) $(STATUS_Q_SCRIPT ) $(STATUS_Q_UI_FILES )
33
43
@echo " Building StatusQ"
@@ -73,7 +83,7 @@ makedir:
73
83
all : $(TARGET )
74
84
75
85
.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
77
87
@echo " Cleaning"
78
88
@rm -rf $(ROOT_DIR ) /bin $(ROOT_DIR ) /build $(ROOT_DIR ) /lib
79
89
@@ -82,12 +92,6 @@ run: makedir $(TARGET)
82
92
@echo " Running"
83
93
@APP=$(TARGET ) QT_MAJOR=$(QT_MAJOR ) USE_QML_SERVER=$(USE_QML_SERVER ) $(RUN_SCRIPT )
84
94
85
- .PHONY : clean-status-go
86
- clean-status-go :
87
- @rm -f $(STATUS_GO_LIB )
88
- @rm -rf $(STATUS_GO ) /build
89
- @make -C $(STATUS_DESKTOP ) status-go-clean
90
-
91
95
.PHONY : clean-statusq
92
96
clean-statusq :
93
97
@rm -f $(STATUS_Q_LIB )
0 commit comments