-
Notifications
You must be signed in to change notification settings - Fork 4
/
rebar_i386.config
65 lines (61 loc) · 2.97 KB
/
rebar_i386.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
%% -*- erlang -*-
%% Config file for epx-application 32-bit application build
%%
{erl_opts, [debug_info, fail_on_warning]}.
%% -- to many warnings i objective-C
{port_env, [
{"CFLAGS", "$CFLAGS -m32 -Wall -Wextra -Wswitch-enum -Wswitch-default -fno-common"},
{"LDFLAGS", "$LDFLAGS -m32"},
{"ERL_LDFLAGS", ""}, %% can not and will not link with erl_interface/ei 64 bit versions
{"(linux)", "CFLAGS","$CFLAGS -msse2 -O3 -DX11 -DHAVE_INPUT_EVENT -DFB -DHAVE_MTRR"},
{"(linux)", "CCFLAGS","$CCFLAGS -msse2 -O3 -DX11 -DHAVE_INPUT_EVENT -DFB -DHAVE_MTRR"},
{"(linux)", "XLDFLAGS", "$XLDFLAGS -L/usr/lib -lX11"},
{"(linux)", "LDFLAGS", "$LDFLAGS $XLDFLAGS"},
{"(darwin)", "CFLAGS", "$CFLAGS -ObjC -DX11 -DMAC_OS_X"},
{"(darwin15.*)", "XLDFLAGS", "$XLDFLAGS -lobjc -L/usr/X11R6/lib -lX11 -framework Carbon -framework CoreFoundation -framework Foundation -framework AppKit"},
{"(darwin16.*)", "XLDFLAGS", "$XLDFLAGS -lobjc -L/usr/X11/lib -lX11 -framework Carbon -framework CoreFoundation -framework Foundation -framework AppKit"},
{"(darwin)", "LDFLAGS", "$LDFLAGS $XLDFLAGS"}
]}.
{port_specs, [
{"(linux)","priv/i386/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_pixmap.c","c_src/epx_anim.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_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_neon.c",
"c_src/epx.c", "c_src/epx_lock.c",
"c_src/epx_nif.c"
]},
{"(darwin)","priv/i386/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_pixmap.c","c_src/epx_anim.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_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.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/i386/epx.a"},
{compile, "ar rcv priv/i386/epx.a c_src/*.o"},
{compile, "ranlib priv/i386/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/i386/epx.a -lm ${XLDFLAGS}\"';' < c_src/epx-config.src > priv/i386/epx-config"},
{compile, "chmod +x priv/i386/epx-config"}
]}.
%% {edoc_opts, [{doclet, edown_doclet}]}.