yjh0502 / erl-brotli

Brotli encoder NIF for Erlang
Other
29 stars 17 forks source link

Name of compiled .so file depends on name of project directory #2

Closed jamesvl closed 7 years ago

jamesvl commented 7 years ago

Observed Behavior

The Makefile in c_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 for brotli_nif.erl to look for erl-brotli.

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

Solution

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.