Suppose we have a project with the following structure
.
├── CHANGELOG.md
├── LICENSE
├── README.md
├── Setup.hs
├── app
│ └── Main.hs
├── cbits
│ ├── include
│ │ └── libCbits.c
│ └── lib
│ └── libCbits.so
├── dummy.cabal
├── package.yaml
├── src
├── stack.yaml
└── stack.yaml.lock
The file libCbits.c needs to be compiled to a .so file every time it updates with which Main.hs be linked.
I've tried adding extra-lib-dirs and extra-include-dirs to package.yml, which did not work.
How do I achieve this goal?
libCbitsfollowing Implementing a JIT. I've tried statically compiling C bits but it didn't work. I am not quite sure if I am doing it the right way though.