|
|
@@ -16,45 +16,38 @@ rem Reset error level
|
|
|
type nul
|
|
|
|
|
|
rem ARMv8
|
|
|
-if not exist android\arm64-v8a\libluajit.a (
|
|
|
- wsl make clean
|
|
|
- if "%ERRORLEVEL%" == "1" goto :error
|
|
|
- wsl make HOST_LUA=luajit.exe HOST_CC=clang.exe HOST_CFLAGS=-D_CRT_SECURE_NO_WARNINGS CC=clang CROSS=aarch64-linux-android- STATIC_CC=aarch64-linux-android21-clang "DYNAMIC_CC=aarch64-linux-android21-clang -fPIC" "TARGET_AR=aarch64-linux-android-ar.exe rcus" TARGET_LD=aarch64-linux-android21-clang TARGET_STRIP=aarch64-linux-android-strip.exe amalg -j4
|
|
|
- if "%ERRORLEVEL%" == "1" goto :error
|
|
|
- copy src\libluajit.a android\arm64-v8a\libluajit.a
|
|
|
- if "%ERRORLEVEL%" == "1" goto :error
|
|
|
-)
|
|
|
+call :compile arm64-v8a aarch64-linux-android 21
|
|
|
+if "%ERRORLEVEL%" == "1" goto :error
|
|
|
|
|
|
rem ARMv7
|
|
|
-if not exist android\armeabi-v7a\libluajit.a (
|
|
|
- wsl make clean
|
|
|
- if "%ERRORLEVEL%" == "1" goto :error
|
|
|
- wsl make HOST_LUA=luajit.exe "HOST_CC=clang.exe -m32" HOST_CFLAGS=-D_CRT_SECURE_NO_WARNINGS CC=clang CROSS=arm-linux-android- STATIC_CC=armv7a-linux-androideabi16-clang "DYNAMIC_CC=armv7a-linux-androideabi16-clang -fPIC" "TARGET_AR=arm-linux-androideabi-ar.exe rcus" TARGET_LD=armv7a-linux-androideabi16-clang TARGET_STRIP=arm-linux-androideabi-strip.exe amalg -j4
|
|
|
- if "%ERRORLEVEL%" == "1" goto :error
|
|
|
- copy src\libluajit.a android\armeabi-v7a\libluajit.a
|
|
|
- if "%ERRORLEVEL%" == "1" goto :error
|
|
|
-)
|
|
|
+rem ARMv7 is complicated.
|
|
|
+if exist android\armeabi-v7a\libluajit.a goto :x86
|
|
|
+wsl make clean
|
|
|
+if not "%ERRORLEVEL%" == "0" goto :error
|
|
|
+wsl make HOST_LUA=luajit.exe "HOST_CC=clang.exe -m32" HOST_CFLAGS=-D_CRT_SECURE_NO_WARNINGS CC=clang CROSS=arm-linux-androideabi- STATIC_CC=armv7a-linux-androideabi16-clang "DYNAMIC_CC=armv7a-linux-androideabi16-clang -fPIC" "TARGET_AR=arm-linux-androideabi-ar.exe rcus" TARGET_LD=armv7a-linux-androideabi16-clang TARGET_LDFLAGS=-fuse-ld=lld TARGET_STRIP=arm-linux-androideabi-strip.exe amalg -j4
|
|
|
+if not "%ERRORLEVEL%" == "0" goto :error
|
|
|
+copy src\libluajit.a android\armeabi-v7a\libluajit.a
|
|
|
+if not "%ERRORLEVEL%" == "0" goto :error
|
|
|
|
|
|
+:x86
|
|
|
rem x86
|
|
|
-if not exist android\x86\libluajit.a (
|
|
|
- wsl make clean
|
|
|
- if "%ERRORLEVEL%" == "1" goto :error
|
|
|
- wsl make HOST_LUA=luajit.exe "HOST_CC=clang.exe -m32" HOST_CFLAGS=-D_CRT_SECURE_NO_WARNINGS CC=clang CROSS=i686-linux-android- STATIC_CC=i686-linux-android16-clang "DYNAMIC_CC=i686-linux-android16-clang -fPIC" "TARGET_AR=i686-linux-android-ar.exe rcus" TARGET_LD=i686-linux-android16-clang TARGET_STRIP=i686-linux-android-strip.exe amalg -j4
|
|
|
- if "%ERRORLEVEL%" == "1" goto :error
|
|
|
- copy src\libluajit.a android\x86\libluajit.a
|
|
|
- if "%ERRORLEVEL%" == "1" goto :error
|
|
|
-)
|
|
|
+call :compile x86 i686-linux-android 16 -m32
|
|
|
+if not "%ERRORLEVEL%" == "0" goto :error
|
|
|
|
|
|
rem x86_64
|
|
|
-if not exist android\x86_64\libluajit.a (
|
|
|
- wsl make clean
|
|
|
- if "%ERRORLEVEL%" == "1" goto :error
|
|
|
- wsl make HOST_LUA=luajit.exe HOST_CC=clang.exe HOST_CFLAGS=-D_CRT_SECURE_NO_WARNINGS CC=clang CROSS=x86_64-linux-android- STATIC_CC=x86_64-linux-android21-clang "DYNAMIC_CC=x86_64-linux-android21-clang -fPIC" "TARGET_AR=x86_64-linux-android-ar.exe rcus" TARGET_LD=x86_64-linux-android21-clang TARGET_STRIP=x86_64-linux-android-strip.exe amalg -j4
|
|
|
- if "%ERRORLEVEL%" == "1" goto :error
|
|
|
- copy src\libluajit.a android\x86_64\libluajit.a
|
|
|
- if "%ERRORLEVEL%" == "1" goto :error
|
|
|
-)
|
|
|
+call :compile x86_64 x86_64-linux-android 21
|
|
|
+if not "%ERRORLEVEL%" == "0" goto :error
|
|
|
+
|
|
|
+goto :done
|
|
|
|
|
|
+:compile
|
|
|
+if exist android\%1\libluajit.a exit /b 0
|
|
|
+wsl make clean
|
|
|
+if not "%ERRORLEVEL%" == "0" goto :error
|
|
|
+wsl make HOST_LUA=luajit.exe "HOST_CC=clang.exe %4" HOST_CFLAGS=-D_CRT_SECURE_NO_WARNINGS CC=clang CROSS=%2- "STATIC_CC=%2%3-clang -fPIC" "DYNAMIC_CC=%2%3-clang -fPIC" "TARGET_AR=%2-ar.exe rcus" TARGET_LD=%2%3-clang TARGET_LDFLAGS=-fuse-ld=lld TARGET_STRIP=%2-strip.exe amalg -j%NUMBER_OF_PROCESSORS%
|
|
|
+if not "%ERRORLEVEL%" == "0" goto :error
|
|
|
+copy src\libluajit.a android\%1\libluajit.a
|
|
|
+if not "%ERRORLEVEL%" == "0" goto :error
|
|
|
goto :done
|
|
|
|
|
|
:error
|