TattdCodeMonkey / crc

CRC library in elixir
MIT License
26 stars 14 forks source link

Compilation should happen in `_build` folder rather than `src` folder to support e.g. Nerves #31

Closed Qqwy closed 4 years ago

Qqwy commented 5 years ago

Originating issue: https://github.com/nerves-project/nerves/issues/444

This is an issue with the crc library. It builds the NIF in the source directory and not under _build. Since the source directory is shared between all targets and environments, make doesn't know that it needs to be rebuilt. This is a common problem with NIF projects. Could you file an issue with crc or PR an update to its Makefile to build under _build? The Elixir Circuits projects are NIFs that have Makefiles that put object files and libraries in the right place. See https://github.com/elixir-circuits/circuits_spi/blob/master/Makefile#L21 for an example.

It would be really cool if crc's Makefile were to be altered, so that it is possible to compile for various targets without having to manually clean up the built files in between :slightly_smiling_face: .

TattdCodeMonkey commented 5 years ago

Thanks for reporting. I'll try to find some time to update the Makefiles.

TattdCodeMonkey commented 5 years ago

I haven't forgotten about this, I just don't have any available time to spend on it ☹️