diff --git a/mix.exs b/mix.exs index 44a8f11..ffa470c 100644 --- a/mix.exs +++ b/mix.exs @@ -51,6 +51,12 @@ defmodule Mix.Tasks.Compile.Nif do exts = Keyword.get(config, :exts, [:c]) compiler = Keyword.get(config, :compilers, ["cc", "gcc", "clang"]) |> find_compiler + if cflags = System.get_env("CFLAGS") do + # FIXME: this isn't going to work too well with quoted spaces + # inside arguments + flags = [flags, String.split(cflags)] + end + # Create the directory (e.g. "priv/") File.mkdir_p!(Path.dirname(file))