Skip to content

Commit

Permalink
deps/gmp: add hard link for win
Browse files Browse the repository at this point in the history
  • Loading branch information
inkydragon committed Jul 5, 2022
1 parent d2d042e commit be65cdf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion deps/gmp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,17 @@ ifeq ($(OS),$(BUILD_OS))
endif
echo 1 > $@

# Windows doesn't like soft link, use hard link
ifeq ($(OS), WINNT)
WIN_ADD_HARD_LINK_CMD := cp -f --link $(build_bindir)/libgmp-*.dll $(build_bindir)/libgmp.dll
else
WIN_ADD_HARD_LINK_CMD := true -ignore
endif
$(eval $(call staged-install, \
gmp,gmp-$(GMP_VER), \
MAKE_INSTALL,,, \
$$(INSTALL_NAME_CMD)libgmp.$$(SHLIB_EXT) $$(build_shlibdir)/libgmp.$$(SHLIB_EXT)))
$$(WIN_ADD_HARD_LINK_CMD) && \
$$(INSTALL_NAME_CMD)libgmp.$$(SHLIB_EXT) $$(build_shlibdir)/libgmp.$$(SHLIB_EXT)))

clean-gmp:
-rm -f $(BUILDDIR)/gmp-$(GMP_VER)/build-configured $(BUILDDIR)/gmp-$(GMP_VER)/build-compiled
Expand Down

0 comments on commit be65cdf

Please sign in to comment.