Skip to content

Commit 28b5a0a

Browse files
committed
Add Windows support to make
1 parent b47176e commit 28b5a0a

3 files changed

Lines changed: 36 additions & 1 deletion

File tree

INSTALL

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,17 @@ and does not currently create key files with restrictive permissions,
7070
making it unsuitable for use on a multi-user system. Windows support
7171
will mature in a future version of git-crypt. Bug reports and patches
7272
are most welcome!
73+
74+
Instructions:
75+
76+
- Download and install 32bit OpenSSL development binaries (the full ~16BM
77+
package) from https://slproweb.com/products/Win32OpenSSL.html.
78+
The 64bit packages do not include linked MinGW libraries! Let it
79+
install to the default location (C:\OpenSSL-Win32) or update
80+
WIN_OPENSSL32_DIR in Makefile.
81+
82+
- Install MinGW from http://www.mingw.org/wiki/Getting_Started and
83+
install the full mingw-developer-toolkit.
84+
85+
- Checkout git-crypt and invoke make in command line to build
86+
the Windows executable.

INSTALL.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,17 @@ and does not currently create key files with restrictive permissions,
6969
making it unsuitable for use on a multi-user system. Windows support
7070
will mature in a future version of git-crypt. Bug reports and patches
7171
are most welcome!
72+
73+
Instructions:
74+
75+
- Download and install 32bit OpenSSL development binaries (the full ~16BM
76+
package) from https://slproweb.com/products/Win32OpenSSL.html.
77+
The 64bit packages do not include linked MinGW libraries! Let it
78+
install to the default location (`C:\OpenSSL-Win32`) or update
79+
`WIN_OPENSSL32_DIR` in Makefile.
80+
81+
- Install MinGW from http://www.mingw.org/wiki/Getting_Started and
82+
install the full `mingw-developer-toolkit`.
83+
84+
- Checkout `git-crypt` and invoke `make` in command line to build
85+
the Windows executable.

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,21 @@ OBJFILES = \
2424
fhstream.o
2525

2626
OBJFILES += crypto-openssl.o
27-
LDFLAGS += -lcrypto
2827

2928
XSLTPROC ?= xsltproc
3029
DOCBOOK_FLAGS += --param man.output.in.separate.dir 1 \
3130
--stringparam man.output.base.dir man/ \
3231
--param man.output.subdirs.enabled 1 \
3332
--param man.authors.section.enabled 1
3433

34+
ifeq ($(OS),Windows_NT)
35+
WIN_OPENSSL32_DIR ?= C:\OpenSSL-Win32
36+
CXXFLAGS += -I$(WIN_OPENSSL32_DIR)\include
37+
LDFLAGS += $(WIN_OPENSSL32_DIR)\lib\MinGW\libeay32.a
38+
else
39+
LDFLAGS += -lcrypto
40+
endif
41+
3542
all: build
3643

3744
#

0 commit comments

Comments
 (0)