Jbuilder: compile C executables

Is there a way to make jbuilder compile a C executable? I tried to add a rule

(rule
 ((targets (p.exe))
  (deps    (p.c))
  (action  (run ${!CC} -o p.exe p.c -lm))))

but is does not work because ${CC} contains compiler flags which are treated as part of the program name (and the ! does not split the components).

2 Likes

Given the absence of answer, I opened an issue.

2 Likes