-
Notifications
You must be signed in to change notification settings - Fork 4
/
rebar.config
116 lines (102 loc) · 5.52 KB
/
rebar.config
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
%% -*- erlang -*-
%% Config file for epx-application
%%
%% efnttool require: freetype
%% ddscomp require: libpng libungif ffmpeg (swscale/avformat/avutil)
%%
{erl_opts, [debug_info, fail_on_warning]}.
{deps, [
{tree_db, ".*", {git, "https://github.com/tonyrog/tree_db.git"}}
]}.
%% -framework CoreFoundation -framework Foundation -framework AppKit
%% -- to many warnings i objective-C
{port_env, [
{"CFLAGS", "$CFLAGS -Wall -Wextra -Wswitch-enum -Wswitch-default -fno-common -O3"},
{"(.*-i686-.*linux)", "CFLAGS","$CFLAGS -msse4.1 -DXCB -DX11 -DHAVE_INPUT_EVENT -DFB -DHAVE_MTRR"},
{"(.*-i686-.*linux)", "CCFLAGS","$CCFLAGS -msse4.1 -DXCB -DX11 -DHAVE_INPUT_EVENT -DFB -DHAVE_MTRR"},
{"(.*-i386-.*linux)", "CFLAGS","$CFLAGS -msse4.1 -DXCB -DX11 -DHAVE_INPUT_EVENT -DFB -DHAVE_MTRR"},
{"(.*-i386-.*linux)", "CCFLAGS","$CCFLAGS -msse4.1 -DXCB -DX11 -DHAVE_INPUT_EVENT -DFB -DHAVE_MTRR"},
{"(.*-x86_64-.*linux)", "CFLAGS","$CFLAGS -msse4.1 -DXCB -DX11 -DHAVE_INPUT_EVENT -DFB -DHAVE_MTRR"}, %% -mavx2
{"(.*-x86_64-.*linux)", "CCFLAGS","$CCFLAGS -msse4.1 -DXCB -DX11 -DHAVE_INPUT_EVENT -DFB -DHAVE_MTRR"}, %% -mavx2
{"(.*-arm.*linux)", "CFLAGS", "$CFLAGS -DXCB -DX11 -DHAVE_INPUT_EVENT -DFB"},
{"armv7l-.*gnueabi-32", "CFLAGS", "$CFLAGS -mfloat-abi=softfp -mfpu=neon -flax-vector-conversions -D__NEON__"},
{"armv7l-.*gnueabihf-32", "CFLAGS", "$CFLAGS -mfpu=neon -flax-vector-conversions -D__NEON__"},
{"(.*-arm-.*gnueabihf-32)", "CFLAGS", "$CFLAGS -mfpu=neon -flax-vector-conversions -D__NEON__"},
{"(linux)", "XLDFLAGS", "$XLDFLAGS -L/usr/lib -lX11 -lxcb"},
{"(linux)", "LDFLAGS", "$LDFLAGS $XLDFLAGS"},
{"(darwin.*-32)", "CFLAGS", "$CFLAGS -ObjC -DX11 -DMAC_OS_X"},
{"(darwin.*-32)", "XLDFLAGS", "$XLDFLAGS -lobjc -L/usr/X11R6/lib -lX11 -framework Carbon -framework CoreFoundation -framework Foundation -framework AppKit"},
{"(darwin.*-32)", "LDFLAGS", "$LDFLAGS $XLDFLAGS"},
%% Yosemite
{"(darwin14.*-64)", "CFLAGS", "$CFLAGS -arch i386 -arch x86_64 -I/usr/X11R6/include -DX11 -x objective-c"}, %% -DHAVE_OPENGL
{"(darwin14.*-64)", "XLDFLAGS", "$XLDFLAGS -lobjc -L/usr/X11R6/lib -lX11 -framework Carbon -framework CoreFoundation -framework Foundation -framework AppKit"},
%% El Captain
{"(darwin15.*-64)", "CFLAGS", "$CFLAGS -arch i386 -arch x86_64 -I/usr/X11R6/include -DX11 -x objective-c"}, %% -DHAVE_OPENGL
{"(darwin15.*-64)", "XLDFLAGS", "$XLDFLAGS -lobjc -L/usr/X11R6/lib -lX11 -framework Carbon -framework CoreFoundation -framework Foundation -framework AppKit"},
%% Sierra
{"(darwin16.7.*-64)", "CFLAGS", "$CFLAGS -arch i386 -arch x86_64 -I/usr/X11/include -DX11 -x objective-c"},
{"(darwin16.7.*-64)", "XLDFLAGS", "$XLDFLAGS -lobjc -L/usr/X11/lib -lX11 -framework Carbon -framework Cocoa -framework Foundation -framework AppKit"},
{"(darwin.*-64)", "LDFLAGS", "$LDFLAGS -arch i386 -arch x86_64 $XLDFLAGS"}
]}.
{port_specs, [
{"(linux)","priv/epx_nif.so",
[
"c_src/epx_debug.c", "c_src/epx_hash.c", "c_src/epx_dict.c",
"c_src/epx_pixel.c", "c_src/epx_t2d.c", "c_src/epx_pixmap.c",
"c_src/epx_anim.c", "c_src/epx_canvas.c",
"c_src/epx_line.c", "c_src/epx_ellipse.c", "c_src/epx_draw.c",
"c_src/epx_backend.c", "c_src/epx_backend_x11.c",
"c_src/epx_backend_xcb.c",
"c_src/epx_backend_fb.c","c_src/epx_backend_none.c",
"c_src/epx_window.c","c_src/epx_font.c",
"c_src/epx_gl.c","c_src/epx_gc.c","c_src/epx_simd.c",
"c_src/epx_simd_emu.c", "c_src/epx_simd_mmx.c",
"c_src/epx_simd_sse2.c","c_src/epx_simd_avx2.c",
"c_src/epx_simd_neon.c",
"c_src/epx.c", "c_src/epx_lock.c",
"c_src/epx_nif.c"
]},
{"(darwin.*-32)","priv/epx_nif.so",
[
"c_src/epx_debug.c","c_src/epx_hash.c","c_src/epx_dict.c",
"c_src/epx_pixel.c","c_src/epx_t2d.c","c_src/epx_pixmap.c",
"c_src/epx_anim.c", "c_src/epx_canvas.c",
"c_src/epx_line.c", "c_src/epx_ellipse.c","c_src/epx_draw.c",
"c_src/epx_backend.c","c_src/epx_backend_x11.c",
"c_src/epx_backend_macos.c","c_src/epx_backend_none.c",
"c_src/epx_window.c","c_src/epx_font.c",
"c_src/epx_gl.c","c_src/epx_gc.c","c_src/epx_simd.c",
"c_src/epx_simd_emu.c", "c_src/epx_simd_mmx.c",
"c_src/epx_simd_sse2.c", "c_src/epx_simd_avx2.c",
"c_src/epx.c", "c_src/epx_lock.c",
"c_src/epx_nif.c"
]},
{"(darwin.*-64)","priv/epx_nif.so",
[
"c_src/epx_debug.c","c_src/epx_hash.c","c_src/epx_dict.c",
"c_src/epx_pixel.c","c_src/epx_t2d.c","c_src/epx_pixmap.c",
"c_src/epx_anim.c","c_src/epx_canvas.c",
"c_src/epx_line.c", "c_src/epx_ellipse.c","c_src/epx_draw.c",
"c_src/epx_backend.c","c_src/epx_backend_x11.c",
"c_src/epx_backend_cocoa.c",
"c_src/epx_backend_none.c",
"c_src/epx_window.c","c_src/epx_font.c",
"c_src/epx_gl.c","c_src/epx_gc.c","c_src/epx_simd.c",
"c_src/epx_simd_emu.c", "c_src/epx_simd_mmx.c",
"c_src/epx_simd_sse2.c","c_src/epx_simd_avx2.c",
"c_src/epx.c", "c_src/epx_lock.c",
"c_src/epx_nif.c"
]}
]}.
%% git describe --always --tags
%% {"CFG_CFLAGS", "-I`pwd`/include"},
{post_hooks, [
{compile, "mv c_src/epx_nif.o c_src/epx_nif.p"},
{compile, "rm -f priv/epx.a"},
{compile, "ar rcv priv/epx.a c_src/*.o"},
{compile, "ranlib priv/epx.a"},
{compile, "mv c_src/epx_nif.p c_src/epx_nif.o"},
{compile, "sed -e 's;%EPX_VSN%;1.0;' -e 's;%CFLAGS%;-I'\"${PWD}\"'/include;' -e 's;%LDFLAGS%;'\"${PWD}/priv/epx.a -lm ${XLDFLAGS}\"';' < c_src/epx-config.src > priv/epx-config"},
{compile, "chmod +x priv/epx-config"}
]}.
%% {edoc_opts, [{doclet, edown_doclet}]}.