2016-04-28 08:09:18 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-12-29 12:16:12 +03:00
|
|
|
mkdir -p build/Linux/x86
|
|
|
|
mkdir -p build/Linux/x86_64
|
|
|
|
|
2016-06-21 15:12:53 +03:00
|
|
|
sources="source/NativeMath.c source/NativeMemory.c source/lol_trig.cpp source/NativeTime.cpp source/NativeDynamicLinking.c source/stdio.c source/stdlib.c source/NEONvsSSE.c source/workarounds.c source/NativeThreading.cpp"
|
2016-04-28 08:09:18 +03:00
|
|
|
|
|
|
|
if [ "$CC" = "" ]; then
|
|
|
|
CC=clang-3.6
|
|
|
|
fi
|
|
|
|
|
2016-06-21 10:53:29 +03:00
|
|
|
CFLAGS="-mssse3 -Wall -Wno-unused-const-variable -Wno-unused-function -Isource -Wno-unknown-attributes"
|
2016-04-28 08:09:18 +03:00
|
|
|
|
2015-12-29 12:16:12 +03:00
|
|
|
#Linux 64
|
2016-04-28 08:09:18 +03:00
|
|
|
$CC -fPIC -m64 $CFLAGS -c $sources
|
2016-04-28 08:11:15 +03:00
|
|
|
$CC -shared -m64 -Wl,-soname,libNativePath.so -o libNativePath.so *.o
|
2016-04-28 08:09:18 +03:00
|
|
|
ar rcs libNativePath.a *.o
|
2016-04-28 08:11:15 +03:00
|
|
|
mv libNativePath.so build/Linux/x86_64/
|
2016-04-28 08:09:18 +03:00
|
|
|
mv libNativePath.a build/Linux/x86_64/
|
2015-12-29 12:16:12 +03:00
|
|
|
rm *.o
|
|
|
|
|
|
|
|
#Linux 32
|
2016-06-22 08:11:06 +03:00
|
|
|
$CC -fPIC -m32 $CFLAGS -c $sources
|
2016-04-28 08:11:15 +03:00
|
|
|
$CC -shared -m32 -Wl,-soname,libNativePath.so -o libNativePath.so *.o
|
2016-04-28 08:09:18 +03:00
|
|
|
ar rcs libNativePath.a *.o
|
2016-04-28 08:11:15 +03:00
|
|
|
mv libNativePath.so build/Linux/x86/
|
2016-04-28 08:09:18 +03:00
|
|
|
mv libNativePath.a build/Linux/x86/
|
|
|
|
rm *.o
|