Packages

Interfaces Elixir with C/C++ code in a user-friendly way! Based on Erlang-ports. Provides a few Mix-tasks to kickstart the development process.

Current section

Files

Jump to
cure lib cure.make.ex
Raw

lib/cure.make.ex

defmodule Mix.Tasks.Cure.Make do
use Mix.Task
@shortdoc "Uses Makefile (in c_src directory) to compile your C-source code."
@source_dir Path.expand("../../c_src")
@opts [stderr_to_stdout: true]
@doc """
Compiles the C-files located in the ./c_src directory.
"""
def run(_args) do
{output, _} = System.cmd("make", ["all", "-C", @source_dir], @opts)
IO.puts output
end
end