summaryrefslogtreecommitdiff
path: root/ios/CustomTarget_Lo_Xcconfig.mk
blob: 8670355d519dbc6746548f756bf4836cc0b13279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- 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/.

$(eval $(call gb_CustomTarget_CustomTarget,ios/Lo_Xcconfig))

LO_XCCONFIG = $(BUILDDIR)/ios/lo.xcconfig

$(call gb_CustomTarget_get_target,ios/Lo_Xcconfig): $(LO_XCCONFIG)

.PHONY : $(LO_XCCONFIG)

$(LO_XCCONFIG) :
    # Edit the Xcode configuration file:
    # - the list of all our (static) libs
    # - compiler flags
    #
	all_libs=`$(SRCDIR)/bin/lo-all-static-libs`; \
	\
	sed -e "s;^\(LINK_LDFLAGS =\).*$$;\1 -Wl,-map,$(WORKDIR)/\$$(TARGET_NAME).map $$all_libs;" \
		-e "s,^\(OTHER_CFLAGS =\).*$$,\1 $(gb_GLOBALDEFS)," \
		-e "s,^\(OTHER_CPLUSPLUSFLAGS =\).*$$,\1 $(gb_GLOBALDEFS)," \
			< $(LO_XCCONFIG) > $(LO_XCCONFIG).new && mv $(LO_XCCONFIG).new $(LO_XCCONFIG)

    # When SRCDIR!=BUILDDIR, Xcode is used on the project in the
    # *source* tree (because that is where the source files are). Copy
    # the configuration file to the corresponding source dir so that
    # Xcode can find it.
	if test $(SRCDIR) != $(BUILDDIR); then \
		cp $(LO_XCCONFIG) $(SRCDIR)/ios; \
	fi

# Do *not* remove $(LO_XCCONFIG) in a clean target. It is created
# during configure, not in this custom gbuild makefile.

# vim: set noet sw=4 ts=4: