summaryrefslogtreecommitdiffstats
path: root/ios
diff options
context:
space:
mode:
authorjan Iversen <jani@libreoffice.org>2018-01-10 08:35:42 +0100
committerjan Iversen <jani@libreoffice.org>2018-01-10 14:23:02 +0100
commitffd994298d62f86a36b00e98fd41c326e0e9bad0 (patch)
tree9ad6f833c52a8a0391624dff5be259d332d0351a /ios
parentofz#5211 limit table parsing depth (diff)
downloadcore-ffd994298d62f86a36b00e98fd41c326e0e9bad0.tar.gz
core-ffd994298d62f86a36b00e98fd41c326e0e9bad0.zip
iOS, catch library changes in make
Updated makefiles to be dependent on the static libs, ensuring that iOS is rebuild when a core library changed. Change-Id: I5ebd1d703eb9a3af0e284910cdc307dd62f4d3fc
Diffstat (limited to 'ios')
-rw-r--r--ios/CustomTarget_iOS_prelink.mk37
-rw-r--r--ios/CustomTarget_iOS_setup.mk33
2 files changed, 52 insertions, 18 deletions
diff --git a/ios/CustomTarget_iOS_prelink.mk b/ios/CustomTarget_iOS_prelink.mk
index fec4fd271511..d105c135e76b 100644
--- a/ios/CustomTarget_iOS_prelink.mk
+++ b/ios/CustomTarget_iOS_prelink.mk
@@ -6,16 +6,21 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#- Env ------------------------------------------------------------------------
+IOSLIB = ''
IOSLD = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
IOSCLANG = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
IOSOBJ = $(WORKDIR)/CObject/ios/Kit.o
ifeq ($(ENABLE_DEBUG),TRUE)
-IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.dylib
-IOSKIT2 = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.a
+ifeq ($(CPUNAME),X86_64)
+IOSKIT = $(IOSGEN)/simulator/libKit
else
-IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME).dylib
-IOSKIT2 = $(SRCDIR)/ios/generated/libKit_$(CPUNAME).a
+IOSKIT = $(IOSGEN)/debug/libKit
+endif
+else
+ifeq ($(CPUNAME),ARM64)
+IOSKIT = $(IOSGEN)/release/libKit
+endif
endif
@@ -23,7 +28,7 @@ endif
#- Top level -----------------------------------------------------------------
$(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_prelink))
-$(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT)
+$(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT).dylib
@@ -32,14 +37,19 @@ $(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT)
FORCE:
-$(IOSKIT): $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o
- $(IOSLD) -r -ios_version_min 11.2 \
+IOSPREBUILD: FORCE
+ $(eval IOSLIBS = `$(SRCDIR)/bin/lo-all-static-libs`)
+
+
+
+$(IOSKIT).dylib: $(WORKDIR)/ios $(call gb_StaticLibrary_get_target,iOS_kitBridge) $(IOSLIBS)
+ $(IOSLD) -r -ios_version_min $(IOS_DEPLOYMENT_VERSION) \
-syslibroot $(MACOSX_SDK_PATH) \
-arch `echo $(CPUNAME) | tr '[:upper:]' '[:lower:]'` \
-o $(IOSOBJ) \
$(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
- `$(SRCDIR)/bin/lo-all-static-libs`
- $(AR) -r $(IOSKIT2) $(IOSOBJ)
+ $(IOSLIBS)
+ $(AR) -r $(IOSKIT).a $(IOSOBJ)
$(IOSCLANG) -dynamiclib -mios-simulator-version-min=$(IOS_DEPLOYMENT_VERSION) \
-arch `echo $(CPUNAME) | tr '[:upper:]' '[:lower:]'` \
@@ -61,15 +71,14 @@ $(IOSKIT): $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o
-single_module \
-compatibility_version 1 \
-current_version 1 \
- $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
- `$(SRCDIR)/bin/lo-all-static-libs` \
- -o $(IOSKIT)
+ $(IOSKIT).a \
+ -o $(IOSKIT).dylib
ifeq ($(origin IOS_CODEID),undefined)
@echo "please define environment variable IOS_CODEID as\n" \
"export IOS_CODEID=<your apple code identifier>"
@exit -1
else
- codesign -s "$(IOS_CODEID)" $(IOSKIT)
+ codesign -s "$(IOS_CODEID)" $(IOSKIT).dylib
endif
@@ -77,7 +86,7 @@ endif
#- clean ios -----------------------------------------------------------------
$(call gb_CustomTarget_get_clean_target,ios/iOS_prelink):
- rm -f $(IOSKIT) $(IOSKIT2)
+ rm -f $(IOSKIT).a $(IOSKIT).dylib
diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk
index 8b128d463580..91fd2a0cfe33 100644
--- a/ios/CustomTarget_iOS_setup.mk
+++ b/ios/CustomTarget_iOS_setup.mk
@@ -17,15 +17,28 @@ $(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_setup))
$(call gb_CustomTarget_get_target,ios/iOS_setup): $(IOSGEN)/native-code.h
+#- build ---------------------------------------------------------------------
+.PHONY: FORCE
+FORCE:
-#- Generate dynamic files ---------------------------------------------------
-$(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_iOS_setup.mk
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
+
+$(WORKDIR)/ios:
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRE,2)
mkdir -p $(IOSGEN) $(IOSRES) $(IOSRES)/services \
$(IOSRES)/share/config $(IOSRES)/share/filter $(IOSRES)/program \
+ $(IOSGEN)/simulator \
+ $(IOSGEN)/debug \
+ $(IOSGEN)/release \
$(IOSGEN) $(WORKDIR)/ios;
+
+
+#- Generate dynamic files ---------------------------------------------------
+$(IOSGEN)/native-code.h: $(WORKDIR)/ios $(BUILDDIR)/config_host.mk \
+ $(SRCDIR)/ios/CustomTarget_iOS_setup.mk
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
+
# generate file with call declarations
$(SRCDIR)/solenv/bin/native-code.py \
-C -g core -g writer -g calc -g draw -g edit \
@@ -88,8 +101,20 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_i
#- clean ios -----------------------------------------------------------------
$(call gb_CustomTarget_get_clean_target,ios/iOS_setup):
$(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),ENV,2)
- rm -rf $(IOSRES) $(IOSGEN)/native-code.h $(IOSAPPXC)
+ echo $(call gb_StaticLibrary_get_target,iOS_kitBridge)
+ rm -rf $(IOSRES) $(IOSGEN)/native-code.h $(IOSGEN)/build
rm -rf $(WORKDIR)/ios
+ifeq ($(ENABLE_DEBUG),TRUE)
+ifeq ($(CPUNAME),X86_64)
+ rm -f $(IOSGEN)/simulator/*
+else
+ rm -f $(IOSGEN)/debug/*
+endif
+else
+ifeq ($(CPUNAME),ARM64)
+ rm -f $(IOSGEN)/release/*
+endif
+endif