diff options
author | Loïc Hoguin <[email protected]> | 2015-12-14 18:35:48 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-12-14 18:37:56 +0100 |
commit | 4ea38e2319482b316a474d6fc82876e6fdcd7911 (patch) | |
tree | 56b8a02a842672d03e961e309dc6a4982f98d908 /test | |
parent | 0f11e62b647c735bb13f957eeec9586be7e7b51a (diff) | |
download | erlang.mk-4ea38e2319482b316a474d6fc82876e6fdcd7911.tar.gz erlang.mk-4ea38e2319482b316a474d6fc82876e6fdcd7911.tar.bz2 erlang.mk-4ea38e2319482b316a474d6fc82876e6fdcd7911.zip |
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!
Diffstat (limited to 'test')
-rw-r--r-- | test/plugin_c_src.mk | 12 |
1 files changed, 12 insertions, 0 deletions
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 |