I am writing an FFI-heavy library that uses inline-c
, and the build process is:
- run GHC on the
inline-c
files, produce C - compile C produced in previous step into dynamic libraries
- compile Haskell interface while linking both the object files produced in step 2 and the dynlibs of the wrapped library.
QUESTION: Currently I'm doing the above in a makefile (see https://github.com/ocramz/petsc-hs/blob/master/makefile ), but I'd like to package it up in a Cabal file (working version : https://github.com/ocramz/petsc-hs/blob/master/petsc-hs.cabal).
SUB-QUESTIONS:
- How does one control the build/link sequence in Cabal?
- Are relative paths supported in Cabal? couldn't find this mentioned in the guide and bash-like
~
doesn't work
Thank you in advance for all pointers
inline-c
. What exactly doesn't work? – ErikR