forked from sinkingsugar/NativePath
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuildLinux.sh
More file actions
executable file
·28 lines (22 loc) · 889 Bytes
/
buildLinux.sh
File metadata and controls
executable file
·28 lines (22 loc) · 889 Bytes
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
#!/bin/sh
mkdir -p build/Linux/x86
mkdir -p build/Linux/x86_64
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"
if [ "$CC" = "" ]; then
CC=clang-3.6
fi
CFLAGS="-mssse3 -Wall -Wno-unused-const-variable -Wno-unused-function -Isource -Wno-unknown-attributes"
#Linux 64
$CC -fPIC -m64 $CFLAGS -c $sources
$CC -shared -m64 -Wl,-soname,libNativePath.so -o libNativePath.so *.o
ar rcs libNativePath.a *.o
mv libNativePath.so build/Linux/x86_64/
mv libNativePath.a build/Linux/x86_64/
rm *.o
#Linux 32
$CC -fPIC -m32 $CFLAGS -c $sources
$CC -shared -m32 -Wl,-soname,libNativePath.so -o libNativePath.so *.o
ar rcs libNativePath.a *.o
mv libNativePath.so build/Linux/x86/
mv libNativePath.a build/Linux/x86/
rm *.o