-
Notifications
You must be signed in to change notification settings - Fork 15
/
rebar.config
33 lines (25 loc) · 1.92 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
{erl_opts, [debug_info,
{src_dirs, ["src"]}]}.
{eunit_opts, [verbose]}.
{port_specs, [{"priv/numer_nifs.so", ["c_src/*.cpp"]}]}.
%% WARNING: Never been tested on Linux !
{port_envs, [{"linux", "CXX", "clang++"},
{"linux", "NVCCFLAGS", "-arch=sm_20 -O2 -c -Xcompiler -shared -Xcompiler -fPIC"},
{"linux", "LDFLAGS", "$LDFLAGS c_src/numer_ops.o -lcuda -L/usr/local/cuda/lib64 -lcudart -lstdc++"},
{"linux", "CXXFLAGS", "$CXXFLAGS -O2 -I/usr/local/cuda/include"},
{"win32", "CC", "cl.exe"},
{"win32", "CXX", "cl.exe"},
{"win32", "LINKER", "link.exe"},
{"win32", "CXXFLAGS", "$CXXFLAGS -O2 /I %CUDA_HOME%\\include"},
{"win32", "LDFLAGS", "$LDFLAGS c_src/numer_nifs.o c_src/numer_blas_nifs.o c_src/numer_kernel_nifs.o c_src/numer_blas.o c_src/numer_cublas_wrappers.o c_src/numer_float_buffer.o c_src/numer_kernels.o c_src/numer_matrix_float_buffer.o c_src/numer_ml.o c_src/numer_ml_nifs.o /LIBPATH:%CUDA_HOME%\\lib\\Win32 cuda.lib cudart.lib cublas.lib"},
{"darwin", "CXX", "gcc"},
{"darwin", "CC", "gcc"},
{"darwin", "LDFLAGS", "$LDFLAGS -m64 -bundle -flat_namespace -undefined suppress -fno-common -fPIC -Wall c_src/numer_blas.o c_src/numer_cublas_wrappers.o c_src/numer_float_buffer.o c_src/numer_kernels.o c_src/numer_matrix_float_buffer.o c_src/numer_ml.o -L/usr/local/cuda/lib/ -lcuda -lcudart -lcublas -lstdc++"},
{"darwin", "CXXFLAGS", "$CXXFLAGS -m64 -bundle -flat_namespace -undefined suppress -fno-common -O3 -fPIC -I/usr/local/cuda/include/"}
]}.
{pre_hooks, [{"win32", clean, "del c_src\\*.o"},
{"win32", compile, "cuda_compile.bat"},
{"linux", clean, "make -C c_src clean"},
{"linux", compile, "make -C c_src all"},
{"darwin", clean, "make -C c_src clean"},
{"darwin", compile, "make -C c_src all"}]}.