mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
add 32bit support (android only)
This commit is contained in:
parent
090482a7ec
commit
df358fa5ae
15 changed files with 234 additions and 65 deletions
|
|
@ -21,7 +21,7 @@
|
|||
(setf *number* number)
|
||||
(q! |requestPaint| *canvas*))
|
||||
|
||||
(defun paint ()
|
||||
(defun paint () ; called from QML
|
||||
(with-path ("black")
|
||||
(draw-line 0 -150 0 150))
|
||||
(with-path ("blue")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
LISP_FILES = $$files(lisp/*) app.asd make.lisp
|
||||
|
||||
android {
|
||||
lisp.commands = $$(ECL_ANDROID)/../ecl-android-host/bin/ecl \
|
||||
32bit {
|
||||
ECL = $$(ECL_ANDROID_32)
|
||||
} else {
|
||||
ECL = $$(ECL_ANDROID)
|
||||
}
|
||||
lisp.commands = $$ECL/../ecl-android-host/bin/ecl \
|
||||
-norc -shell $$PWD/make.lisp
|
||||
} else:ios {
|
||||
lisp.commands = $$(ECL_IOS)/../ecl-ios-host/bin/ecl \
|
||||
|
|
@ -51,17 +56,22 @@ android {
|
|||
QT += androidextras
|
||||
DEFINES += INI_ASDF
|
||||
DEFINES -= DESKTOP_APP
|
||||
INCLUDEPATH = $$(ECL_ANDROID)/include
|
||||
ECL_VERSION = $$lower($$system($ECL_ANDROID/../ecl-android-host/bin/ecl -v))
|
||||
INCLUDEPATH = $$ECL/include
|
||||
ECL_VERSION = $$lower($$system($$ECL/../ecl-android-host/bin/ecl -v))
|
||||
ECL_VERSION = $$replace(ECL_VERSION, " ", "-")
|
||||
LIBS = -L$$(ECL_ANDROID)/lib -lecl
|
||||
LIBS += -L$$(ECL_ANDROID)/lib/$$ECL_VERSION
|
||||
LIBS = -L$$ECL/lib -lecl
|
||||
LIBS += -L$$ECL/lib/$$ECL_VERSION
|
||||
LIBS += -lasdf -lecl-help -ldeflate -lecl-cdb -lecl-curl -lql-minitar -lsockets
|
||||
LIBS += -L../../../platforms/android/lib
|
||||
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
ANDROID_EXTRA_LIBS += $$(ECL_ANDROID)/lib/libecl.so
|
||||
ANDROID_EXTRA_LIBS += $$ECL/lib/libecl.so
|
||||
ANDROID_PACKAGE_SOURCE_DIR = ../platforms/android
|
||||
|
||||
32bit {
|
||||
ANDROID_ABIS = "armeabi-v7a"
|
||||
} else {
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
}
|
||||
}
|
||||
|
||||
ios {
|
||||
|
|
@ -80,7 +90,13 @@ ios {
|
|||
QMAKE_BUNDLE_DATA += assets
|
||||
}
|
||||
|
||||
LIBS += -llqml -llisp -Ltmp -lapp
|
||||
32bit {
|
||||
LIBS += -llqml32 -llisp32
|
||||
} else {
|
||||
LIBS += -llqml -llisp
|
||||
}
|
||||
|
||||
LIBS += -Ltmp -lapp
|
||||
HEADERS += ../../src/cpp/main.h
|
||||
SOURCES += ../../src/cpp/main.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
LISP_FILES = $$files(lisp/*) app.asd make.lisp
|
||||
|
||||
android {
|
||||
lisp.commands = $$(ECL_ANDROID)/../ecl-android-host/bin/ecl \
|
||||
32bit {
|
||||
ECL = $$(ECL_ANDROID_32)
|
||||
} else {
|
||||
ECL = $$(ECL_ANDROID)
|
||||
}
|
||||
lisp.commands = $$ECL/../ecl-android-host/bin/ecl \
|
||||
-norc -shell $$PWD/make.lisp
|
||||
} else:ios {
|
||||
lisp.commands = $$(ECL_IOS)/../ecl-ios-host/bin/ecl \
|
||||
|
|
@ -44,13 +49,18 @@ win32 {
|
|||
android {
|
||||
QT += androidextras
|
||||
DEFINES -= DESKTOP_APP
|
||||
INCLUDEPATH = $$(ECL_ANDROID)/include
|
||||
LIBS = -L$$(ECL_ANDROID)/lib -lecl
|
||||
INCLUDEPATH = $$ECL/include
|
||||
LIBS = -L$$ECL/lib -lecl
|
||||
LIBS += -L../../../platforms/android/lib
|
||||
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
ANDROID_EXTRA_LIBS += $$(ECL_ANDROID)/lib/libecl.so
|
||||
ANDROID_EXTRA_LIBS += $$ECL/lib/libecl.so
|
||||
#ANDROID_PACKAGE_SOURCE_DIR = ../platforms/android
|
||||
|
||||
32bit {
|
||||
ANDROID_ABIS = "armeabi-v7a"
|
||||
} else {
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
}
|
||||
}
|
||||
|
||||
ios {
|
||||
|
|
@ -61,7 +71,13 @@ ios {
|
|||
LIBS += -L../../../platforms/ios/lib
|
||||
}
|
||||
|
||||
LIBS += -llqml -llisp -Ltmp -lapp
|
||||
32bit {
|
||||
LIBS += -llqml32 -llisp32
|
||||
} else {
|
||||
LIBS += -llqml -llisp
|
||||
}
|
||||
|
||||
LIBS += -Ltmp -lapp
|
||||
HEADERS += ../../src/cpp/main.h
|
||||
SOURCES += ../../src/cpp/main.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
LISP_FILES = $$files(lisp/*) app.asd make.lisp
|
||||
|
||||
android {
|
||||
lisp.commands = $$(ECL_ANDROID)/../ecl-android-host/bin/ecl \
|
||||
32bit {
|
||||
ECL = $$(ECL_ANDROID_32)
|
||||
} else {
|
||||
ECL = $$(ECL_ANDROID)
|
||||
}
|
||||
lisp.commands = $$ECL/../ecl-android-host/bin/ecl \
|
||||
-norc -shell $$PWD/make.lisp
|
||||
} else:ios {
|
||||
lisp.commands = $$(ECL_IOS)/../ecl-ios-host/bin/ecl \
|
||||
|
|
@ -51,17 +56,22 @@ android {
|
|||
QT += androidextras
|
||||
DEFINES += INI_ASDF NO_TEXT_HANDLES
|
||||
DEFINES -= DESKTOP_APP
|
||||
INCLUDEPATH = $$(ECL_ANDROID)/include
|
||||
ECL_VERSION = $$lower($$system($ECL_ANDROID/../ecl-android-host/bin/ecl -v))
|
||||
INCLUDEPATH = $$ECL/include
|
||||
ECL_VERSION = $$lower($$system($$ECL/../ecl-android-host/bin/ecl -v))
|
||||
ECL_VERSION = $$replace(ECL_VERSION, " ", "-")
|
||||
LIBS = -L$$(ECL_ANDROID)/lib -lecl
|
||||
LIBS += -L$$(ECL_ANDROID)/lib/$$ECL_VERSION
|
||||
LIBS = -L$$ECL/lib -lecl
|
||||
LIBS += -L$$ECL/lib/$$ECL_VERSION
|
||||
LIBS += -lasdf -lecl-help -ldeflate -lecl-cdb -lecl-curl -lql-minitar -lsockets
|
||||
LIBS += -L../../../platforms/android/lib
|
||||
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
ANDROID_EXTRA_LIBS += $$(ECL_ANDROID)/lib/libecl.so
|
||||
ANDROID_EXTRA_LIBS += $$ECL/lib/libecl.so
|
||||
ANDROID_PACKAGE_SOURCE_DIR = ../platforms/android
|
||||
|
||||
32bit {
|
||||
ANDROID_ABIS = "armeabi-v7a"
|
||||
} else {
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
}
|
||||
}
|
||||
|
||||
ios {
|
||||
|
|
@ -80,8 +90,14 @@ ios {
|
|||
QMAKE_BUNDLE_DATA += assets
|
||||
}
|
||||
|
||||
32bit {
|
||||
LIBS += -llqml32 -llisp32
|
||||
} else {
|
||||
LIBS += -llqml -llisp
|
||||
}
|
||||
|
||||
LIBS += -Ltmp -lapp
|
||||
INCLUDEPATH += ../../../src/cpp
|
||||
LIBS += -llqml -llisp -Ltmp -lapp
|
||||
|
||||
HEADERS += ../../src/cpp/main.h cpp/qt.h
|
||||
SOURCES += ../../src/cpp/main.cpp cpp/qt.cpp
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
LISP_FILES = $$files(lisp/*) app.asd make.lisp
|
||||
|
||||
android {
|
||||
lisp.commands = $$(ECL_ANDROID)/../ecl-android-host/bin/ecl \
|
||||
32bit {
|
||||
ECL = $$(ECL_ANDROID_32)
|
||||
} else {
|
||||
ECL = $$(ECL_ANDROID)
|
||||
}
|
||||
lisp.commands = $$ECL/../ecl-android-host/bin/ecl \
|
||||
-norc -shell $$PWD/make.lisp
|
||||
} else:ios {
|
||||
lisp.commands = $$(ECL_IOS)/../ecl-ios-host/bin/ecl \
|
||||
|
|
@ -50,17 +55,22 @@ win32 {
|
|||
android {
|
||||
QT += androidextras
|
||||
DEFINES -= DESKTOP_APP
|
||||
INCLUDEPATH = $$(ECL_ANDROID)/include
|
||||
ECL_VERSION = $$lower($$system($ECL_ANDROID/../ecl-android-host/bin/ecl -v))
|
||||
INCLUDEPATH = $$ECL/include
|
||||
ECL_VERSION = $$lower($$system($$ECL/../ecl-android-host/bin/ecl -v))
|
||||
ECL_VERSION = $$replace(ECL_VERSION, " ", "-")
|
||||
LIBS = -L$$(ECL_ANDROID)/lib -lecl
|
||||
LIBS += -L$$(ECL_ANDROID)/lib/$$ECL_VERSION
|
||||
LIBS = -L$$ECL/lib -lecl
|
||||
LIBS += -L$$ECL/lib/$$ECL_VERSION
|
||||
LIBS += -lasdf -lecl-help -ldeflate -lecl-cdb -lecl-curl -lql-minitar -lsockets
|
||||
LIBS += -L../../../platforms/android/lib
|
||||
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
ANDROID_EXTRA_LIBS += $$(ECL_ANDROID)/lib/libecl.so
|
||||
ANDROID_EXTRA_LIBS += $$ECL/lib/libecl.so
|
||||
ANDROID_PACKAGE_SOURCE_DIR = ../platforms/android
|
||||
|
||||
32bit {
|
||||
ANDROID_ABIS = "armeabi-v7a"
|
||||
} else {
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
}
|
||||
}
|
||||
|
||||
ios {
|
||||
|
|
@ -78,7 +88,13 @@ ios {
|
|||
QMAKE_BUNDLE_DATA += assets
|
||||
}
|
||||
|
||||
LIBS += -llqml -llisp -Ltmp -lapp
|
||||
32bit {
|
||||
LIBS += -llqml32 -llisp32
|
||||
} else {
|
||||
LIBS += -llqml -llisp
|
||||
}
|
||||
|
||||
LIBS += -Ltmp -lapp
|
||||
HEADERS += ../../src/cpp/main.h
|
||||
SOURCES += ../../src/cpp/main.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
LISP_FILES = $$files(lisp/*) app.asd make.lisp
|
||||
|
||||
android {
|
||||
lisp.commands = $$(ECL_ANDROID)/../ecl-android-host/bin/ecl \
|
||||
32bit {
|
||||
ECL = $$(ECL_ANDROID_32)
|
||||
} else {
|
||||
ECL = $$(ECL_ANDROID)
|
||||
}
|
||||
lisp.commands = $$ECL/../ecl-android-host/bin/ecl \
|
||||
-norc -shell $$PWD/make.lisp
|
||||
} else:ios {
|
||||
lisp.commands = $$(ECL_IOS)/../ecl-ios-host/bin/ecl \
|
||||
|
|
@ -51,17 +56,22 @@ android {
|
|||
QT += androidextras
|
||||
DEFINES += INI_ASDF
|
||||
DEFINES -= DESKTOP_APP
|
||||
INCLUDEPATH = $$(ECL_ANDROID)/include
|
||||
ECL_VERSION = $$lower($$system($ECL_ANDROID/../ecl-android-host/bin/ecl -v))
|
||||
INCLUDEPATH = $$ECL/include
|
||||
ECL_VERSION = $$lower($$system($$ECL/../ecl-android-host/bin/ecl -v))
|
||||
ECL_VERSION = $$replace(ECL_VERSION, " ", "-")
|
||||
LIBS = -L$$(ECL_ANDROID)/lib -lecl
|
||||
LIBS += -L$$(ECL_ANDROID)/lib/$$ECL_VERSION
|
||||
LIBS = -L$$ECL/lib -lecl
|
||||
LIBS += -L$$ECL/lib/$$ECL_VERSION
|
||||
LIBS += -lasdf -lecl-help -ldeflate -lecl-cdb -lecl-curl -lql-minitar -lsockets
|
||||
LIBS += -L../../../platforms/android/lib
|
||||
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
ANDROID_EXTRA_LIBS += $$(ECL_ANDROID)/lib/libecl.so
|
||||
ANDROID_EXTRA_LIBS += $$ECL/lib/libecl.so
|
||||
ANDROID_PACKAGE_SOURCE_DIR = ../platforms/android
|
||||
|
||||
32bit {
|
||||
ANDROID_ABIS = "armeabi-v7a"
|
||||
} else {
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
}
|
||||
}
|
||||
|
||||
ios {
|
||||
|
|
@ -80,7 +90,13 @@ ios {
|
|||
QMAKE_BUNDLE_DATA += assets
|
||||
}
|
||||
|
||||
LIBS += -llqml -llisp -Ltmp -lapp
|
||||
32bit {
|
||||
LIBS += -llqml32 -llisp32
|
||||
} else {
|
||||
LIBS += -llqml -llisp
|
||||
}
|
||||
|
||||
LIBS += -Ltmp -lapp
|
||||
HEADERS += ../../src/cpp/main.h
|
||||
SOURCES += ../../src/cpp/main.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
LISP_FILES = $$files(lisp/*) app.asd make.lisp
|
||||
|
||||
android {
|
||||
lisp.commands = $$(ECL_ANDROID)/../ecl-android-host/bin/ecl \
|
||||
32bit {
|
||||
ECL = $$(ECL_ANDROID_32)
|
||||
} else {
|
||||
ECL = $$(ECL_ANDROID)
|
||||
}
|
||||
lisp.commands = $$ECL/../ecl-android-host/bin/ecl \
|
||||
-norc -shell $$PWD/make.lisp
|
||||
} else:ios {
|
||||
lisp.commands = $$(ECL_IOS)/../ecl-ios-host/bin/ecl \
|
||||
|
|
@ -44,13 +49,18 @@ win32 {
|
|||
android {
|
||||
QT += androidextras sensors
|
||||
DEFINES -= DESKTOP_APP
|
||||
INCLUDEPATH = $$(ECL_ANDROID)/include
|
||||
LIBS = -L$$(ECL_ANDROID)/lib -lecl
|
||||
INCLUDEPATH = $$ECL/include
|
||||
LIBS = -L$$ECL/lib -lecl
|
||||
LIBS += -L../../../platforms/android/lib
|
||||
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
ANDROID_EXTRA_LIBS += $$(ECL_ANDROID)/lib/libecl.so
|
||||
ANDROID_EXTRA_LIBS += $$ECL/lib/libecl.so
|
||||
ANDROID_PACKAGE_SOURCE_DIR = ../platforms/android
|
||||
|
||||
32bit {
|
||||
ANDROID_ABIS = "armeabi-v7a"
|
||||
} else {
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
}
|
||||
}
|
||||
|
||||
ios {
|
||||
|
|
@ -64,7 +74,13 @@ ios {
|
|||
QMAKE_INFO_PLIST = platforms/ios/Info.plist
|
||||
}
|
||||
|
||||
LIBS += -llqml -llisp -Ltmp -lapp
|
||||
32bit {
|
||||
LIBS += -llqml32 -llisp32
|
||||
} else {
|
||||
LIBS += -llqml -llisp
|
||||
}
|
||||
|
||||
LIBS += -Ltmp -lapp
|
||||
HEADERS += ../../src/cpp/main.h
|
||||
SOURCES += ../../src/cpp/main.cpp
|
||||
|
||||
|
|
|
|||
10
platforms/android/build-ecl/32bit/1-make-ecl-host.sh
Executable file
10
platforms/android/build-ecl/32bit/1-make-ecl-host.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
# build the host ECL, which will then be used to build the cross-compiled
|
||||
# android version (32bit)
|
||||
|
||||
./configure ABI=32 CFLAGS="-m32 -g -O2" LDFLAGS="-m32 -g -O2" CC=clang \
|
||||
--prefix=`pwd`/ecl-android-host \
|
||||
--disable-c99complex \
|
||||
--enable-manual=no
|
||||
make
|
||||
make install
|
||||
rm -r build
|
||||
22
platforms/android/build-ecl/32bit/2-make-ecl-android.sh
Executable file
22
platforms/android/build-ecl/32bit/2-make-ecl-android.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
# use the previously built host ECL to build the android version
|
||||
# requires NDK >= 19
|
||||
# you need to define ANDROID_NDK_TOOLCHAIN
|
||||
|
||||
export CC=$ANDROID_NDK_TOOLCHAIN/bin/armv7a-linux-androideabi21-clang
|
||||
export AR=$ANDROID_NDK_TOOLCHAIN/bin/arm-linux-androideabi-ar
|
||||
export AS=$ANDROID_NDK_TOOLCHAIN/bin/arm-linux-androideabi-as
|
||||
export LD=$ANDROID_NDK_TOOLCHAIN/bin/arm-linux-androideabi-ld
|
||||
export RANLIB=$ANDROID_NDK_TOOLCHAIN/bin/arm-linux-androideabi-ranlib
|
||||
export STRIP=$ANDROID_NDK_TOOLCHAIN/bin/arm-linux-androideabi-strip
|
||||
|
||||
export LDFLAGS="-fuse-ld=bfd"
|
||||
|
||||
export ECL_TO_RUN=`pwd`/ecl-android-host/bin/ecl
|
||||
|
||||
./configure --host=arm-linux-androideabi \
|
||||
--prefix=`pwd`/ecl-android \
|
||||
--disable-c99complex \
|
||||
--enable-manual=no \
|
||||
--with-cross-config=`pwd`/src/util/android-arm.cross_config
|
||||
make
|
||||
make install
|
||||
|
|
@ -2,18 +2,23 @@
|
|||
|
||||
(in-package :cl-user)
|
||||
|
||||
(defvar *32bit* nil) ; see DEFVAR in '../shared/make.lisp'
|
||||
|
||||
(pushnew :android *features*)
|
||||
(pushnew :aarch64 *features*)
|
||||
|
||||
(if *32bit*
|
||||
(setf *features* (remove :aarch64 *features*))
|
||||
(pushnew :aarch64 *features*))
|
||||
|
||||
(require :cmp)
|
||||
|
||||
(defvar *ndk-toolchain* (ext:getenv "ANDROID_NDK_TOOLCHAIN"))
|
||||
(defvar *ecl-android* (ext:getenv "ECL_ANDROID"))
|
||||
(defvar *architecture* "aarch64-linux-android")
|
||||
|
||||
(defun cc (&rest arguments)
|
||||
(apply 'concatenate 'string arguments))
|
||||
|
||||
(defparameter *ndk-toolchain* (ext:getenv "ANDROID_NDK_TOOLCHAIN"))
|
||||
(defparameter *ecl-android* (ext:getenv (cc "ECL_ANDROID" (if *32bit* "_32" ""))))
|
||||
(defparameter *arch-triple* (if *32bit* "arm-linux-androideabi" "aarch64-linux-android"))
|
||||
|
||||
(setf c::*ecl-include-directory* (cc *ecl-android* "/include/")
|
||||
c::*ecl-library-directory* (cc *ecl-android* "/lib/"))
|
||||
|
||||
|
|
@ -21,19 +26,22 @@
|
|||
(read-line (ext:run-program (cc *ecl-android* "/bin/ecl-config")
|
||||
(list flags))))
|
||||
|
||||
(setf c::*cc* (let ((path (or (probe-file (cc *ndk-toolchain* "/bin/aarch64-linux-android21-clang"))
|
||||
(setf c::*cc* (let ((path (or (probe-file (cc *ndk-toolchain*
|
||||
"/bin/"
|
||||
(if *32bit* "armv7a-linux-androideabi" *arch-triple*)
|
||||
"21-clang"))
|
||||
(error "clang compiler not found"))))
|
||||
(namestring path))
|
||||
c::*ld* (cc *ndk-toolchain* "/bin/aarch64-linux-android-ld")
|
||||
c::*ar* (cc *ndk-toolchain* "/bin/aarch64-linux-android-ar")
|
||||
c::*ranlib* (cc *ndk-toolchain* "/bin/aarch64-linux-android-ranlib")
|
||||
c::*ld* (cc *ndk-toolchain* "/bin/" *arch-triple* "-ld")
|
||||
c::*ar* (cc *ndk-toolchain* "/bin/" *arch-triple* "-ar")
|
||||
c::*ranlib* (cc *ndk-toolchain* "/bin/" *arch-triple* "-ranlib")
|
||||
c::*cc-flags* (cc (ecl-config "--cflags")
|
||||
" -DANDROID -DPLATFORM_ANDROID -O2 -fPIC -fno-common -D_THREAD_SAFE -I"
|
||||
*ecl-android* "/build/gmp")
|
||||
c::*ld-flags* (cc "-L" *ecl-android* "/lib -lecl -ldl -lm "
|
||||
"-L" *ndk-toolchain* "/sysroot/usr/lib/aarch64-linux-android/")
|
||||
"-L" *ndk-toolchain* "/sysroot/usr/lib/" *arch-triple* "/")
|
||||
c::*ld-rpath* nil
|
||||
c::*ld-shared-flags* (cc "-shared " c::*ld-flags*)
|
||||
c::*ld-bundle-flags* c::*ld-shared-flags*)
|
||||
|
||||
(format t "~%*** cross compiling for 'aarch64' ***~%")
|
||||
(format t "~%*** cross compiling for '~A' ***~%" (if *32bit* "armv7a" "aarch64"))
|
||||
|
|
|
|||
|
|
@ -21,11 +21,14 @@
|
|||
(defun cc (&rest args)
|
||||
(apply 'concatenate 'string args))
|
||||
|
||||
(defvar *32bit* (<= most-positive-fixnum (expt 2 32)))
|
||||
|
||||
(let* ((cache (namestring asdf:*user-cache*))
|
||||
(p (search "/ecl" cache)))
|
||||
(setf asdf:*user-cache*
|
||||
(pathname (cc (subseq cache 0 p)
|
||||
"/ecl-" #+android "android" #+ios "ios"
|
||||
(if *32bit* "-32bit" "")
|
||||
(subseq cache (+ 4 p))))))
|
||||
|
||||
;;; *** (1) byte-compile ASDF system ***
|
||||
|
|
@ -47,8 +50,6 @@
|
|||
|
||||
;;; *** (2) cross-compile ***
|
||||
|
||||
;;; load and prepare cross-compiler
|
||||
|
||||
(ext:install-c-compiler)
|
||||
|
||||
(setf *features* (remove :interpreter *features*))
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ Put this in e.g. `~/.bashrc`:
|
|||
export ANDROID_NDK_TOOLCHAIN='<path-to-ndk>/toolchains/llvm/prebuilt/linux-x86_64'
|
||||
export ECL_ANDROID='<path-to-cross-compiled-ecl>/ecl-android'
|
||||
|
||||
# optional
|
||||
export ECL_ANDROID_32='<path-to-cross-compiled-ecl-32>/ecl-android'
|
||||
|
||||
alias qmake-android='<path-to-qt5.15>/android/bin/qmake'
|
||||
```
|
||||
Add the path of the platform tools (`.../sdk/platforms-tools`) to your path, so
|
||||
|
|
@ -52,3 +55,16 @@ this project. As of March 2022, please use latest ECL from development branch.
|
|||
Now you should have your cross-compiled ECL under `~/ecl/android/ecl-android/`,
|
||||
and your host ECL (for cross-compiling) under `~/ecl/android/ecl-android-host/`.
|
||||
|
||||
|
||||
|
||||
Build 32bit ECL (optional)
|
||||
--------------------------
|
||||
|
||||
For older devices you may need a 32bit version. Just use the build scripts in
|
||||
[platforms/android/build-ecl/32bit/](platforms/android/build-ecl/32bit/) and
|
||||
set `ECL_ANDROID_32` (see above).
|
||||
|
||||
For 32bit builds you need to substitute every `qmake-android ...` with:
|
||||
```
|
||||
qmake-android "CONFIG+=32bit" ...
|
||||
```
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include <QQuickView>
|
||||
#include <QDebug>
|
||||
|
||||
const char LQML::version[] = "22.5.1"; // May 2022
|
||||
const char LQML::version[] = "22.5.2"; // May 2022
|
||||
|
||||
extern "C" void ini_LQML(cl_object);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,15 @@ QT += quick qml
|
|||
TEMPLATE = lib
|
||||
CONFIG += c++17 staticlib no_keywords release
|
||||
LIBS = -L/usr/local/lib -lecl
|
||||
TARGET = lqml
|
||||
OBJECTS_DIR = ./tmp
|
||||
MOC_DIR = ./tmp
|
||||
|
||||
32bit {
|
||||
TARGET = lqml32
|
||||
} else {
|
||||
TARGET = lqml
|
||||
}
|
||||
|
||||
linux {
|
||||
INCLUDEPATH = /usr/local/include
|
||||
DESTDIR = ../../platforms/linux/lib
|
||||
|
|
@ -23,11 +28,21 @@ win32 {
|
|||
}
|
||||
|
||||
android {
|
||||
32bit {
|
||||
ECL = $$(ECL_ANDROID_32)
|
||||
} else {
|
||||
ECL = $$(ECL_ANDROID)
|
||||
}
|
||||
QT += androidextras
|
||||
INCLUDEPATH = $$(ECL_ANDROID)/include
|
||||
LIBS = -L$$(ECL_ANDROID)/lib -lecl
|
||||
INCLUDEPATH = $$ECL/include
|
||||
LIBS = -L$$ECL/lib -lecl
|
||||
DESTDIR = ../../platforms/android/lib
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
|
||||
32bit {
|
||||
ANDROID_ABIS = "armeabi-v7a"
|
||||
} else {
|
||||
ANDROID_ABIS = "arm64-v8a"
|
||||
}
|
||||
}
|
||||
|
||||
ios {
|
||||
|
|
@ -55,7 +70,7 @@ SOURCES += \
|
|||
# compile Lisp code
|
||||
|
||||
android {
|
||||
QMAKE_POST_LINK = $$(ECL_ANDROID)/../ecl-android-host/bin/ecl \
|
||||
QMAKE_POST_LINK = $$ECL/../ecl-android-host/bin/ecl \
|
||||
-norc -shell $$PWD/make.lisp
|
||||
} else:ios {
|
||||
QMAKE_POST_LINK = ../../platforms/ios/cross-compile.sh ../make.lisp
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
#+msvc "lib"
|
||||
#-msvc "a"))
|
||||
(to #+msvc "lisp.lib"
|
||||
#-msvc "liblisp.a")
|
||||
#-msvc (format nil "liblisp~A.a"
|
||||
(if (<= most-positive-fixnum (expt 2 32)) "32" "")))
|
||||
(to* (format nil "platforms/~A/lib/~A"
|
||||
#+(and linux (not android)) "linux"
|
||||
#+(and darwin (not ios)) "macos"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue