diff options
author | Ruben Pollan <meskio@sindominio.net> | 2019-08-06 15:36:31 -0400 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2019-08-06 15:45:34 -0400 |
commit | 29e514d384a40b135923f76aca2406b6a3091198 (patch) | |
tree | 61a3005435a9884bbb3eb13f5e0cabcc2c983292 /Makefile | |
parent | d64f45423e037b3506ce45fe94b2b29ce17cfa93 (diff) |
[pkg] Add cross compilation for win and osx
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -63,6 +63,14 @@ build_bitmaskd: build_win: powershell -Command '$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version" ./cmd/*' +CROSS_WIN_FLAGS = CGO_ENABLED=1 GOARCH=386 GOOS=windows CC="/usr/bin/i686-w64-mingw32-gcc" CGO_LDFLAGS="-lssp" CXX="i686-w64-mingw32-c++" +build_cross_win: + $(CROSS_WIN_FLAGS) $(MAKE) build + +CROSS_OSX_FLAGS = MACOSX_DEPLOYMENT_TARGET=10.10 CGO_ENABLED=1 GOOS=darwin CC="o64-clang" +build_cross_osx: + $(CROSS_OSX_FLAGS) $(MAKE) build + clean: @rm -rf build/ |