Colibre:^filter, auto New DB & template move action, date field
[LibreOffice.git] / ios / CustomTarget_iOS_link.mk
blob240f38d071b4c8e3415719dbf1d8e0a7434a3510
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 $(call gb_Trace_StartRange,iOS dylib,LNK)
52 $(gb_CC) -dynamiclib \
53 -Xlinker -rpath -Xlinker @executable_path/Frameworks \
54 -Xlinker -rpath -Xlinker @loader_path/Frameworks \
55 -install_name @rpath/libKit.dylib \
56 -dead_strip \
57 -Xlinker -export_dynamic \
58 -Xlinker -no_deduplicate \
59 -Xlinker -objc_abi_version -Xlinker 2 \
60 -fobjc-link-runtime \
61 -framework CoreFoundation \
62 -framework CoreGraphics \
63 -framework CoreText \
64 -liconv \
65 -lc++ \
66 -lz \
67 -lpthread \
68 -single_module \
69 -compatibility_version 1 \
70 -current_version 1 \
71 `$(SRCDIR)/bin/lo-all-static-libs` \
72 $(IOSOBJ) \
73 -o $(IOSKIT)
74 ifeq ($(origin IOS_CODEID),undefined)
75 @echo "please define environment variable IOS_CODEID as\n" \
76 "export IOS_CODEID=<your apple code identifier>"
77 @exit -1
78 else
79 codesign -s "$(IOS_CODEID)" $(IOSKIT)
80 endif
81 $(call gb_Trace_EndRange,iOS dylib,LNK)
84 #- clean ios -----------------------------------------------------------------
85 $(call gb_CustomTarget_get_clean_target,ios/iOS_link):
86 rm -f $(IOSKIT)
90 # vim: set noet sw=4 ts=4: