Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 521

How do I have dune execute a shell command as a dependency to a library?

$
0
0

@bobpoekert wrote:

I have a library that has some C stubs which needs to be linked against some other C code that I need to compile directly with gcc.

I’m trying to do it like this, but the rule that calls gcc doesn’t seem to be executing:

(rule
    (targets libart.o)
    (deps (:c art.c) (:h art.h))
    (action 
        (run gcc -c -std=c99 -D_GNU_SOURCE -Wall -Werror -O3 -g %{c} -o %{targets})))

(library
    (name art)
    (preprocessor_deps libart.o)
    (c_flags -I lib/)
    (c_library_flags ./lib/libart.o)
    (c_names art_stubs))

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 521

Trending Articles