Generate Makefiles
felixSchl opened this issue · 3 comments
When compiling a project, also generate a Makefile that essentially replaces this part:
https://github.com/felixSchl/purescript-c/blob/master/Makefile#L28-L35
with something dynamic.
Something like this might suffice, but the problem here are the relative paths to the purescript runtime's (and its' dependencies) object and header files.
I am thinking producing a shared object for the runtime plus self-contained header-file might be the best option. This would mean making some of the structs opaque and removing the imports of 3rd party libraries currently included in "purescript.h"?
This is sorted and can be seen in action in the examples. It assumes a source distribution of purec
. Downstream tools would set the path to the checkout via PUREC_DIR
and include mk/target.mk
which provides a macro for generating target rules.