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
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
23 IOSKIT
= $(IOSGEN
)/Debug_arm64
/libKit.dylib
26 ifeq ($(CPUNAME
),ARM64
)
27 IOSKIT
= $(IOSGEN
)/Release_arm64
/libKit.dylib
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 \
56 -Xlinker
-export_dynamic \
57 -Xlinker
-no_deduplicate \
58 -Xlinker
-objc_abi_version
-Xlinker
2 \
60 -framework CoreFoundation \
61 -framework CoreGraphics \
68 -compatibility_version
1 \
70 `$(SRCDIR)/bin/lo-all-static-libs` \
73 ifeq ($(origin IOS_CODEID
),undefined
)
74 @echo
"please define environment variable IOS_CODEID as\n" \
75 "export IOS_CODEID=<your apple code identifier>"
78 codesign
-s
"$(IOS_CODEID)" $(IOSKIT
)
82 #- clean ios -----------------------------------------------------------------
83 $(call gb_CustomTarget_get_clean_target
,ios
/iOS_link
):
88 # vim: set noet sw=4 ts=4: