| 1 |
ifeq ($(BUILDDIR),) |
| 2 |
gb_Side:=host |
| 3 |
include ../../config_host.mk |
| 4 |
endif |
| 5 |
|
| 6 |
# The default target builds the APK and runs lint. |
| 7 |
|
| 8 |
all: build-gradle |
| 9 |
|
| 10 |
DISABLE_UI=TRUE |
| 11 |
BUILD_VARIANT=$(if $(DISABLE_UI),StrippedUI)$(if $(ENABLE_ANDROID_EDITING),Editing)$(if $(ENABLE_RELEASE_BUILD),Release,Debug) |
| 12 |
BOOTSTRAPDIR=../Bootstrap |
| 13 |
include $(BOOTSTRAPDIR)/Makefile.shared |
| 14 |
|
| 15 |
native-code.cxx: $(SRCDIR)/solenv/bin/native-code.py |
| 16 |
@echo "[build PY ] $@" |
| 17 |
$< -j -g core -g writer -g calc -g draw -g edit > $@ |
| 18 |
|
| 19 |
install: |
| 20 |
if test "$$ENABLE_ANDROID_LOK" != "TRUE" ; then ./gradlew $(if $(verbose),--info) $(if $(versionCode),-PcmdVersionCode=$(versionCode)) install$(if $(DISABLE_UI),StrippedUI)$(if $(ENABLE_ANDROID_EDITING),Editing)Debug ; fi |
| 21 |
@if test "$$ENABLE_ANDROID_LOK" != "TRUE" ; then echo ; echo 'Run it with "make run"' ; echo ; fi |
| 22 |
|
| 23 |
uninstall: |
| 24 |
$(ANDROID_SDK_DIR)/platform-tools/adb uninstall $(ANDROID_PACKAGE_NAME) |
| 25 |
|
| 26 |
clean: |
| 27 |
rm -rf assets assets_strippedUI build jniLibs jniLibs_debug res_generated $(OBJLOCAL) |
| 28 |
rm -f native-code.cxx |
| 29 |
rm -f liboSettings.gradle |
| 30 |
|
| 31 |
build-gradle: liboSettings.gradle local.properties link-so |
| 32 |
ifeq ($(ENABLE_JAVA),TRUE) |
| 33 |
if test "$$ENABLE_ANDROID_LOK" != "TRUE" ; then ./gradlew $(if $(verbose),--info) $(if $(versionCode),-PcmdVersionCode=$(versionCode)) assemble$(BUILD_VARIANT) lint$(BUILD_VARIANT) ; fi |
| 34 |
endif |
| 35 |
|
| 36 |
run: |
| 37 |
if test "$$ENABLE_ANDROID_LOK" != "TRUE" ; then $(ANDROID_SDK_DIR)/platform-tools/adb shell am start -n $(ANDROID_PACKAGE_NAME)/org.libreoffice.ui.LibreOfficeUIActivity ; fi |
| 38 |
|
| 39 |
debugrun: |
| 40 |
@echo "please debug with lldb from within Android Studio, or setup ndk-gdb manually (see android/README for details)" |