Skip to content

Commit e8cc90f

Browse files
committed
Windows: go back to gifski-devel
1 parent bc9ce66 commit e8cc90f

File tree

3 files changed

+30
-30
lines changed

3 files changed

+30
-30
lines changed

src/Makevars.win

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
1-
RWINLIB = ../windows/gifski-0.8.4
2-
PKG_CPPFLAGS= -I$(RWINLIB)/include
3-
PKG_LIBS= -L$(RWINLIB)/lib${R_ARCH} \
4-
-lgifski -lws2_32 -ladvapi32 -luserenv -ldbghelp
1+
TARGET = $(subst 64,x86_64,$(subst 32,i686,$(WIN)))-pc-windows-gnu
2+
LIBDIR = myrustlib/target/$(TARGET)/release
3+
STATLIB = $(LIBDIR)/myrustlib.lib
4+
PKG_LIBS = -L$(LIBDIR) -lmyrustlib -lws2_32 -ladvapi32 -luserenv -ldbghelp
55

6-
all: clean winlibs
6+
# These can also be set in ~/.cargo/config
7+
export CARGO_TARGET_I686_PC_WINDOWS_GNU_LINKER=$(CC)
8+
export CC=$(CC)
9+
export AR=$(AR)
710

8-
winlibs:
9-
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"
11+
# This bypasses the exception stuff
12+
#export CARGO_TARGET_I686_PC_WINDOWS_GNU_RUSTFLAGS=-C panic=abort
13+
14+
all: clean
15+
16+
$(SHLIB): $(STATLIB)
17+
18+
$(STATLIB):
19+
cargo build --target=$(TARGET) --release --manifest-path=myrustlib/Cargo.toml
1020

1121
clean:
12-
rm -f $(SHLIB) $(OBJECTS)
22+
rm -Rf $(SHLIB) $(STATLIB) $(OBJECTS) myrustlib/target

src/Makevars.win.rust

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/Makevars.win.rwinlib

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
RWINLIB = ../windows/gifski-0.8.4
2+
PKG_CPPFLAGS= -I$(RWINLIB)/include
3+
PKG_LIBS= -L$(RWINLIB)/lib${R_ARCH} \
4+
-lgifski -lws2_32 -ladvapi32 -luserenv -ldbghelp
5+
6+
all: clean winlibs
7+
8+
winlibs:
9+
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"
10+
11+
clean:
12+
rm -f $(SHLIB) $(OBJECTS)

0 commit comments

Comments
 (0)