-
Notifications
You must be signed in to change notification settings - Fork 6
/
mix.exs
68 lines (56 loc) · 1.59 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
defmodule Mix.Tasks.Compile.Erlaudio do
@shortdoc "Compiles Erlaudio"
def run(_) do
{result, _error_code} = if match? {:win32, _}, :os.type do
System.cmd("nmake", ["/F", "Makefile.win", "priv\\erlaudio_drv.dll"], stderr_to_stdout: true)
else
System.cmd("make", ["priv/erlaudio_drv.so"], stderr_to_stdout: true)
end
Mix.shell.info result
:ok
end
def clean() do
{result, _error_code} = if match? {:win32, _}, :os.type do
System.cmd("nmake", ["/F", "Makefile.win", "clean"], stderr_to_stdout: true)
else
System.cmd("make", ["clean"], stderr_to_stdout: true)
end
Mix.shell.info result
end
end
defmodule Mix.Tasks.Edoc do
@shortdoc "Make docs using edoc (erlang docs)"
def run(_) do
{result, _error_code} = System.cmd("rebar", ["doc"], stderr_to_stdout: true)
Mix.shell.info result
:ok
end
end
defmodule Erlaudio.Mixfile do
use Mix.Project
def project do
[app: :erlaudio,
description: "Erlang audio bindings to portaudio",
package: package,
version: "0.2.3",
language: :erlang,
compilers: [:erlaudio, :erlang, :app],
aliases: [docs: ["edoc"]],
deps: deps,
escript: [main_module: :erlaudio_escript, language: :erlang, app: nil]]
end
def application do
[applications: [], mod: []]
end
defp deps do
[]
end
defp package do
%{
contributors: ["Alex Songe"],
files: ~w"c_src include priv src Makefile Makefile.win mix.exs README* CHANGELOG* LICENSE*",
licenses: ["Apache 2"],
links: %{"Github" => "https://github.com/asonge/erlaudio"}
}
end
end