From 36e344053a6f03ced5e5bcaf94a35f44490649cc Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Wed, 24 Mar 2021 16:55:14 -0700 Subject: [PATCH] Makefile: windows build. drone.yml: attempt windows build --- .drone.yml | 12 ++++++++++++ .gitignore | 1 + Makefile | 8 +++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 89d4c70..8010dc5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -62,6 +62,18 @@ steps: - gomobile init - make android + - name: build-windows + image: openpriv/mingw-go:2021.03 + volumes: + - name: deps + path: /go + when: + repo: flutter/libcwtch-go + branch: trunk + event: [ push, pull_request ] + commands: + - make windows + - name: notify-email image: drillster/drone-email host: build.openprivacy.ca diff --git a/.gitignore b/.gitignore index c24322b..dbb20d7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ cwtch-sources.jar cwtch.aar libCwtch.h libCwtch.so +libCwtch.dll diff --git a/Makefile b/Makefile index 867b64c..07bb5a3 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,8 @@ linux: libCwtch.so android: cwtch.aar +windows: libCwtch.dll + libCwtch.so: lib.go ./switch-ffi.sh go build -buildmode c-shared -o libCwtch.so @@ -16,5 +18,9 @@ cwtch.aar: lib.go ./switch-gomobile.sh gomobile bind -target android +libCwtch.dll: lib.go + ./switch-ffi.sh + GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc-win32 go build -buildmode c-shared -o libCwtch.dll + clean: - rm -f cwtch.aar cwtch_go.apk libCwtch.h libCwtch.so cwtch-sources.jar + rm -f cwtch.aar cwtch_go.apk libCwtch.h libCwtch.so cwtch-sources.jar libCwtch.dll