2013-03-04 09:16:42 +00:00
|
|
|
TEMPLATE = lib
|
|
|
|
android {
|
2016-04-22 14:35:02 +00:00
|
|
|
load(sdk)
|
2013-03-04 09:16:42 +00:00
|
|
|
|
|
|
|
# FIXME: This is a hack to work around some hardcoded values in the android.prf. The
|
|
|
|
# android.prf should be fixed and this should be removed.
|
|
|
|
CONFIG += android_app
|
|
|
|
}
|
|
|
|
|
2017-09-05 01:53:56 +00:00
|
|
|
isEmpty(CLASS_DIR): \
|
|
|
|
CLASS_DIR = .classes
|
2013-03-04 09:16:42 +00:00
|
|
|
|
|
|
|
CONFIG -= qt
|
|
|
|
|
|
|
|
# Without these, qmake adds a name prefix and versioning postfixes (as well as file
|
|
|
|
# links) to the target. This is hardcoded in the qmake code, so for now we use
|
|
|
|
# the plugin configs to get what we want.
|
|
|
|
CONFIG += plugin no_plugin_name_prefix
|
|
|
|
|
|
|
|
javac.input = JAVASOURCES
|
|
|
|
javac.output = $$CLASS_DIR
|
|
|
|
javac.CONFIG += combine
|
2014-09-30 09:04:31 +00:00
|
|
|
javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$system_path($$join(JAVACLASSPATH, $$DIRLIST_SEPARATOR))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN}
|
2013-03-04 09:16:42 +00:00
|
|
|
# Force rebuild every time, because we don't know the paths of the destination files
|
|
|
|
# as they depend on the code.
|
|
|
|
javac.depends = FORCE
|
|
|
|
QMAKE_EXTRA_COMPILERS += javac
|
|
|
|
|
2016-07-14 14:50:02 +00:00
|
|
|
mkpath($$absolute_path($$CLASS_DIR, $$OUT_PWD))|error()
|
2013-03-04 09:16:42 +00:00
|
|
|
|
|
|
|
# Disable all linker flags since we are overriding the regular linker
|
|
|
|
QMAKE_LFLAGS =
|
|
|
|
QMAKE_CFLAGS =
|
|
|
|
QMAKE_LFLAGS_RPATH =
|
|
|
|
QMAKE_LFLAGS_PLUGIN =
|
|
|
|
QMAKE_LIBS =
|
|
|
|
QMAKE_LIBS_OPENGL_ES2 =
|
|
|
|
QMAKE_LIBDIR =
|
|
|
|
QMAKE_EXTENSION_SHLIB = jar
|
2017-09-05 01:53:56 +00:00
|
|
|
QMAKE_LINK_SHLIB_CMD = jar cf $(TARGET) -C $$CLASS_DIR .
|
2013-03-04 09:16:42 +00:00
|
|
|
|
|
|
|
# Force link step to always happen, since we are always updating the
|
|
|
|
# .class files
|
|
|
|
PRE_TARGETDEPS += FORCE
|