Bump version to 6.4.7.2.M8
[LibreOffice.git] / ios / CustomTarget_iOS_link.mk
blobfc4d88ee8f0fa03652b4768f5ae51772f9ec67f6
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #- Env ------------------------------------------------------------------------
11 IOSGEN = $(BUILDDIR)/workdir/CustomTarget/ios
12 IOSLIBS := $(shell \
13 (export INSTDIR=$(INSTDIR);export OS=$(OS); \
14 export WORKDIR=$(WORKDIR);export LIBO_LIB_FOLDER=$(LIBO_LIB_FOLDER); \
15 $(SRCDIR)/bin/lo-all-static-libs))
16 IOSOBJ = $(IOSGEN)/Kit.o
17 IOSSRC = $(SRCDIR)/ios/source/LibreOfficeKit.c
19 ifeq ($(ENABLE_DEBUG),TRUE)
20 ifeq ($(CPUNAME),X86_64)
21 IOSKIT = $(IOSGEN)/Debug_x86_64/libKit.dylib
22 else
23 IOSKIT = $(IOSGEN)/Debug_arm64/libKit.dylib
24 endif
25 else
26 ifeq ($(CPUNAME),ARM64)
27 IOSKIT = $(IOSGEN)/Release_arm64/libKit.dylib
28 endif
29 endif
33 #- Top level -----------------------------------------------------------------
34 $(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_link))
36 $(call gb_CustomTarget_get_target,ios/iOS_link): $(IOSKIT)
39 #- build ---------------------------------------------------------------------
40 $(IOSOBJ): $(IOSSRC) $(call gb_CustomTarget_get_target,ios/iOS_setup)
41 $(call gb_Output_announce,iOS compile interface,$(true),C,2)
42 $(gb_CC) $(gb_COMPILERDEFS) $(gb_OSDEFS) $(gb_CFLAGS) \
43 -DDISABLE_DYNLOADING -DLIBO_INTERNAL_ONLY \
44 -fvisibility=hidden -Werror -O0 -fstrict-overflow \
45 $(if $(ENABLE_DEBUG),-g) \
46 -c $(IOSSRC) -o $(IOSOBJ) \
47 -I$(SRCDIR)/include -I$(BUILDDIR)/config_host \
49 $(IOSKIT): $(IOSOBJ) $(IOSLIBS)
50 $(call gb_Output_announce,iOS dylib,$(true),LNK,2)
51 $(gb_CC) -dynamiclib \
52 -Xlinker -rpath -Xlinker @executable_path/Frameworks \
53 -Xlinker -rpath -Xlinker @loader_path/Frameworks \
54 -install_name @rpath/libKit.dylib \
55 -dead_strip \
56 -Xlinker -export_dynamic \
57 -Xlinker -no_deduplicate \
58 -Xlinker -objc_abi_version -Xlinker 2 \
59 -fobjc-link-runtime \
60 -framework CoreFoundation \
61 -framework CoreGraphics \
62 -framework CoreText \
63 -liconv \
64 -lc++ \
65 -lz \
66 -lpthread \
67 -single_module \
68 -compatibility_version 1 \
69 -current_version 1 \
70 `$(SRCDIR)/bin/lo-all-static-libs` \
71 $(IOSOBJ) \
72 -o $(IOSKIT)
73 ifeq ($(origin IOS_CODEID),undefined)
74 @echo "please define environment variable IOS_CODEID as\n" \
75 "export IOS_CODEID=<your apple code identifier>"
76 @exit -1
77 else
78 codesign -s "$(IOS_CODEID)" $(IOSKIT)
79 endif
82 #- clean ios -----------------------------------------------------------------
83 $(call gb_CustomTarget_get_clean_target,ios/iOS_link):
84 rm -f $(IOSKIT)
88 # vim: set noet sw=4 ts=4: