Skip to content

Commit

Permalink
fix(ios): improve makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
  • Loading branch information
90dy committed Aug 22, 2019
1 parent 0c85b4b commit d7e567e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions client/Makefile
Expand Up @@ -211,7 +211,7 @@ $(PWD)/.environment:
@false

.PHONY: deps.ios
deps.ios: deps.lerna $(PWD)/.environment $(PWD)/ios/core.framework $(PWD)/ios/Pods
deps.ios: deps.lerna $(PWD)/.environment $(PWD)/ios/core.framework $(PWD)/ios/Pods/Manifest.lock
if [ ! -e ./node_modules/react-native/third-party/glog-0.*/Makefile ]; then \
cd ./node_modules/react-native \
&& rm -rf third-party \
Expand All @@ -220,7 +220,7 @@ deps.ios: deps.lerna $(PWD)/.environment $(PWD)/ios/core.framework $(PWD)/ios/Po
&& ../../scripts/ios-configure-glog.sh; \
fi

$(PWD)/ios/Pods: $(PWD)/ios/Podfile
$(PWD)/ios/Pods/Manifest.lock: $(PWD)/package.json $(PWD)/ios/Podfile
$(PWD)/node_modules/.bin/react-native link --platforms=ios
([ ! -z "$(shell which pod)" ] && pod --version | grep '1.7.') || sudo gem install cocoapods
cd ios && pod install --verbose
Expand Down
2 changes: 1 addition & 1 deletion client/ios/Podfile.lock
Expand Up @@ -298,6 +298,6 @@ SPEC CHECKSUMS:
RNViewShot: 5c5b4c5540046e5fb0de4a48a311571816c43c86
yoga: c2c050f6ae6e222534760cc82f559b89214b67e2

PODFILE CHECKSUM: 450510eed5d78b962d2eef4d60e4ca8d3e09655c
PODFILE CHECKSUM: 9b4ffcd849d2693f59a893ee711d4c69e92ea795

COCOAPODS: 1.7.5
4 changes: 2 additions & 2 deletions core/platform/mobile/Makefile
Expand Up @@ -113,7 +113,7 @@ $(BLE_DIR_PATH)/ble.jar: deps.android
$(SED_CMD) 's/(.*GoBridgeImplem.*)/\/\/\1/g' $(ANDROID_PATH)/ble/src/main/java/libp2p/transport/ble/BleManager.java
cd $(ANDROID_PATH) && ./gradlew ble:createJar && cd -

$(ANDROID_BUILD_PATH)/core.aar: deps.android $(CORE_SOURCES)
$(ANDROID_BUILD_PATH)/core.aar: $(CORE_SOURCES) | deps.android
$(SED_CMD) "s/.*\/\/implementation project\(':core'\)/implementation project\(':core'\)/g" $(ANDROID_PATH)/ble/build.gradle
$(SED_CMD) 's/(goBridge = )(null)/\1new GoBridgeImplem\(\)/g' $(ANDROID_PATH)/ble/src/main/java/libp2p/transport/ble/BleManager.java
$(SED_CMD) 's/[\/\/]*(.*GoBridgeImplem.*)/\1/g' $(ANDROID_PATH)/ble/src/main/java/libp2p/transport/ble/BleManager.java
Expand All @@ -127,7 +127,7 @@ deps.ios: deps
.PHONY: build.ios
build.ios: deps.ios $(IOS_BUILD_PATH)/core.framework

$(IOS_BUILD_PATH)/core.framework: deps $(CORE_SOURCES)
$(IOS_BUILD_PATH)/core.framework: $(CORE_SOURCES) | deps
mkdir -p $(IOS_BUILD_PATH)
GO111MODULE=off CGO_CPPFLAGS="$(CGO_CPPFLAGS)" CGO_LDFLAGS="$(IOS_LDFLAGS)" gomobile bind -v $(EXT_LDFLAGS) $(GOMOBILES_OPT) -target=ios -o $(IOS_BUILD_PATH)/core.framework berty.tech/core/platform/mobile/core

Expand Down

0 comments on commit d7e567e

Please sign in to comment.