forked from ropensci/git2r
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makevars.win
37 lines (28 loc) · 1.35 KB
/
Makevars.win
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
PKG_CPPFLAGS=-Ilibgit2/src -Ilibgit2/include -Ilibgit2/deps/http-parser \
-Ilibgit2/deps/regex -Ilibgit2/deps/libssh2/include \
-I../windows/libz-1.2.8/include -I../windows/libssh2-1.6.0/include
PKG_LIBS=-L. -lmygit \
-L../windows/libz-1.2.8/lib${R_ARCH} \
-L../windows/libssh2-1.6.0/lib${R_ARCH} -lssh2 -lz \
-L../windows/openssl-1.0.2d/lib${R_ARCH} -lssl -lcrypto \
-lgdi32 -lws2_32 -lwinhttp -lrpcrt4 -lole32 -lcrypt32
PKG_CFLAGS=-DWIN32 -D_WIN32_WINNT=0x0501 -D__USE_MINGW_ANSI_STDIO=1 \
-DGIT_WINHTTP -D_FILE_OFFSET_BITS=64 -DGIT_SSH \
-DGIT_USE_NSEC -DGIT_ARCH_$(WIN) -DLIBGIT2_NO_FEATURES_H \
-DR_NO_REMAP
LIBGIT=$(patsubst %.c,%.o,$(filter-out libgit2/src/transports/http.c,$(wildcard \
libgit2/src/*.c libgit2/src/streams/*.c libgit2/src/transports/*.c \
libgit2/src/xdiff/*.c libgit2/src/win32/*.c)))
LIBGIT+=libgit2/src/hash/hash_generic.o
LIBGIT+=libgit2/deps/http-parser/http_parser.o
LIBGIT+=libgit2/deps/regex/regex.o
all: clean winlibs libwinhttp.dll.a libmygit.a
winhttp.def:
cp libgit2/deps/winhttp/winhttp$(WIN).def.in winhttp.def
libmygit.a: $(LIBGIT)
$(AR) rcs libmygit.a $(LIBGIT)
winlibs:
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"
clean:
rm -f *.o libwinhttp.dll.a winhttp.def git2r.dll libmygit.a $(LIBGIT)
.PHONY: all winlibs clean