summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorjan Iversen <jani@libreoffice.org>2017-11-24 16:13:41 +0100
committerjan Iversen <jani@libreoffice.org>2017-11-24 16:15:07 +0100
commit86877f67da582db8c2ef2a320b67819ea20a474a (patch)
tree94a0a664a1728b7fa90091b4809f7d0d9c77d621 /ios
parentb9c2fac7bc81866c01b7179796861533aadc190b (diff)
iOS, prelink with native linker.
Removed the need for a xcode project to prelink all LO libraries. Change-Id: I16d38ae0205e73de59b1cf3abdbbb8d4fea6d24c
Diffstat (limited to 'ios')
-rw-r--r--ios/CustomTarget_iOS_prelink.mk53
-rw-r--r--ios/Module_ios.mk2
2 files changed, 55 insertions, 0 deletions
diff --git a/ios/CustomTarget_iOS_prelink.mk b/ios/CustomTarget_iOS_prelink.mk
new file mode 100644
index 000000000000..b48b43e5e0c3
--- /dev/null
+++ b/ios/CustomTarget_iOS_prelink.mk
@@ -0,0 +1,53 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# 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 ------------------------------------------------------------------------
+IOSDEV = /Applications/Xcode.app/Contents/Developer/
+IOSLD = $(IOSDEV)Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
+
+ifeq ($(ENABLE_DEBUG),TRUE)
+IOSKIT = $(SRCDIR)/ios/generated/libLibreOfficeKit_$(CPUNAME)_debug.o
+else
+IOSKIT = l$(SRCDIR)/ios/generated/libLibreOfficeKit_$(CPUNAME).o
+endif
+
+
+
+#- Top level -----------------------------------------------------------------
+$(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_prelink))
+
+$(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT)
+
+
+
+#- build ---------------------------------------------------------------------
+.PHONY: FORCE
+FORCE:
+
+$(IOSKIT): $(call gb_CustomTarget_get_target,iOS_kitBridge) FORCE
+ $(IOSLD) -r -ios_version_min 11.1 \
+ -syslibroot $(MACOSX_SDK_PATH) \
+ -arch `echo $(CPUNAME) | tr '[:upper:]' '[:lower:]'` \
+ -o $(IOSKIT) \
+ $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
+ `$(SRCDIR)/bin/lo-all-static-libs`
+
+
+
+# prelink parms: -ios_version_min 11.0 -lz -liconv -g -Wl
+# -e "s'@SYMROOT@'$(WORKDIR)/ios/build'g" \
+# -sdk $(IOS_SDK) \
+
+
+
+#- clean ios -----------------------------------------------------------------
+$(call gb_CustomTarget_get_clean_target,ios/iOS_prelink):
+ rm $(IOSKIT)
+
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/ios/Module_ios.mk b/ios/Module_ios.mk
index de8a8d2a0af7..c280713cc198 100644
--- a/ios/Module_ios.mk
+++ b/ios/Module_ios.mk
@@ -13,8 +13,10 @@ ifeq ($(OS),IOS)
$(eval $(call gb_Module_add_targets,ios,\
CustomTarget_iOS_setup \
StaticLibrary_iOSkit \
+ CustomTarget_iOS_prelink \
))
+
endif
# vim: set noet sw=4 ts=4: