Skip to content

Commit 7d9d9fe

Browse files
committed
build on windows
1 parent da36ea3 commit 7d9d9fe

File tree

8 files changed

+13
-8
lines changed

8 files changed

+13
-8
lines changed

Makefile.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
UNAME := $(shell uname)
1111
ifeq ($(UNAME), Linux)
1212
SHELL := /bin/bash
13+
else ifeq ($(findstring MINGW64, $(UNAME)), MINGW64)
14+
# on windows building with msys2/mingw64
15+
SHELL := /bin/bash
1316
endif
1417

1518
# Package-specific substitution variables

deps/bc-bip39

deps/bc-shamir

deps/bc-slip39

deps/bc-ur

src/Makefile.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ OBJS = \
5959
randombytes.o \
6060
hkdf.o
6161

62-
LDFLAGS += -lstdc++
6362
LDLIBS += -lbc-slip39 -lbc-shamir -lbc-crypto-base -lbc-bip39 -lbc-ur -largp
6463

6564
UNAME := $(shell uname)
6665
ifeq ($(UNAME), Linux)
6766
LDLIBS += -lm -lc++ -lc++abi -lgcc_s -lgcc
67+
else ifeq ($(findstring MINGW64, $(UNAME)), MINGW64)
68+
# on windows building with msys2/mingw64
69+
LDLIBS += -lm -lc++ -lws2_32
6870
endif
6971

7072
$(toolname): $(OBJS)
@@ -91,7 +93,7 @@ format-bytewords.o: format-bytewords.hpp format.hpp params.hpp random.hpp
9193
format-bytewords-uri.o: format-bytewords-uri.hpp format.hpp params.hpp random.hpp
9294
format-bytewords-minimal.o: format-bytewords-minimal.hpp format.hpp params.hpp random.hpp
9395

94-
bindir = $(DESTDIR)/$(prefix)/bin
96+
bindir = $(DESTDIR)$(prefix)/bin
9597

9698
.PHONY: install
9799
install: $(toolname)

0 commit comments

Comments
 (0)