-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
32 lines (27 loc) · 976 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
build:
make -C go-ethereum dev-station
.PHONY: universal xcframework clean
fat-libraries:
make -C go-ethereum dev-station-fat
clean:
rm -rf *.a *.xcframework
# https://rhonabwy.com/2023/02/10/creating-an-xcframework/
xcframework: fat-libraries
rm -rf EVMBridgeLibrary.xcframework
xcodebuild -create-xcframework \
-library libevm-bridge.a \
-headers EVMBridge \
-output EVMBridgeLibrary.xcframework
rm -f libevm-bridge.a
# Ask on swift forums why have to do it separately
# I think becuase the release is a symlink
universal: fat-binaries xcframework
rm -rf .build
swift build -c release --arch arm64
sleep 5
mv .build/arm64-apple-macosx/release/evm-dev-station .build/evm-dev-station-arm64
swift build -c release --arch x86_64
sleep 5
mv .build/x86_64-apple-macosx/release/evm-dev-station .build/evm-dev-station-x86
lipo -create -output evm-dev-station .build/evm-dev-station-x86 .build/evm-dev-station-arm64
mv evm-dev-station ../evm-dev-station-binaries