File tree 2 files changed +54
-0
lines changed
Samples/Beyond.NET.Sample.Go
2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ cd " ../Beyond.NET.Sample.Managed"
6
+ ./publish_managed
7
+
8
+ cd " ../../Generator/Beyond.NET.CodeGenerator.CLI"
9
+ ./publish_linux_arm64
10
+
11
+ cd " ../../Samples"
12
+ echo " Generating .NET Native Bindings"
13
+ ../Generator/Beyond.NET.CodeGenerator.CLI/bin/Release/linux-arm64/publish/beyondnetgen " Beyond.NET.Sample_Config.json"
14
+
15
+ cd " Beyond.NET.Sample.Native"
16
+ ./publish_linux_arm64
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ CGO_ENABLED=1
6
+ export CGO_ENABLED
7
+
8
+ GOOS=linux
9
+ export GOOS
10
+
11
+ CC=clang
12
+ export CC
13
+
14
+ go clean -modcache
15
+
16
+ OUTPUT_PRODUCT_NAME=" gobeyond"
17
+ LIBRARY_NAME=" BeyondDotNETSampleNative"
18
+ LIBRARY_FILE_NAME=" lib${LIBRARY_NAME} .so"
19
+
20
+ BUILD_DIR=" bin"
21
+
22
+ echo " Making directory for ${OUTPUT_PRODUCT_NAME} build"
23
+ mkdir -p " ${BUILD_DIR} "
24
+
25
+ OUTPUT_FILE_PATH_ARM64=" ${OUTPUT_PRODUCT_NAME} "
26
+
27
+ ./build_dependencies_linux_arm64
28
+
29
+ rm -f " ${LIBRARY_FILE_NAME} "
30
+ ln -s " ../Beyond.NET.Sample.Native/bin/Release/linux-arm64/publish/${LIBRARY_FILE_NAME} " " ${LIBRARY_FILE_NAME} "
31
+
32
+ cd " ${BUILD_DIR} "
33
+
34
+ echo " Copying native library"
35
+ cp " ../../Beyond.NET.Sample.Native/bin/Release/linux-arm64/publish/${LIBRARY_FILE_NAME} " " ${LIBRARY_FILE_NAME} "
36
+
37
+ echo " Building ${OUTPUT_PRODUCT_NAME} for ARM64"
38
+ GOARCH=arm64 go build -o " ${OUTPUT_FILE_PATH_ARM64} " ../
You can’t perform that action at this time.
0 commit comments