...
1#!/bin/bash
2
3# Copyright 2022 Google LLC.
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# https://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16set -eu
17
18# Create a folder to hold the binaries
19rm -rf ./build/bin/darwin_amd64
20mkdir -p ./build/bin/darwin_amd64
21
22# Build the signer binary
23cd ./internal/signer/darwin
24go build
25mv darwin ./../../../build/bin/darwin_amd64/ecp
26cd ./../../..
27
28# Build the signer library
29go build -buildmode=c-shared -o build/bin/darwin_amd64/libecp.dylib cshared/main.go
30rm build/bin/darwin_amd64/libecp.h
View as plain text