Closed jamesvl closed 7 years ago
The Makefile in c_src sets the project name based on the parent directory name.
Makefile
c_src
For most checkouts (via Git) this would be erl-brotli. This is fine and in line with the update I just made for brotli_nif.erl to look for erl-brotli.
erl-brotli
brotli_nif.erl
However, if someone uses this library (say, in a Mix project) and names it brotli, then the compiled file will be brotli.so and not erl-brotli.so
brotli
brotli.so
erl-brotli.so
Change the Makefile and remove line 6 and change line 7 to just assign a static string:
PROJECT = "erl-brotli"
Then the compiled library will be named the same thing, regardless of its directory name.
Observed Behavior
The
Makefile
inc_src
sets the project name based on the parent directory name.For most checkouts (via Git) this would be
erl-brotli
. This is fine and in line with the update I just made forbrotli_nif.erl
to look forerl-brotli
.However, if someone uses this library (say, in a Mix project) and names it
brotli
, then the compiled file will bebrotli.so
and noterl-brotli.so
Solution
Change the Makefile and remove line 6 and change line 7 to just assign a static string:
Then the compiled library will be named the same thing, regardless of its directory name.