From 4ea38e2319482b316a474d6fc82876e6fdcd7911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 14 Dec 2015 18:35:48 +0100 Subject: Fix compilation of NIFs on Windows Thanks to two users of the ninenines/esdl2 project, a correct way to build NIFs on Windows has been found. At the moment we require a specific compiler (MingW's gcc). Maybe we can change this in the future and allow Visual Studio and others. Some small changes have been made to the documentation, and the meaning of one configuration variable has changed to not include the extension (which is decided automatically by Erlang.mk; and configurable separately). Enjoy! --- test/plugin_c_src.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/plugin_c_src.mk') diff --git a/test/plugin_c_src.mk b/test/plugin_c_src.mk index ffce3d8..ac9c2a0 100644 --- a/test/plugin_c_src.mk +++ b/test/plugin_c_src.mk @@ -34,7 +34,11 @@ c-src-nif: build clean-c-src-nif $t test -f $(APP)/c_src/env.mk $t test -f $(APP)/ebin/$(APP).app $t test -f $(APP)/ebin/$(APP).beam +ifeq ($(PLATFORM),msys2) + $t test -f $(APP)/priv/$(APP).dll +else $t test -f $(APP)/priv/$(APP).so +endif $i "Check that the application was compiled correctly" $t $(ERL) -pa $(APP)/ebin/ -eval " \ @@ -55,7 +59,11 @@ c-src-nif: build clean-c-src-nif $t test -f $(APP)/c_src/env.mk $t test -f $(APP)/ebin/$(APP).app $t test -f $(APP)/ebin/$(APP).beam +ifeq ($(PLATFORM),msys2) + $t test -f $(APP)/priv/$(APP).dll +else $t test -f $(APP)/priv/$(APP).so +endif $i "Check that the application was compiled correctly" $t $(ERL) -pa $(APP)/ebin/ -eval " \ @@ -75,7 +83,11 @@ c-src-nif: build clean-c-src-nif $t test ! -e $(APP)/c_src/$(APP).o $t test ! -e $(APP)/ebin/$(APP).app $t test ! -e $(APP)/ebin/$(APP).beam +ifeq ($(PLATFORM),msys2) + $t test ! -e $(APP)/priv/$(APP).dll +else $t test ! -e $(APP)/priv/$(APP).so +endif $i "Distclean the application" $t $(MAKE) -C $(APP) distclean $v -- cgit v1.2.3