forked from kemonomachi/experhash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
70 lines (59 loc) · 1.28 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
69
70
defmodule ExPerHash.Mixfile do
use Mix.Project
def project do
[
app: :experhash,
name: "ExPerHash",
version: "0.1.1",
elixir: "~> 1.0",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
compilers: [:make, :elixir, :app],
package: package(),
aliases: aliases(),
deps: deps()
]
end
def application do
[applications: [:logger]]
end
defp aliases do
[clean: ["clean", "clean.make"]]
end
defp deps do
[]
end
defp package do
[
files: [
"cpp",
"lib",
"priv",
"mix.exs",
"README*",
"LICENSE*",
],
maintainers: ["Ookami Kenrou <[email protected]>"],
licenses: ["WTFPL"],
links: %{"GitHub" => "https://github.com/kemonomachi/experhash"}
]
end
end
defmodule Mix.Tasks.Compile.Make do
@shortdoc "Compile C++ code"
use Mix.Task
def run(_) do
{result, _error_code} = System.cmd("make", [], stderr_to_stdout: true)
Mix.shell.info result
:ok
end
end
defmodule Mix.Tasks.Clean.Make do
@shortdoc "Delete generated C++ files"
use Mix.Task
def run(_) do
{result, _error_code} = System.cmd("make", ['clean'], stderr_to_stdout: true)
Mix.shell.info result
:ok
end
end