diff --git a/Makefile b/Makefile index 33887b49b..14598cbdc 100644 --- a/Makefile +++ b/Makefile @@ -117,10 +117,19 @@ deps: $(NIM_BINARY) $(NIMBLE_DIR) nimbus.nims nat-libs: | libminiupnpc.a libnatpmp.a libminiupnpc.a: | deps +ifeq ($(OS), Windows_NT) + + [ -e vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc/$@ ] || \ + $(MAKE) -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc -f Makefile.mingw CC=gcc init $@ $(HANDLE_OUTPUT) +else + $(MAKE) -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc $@ $(HANDLE_OUTPUT) +endif libnatpmp.a: | deps +ifeq ($(OS), Windows_NT) + + $(MAKE) -C vendor/nim-nat-traversal/vendor/libnatpmp CC=gcc CFLAGS="-Wall -Os -DWIN32 -DNATPMP_STATICLIB -DENABLE_STRNATPMPERR" $@ $(HANDLE_OUTPUT) +else + $(MAKE) -C vendor/nim-nat-traversal/vendor/libnatpmp $@ $(HANDLE_OUTPUT) +endif #- depends on Git submodules being initialised #- fakes a Nimble package repository with the minimum info needed by the Nim compiler diff --git a/vendor/nim-nat-traversal b/vendor/nim-nat-traversal index 0bcb394f5..527932371 160000 --- a/vendor/nim-nat-traversal +++ b/vendor/nim-nat-traversal @@ -1 +1 @@ -Subproject commit 0bcb394f5787bde62e3c275e185498e2de20d637 +Subproject commit 527932371f5e4866a1fa7b86c9ac33dcef3f228c