Kaydet (Commit) ffd99429 authored tarafından jan Iversen's avatar jan Iversen

iOS, catch library changes in make

Updated makefiles to be dependent on the static libs, ensuring
that iOS is rebuild when a core library changed.

Change-Id: I5ebd1d703eb9a3af0e284910cdc307dd62f4d3fc
üst 80074e28
...@@ -6,16 +6,21 @@ ...@@ -6,16 +6,21 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
#- Env ------------------------------------------------------------------------ #- Env ------------------------------------------------------------------------
IOSLIB = ''
IOSLD = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld IOSLD = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
IOSCLANG = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang IOSCLANG = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
IOSOBJ = $(WORKDIR)/CObject/ios/Kit.o IOSOBJ = $(WORKDIR)/CObject/ios/Kit.o
ifeq ($(ENABLE_DEBUG),TRUE) ifeq ($(ENABLE_DEBUG),TRUE)
IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.dylib ifeq ($(CPUNAME),X86_64)
IOSKIT2 = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.a IOSKIT = $(IOSGEN)/simulator/libKit
else else
IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME).dylib IOSKIT = $(IOSGEN)/debug/libKit
IOSKIT2 = $(SRCDIR)/ios/generated/libKit_$(CPUNAME).a endif
else
ifeq ($(CPUNAME),ARM64)
IOSKIT = $(IOSGEN)/release/libKit
endif
endif endif
...@@ -23,7 +28,7 @@ endif ...@@ -23,7 +28,7 @@ endif
#- Top level ----------------------------------------------------------------- #- Top level -----------------------------------------------------------------
$(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_prelink)) $(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_prelink))
$(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT) $(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT).dylib
...@@ -32,14 +37,19 @@ $(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT) ...@@ -32,14 +37,19 @@ $(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT)
FORCE: FORCE:
$(IOSKIT): $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o IOSPREBUILD: FORCE
$(IOSLD) -r -ios_version_min 11.2 \ $(eval IOSLIBS = `$(SRCDIR)/bin/lo-all-static-libs`)
$(IOSKIT).dylib: $(WORKDIR)/ios $(call gb_StaticLibrary_get_target,iOS_kitBridge) $(IOSLIBS)
$(IOSLD) -r -ios_version_min $(IOS_DEPLOYMENT_VERSION) \
-syslibroot $(MACOSX_SDK_PATH) \ -syslibroot $(MACOSX_SDK_PATH) \
-arch `echo $(CPUNAME) | tr '[:upper:]' '[:lower:]'` \ -arch `echo $(CPUNAME) | tr '[:upper:]' '[:lower:]'` \
-o $(IOSOBJ) \ -o $(IOSOBJ) \
$(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \ $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
`$(SRCDIR)/bin/lo-all-static-libs` $(IOSLIBS)
$(AR) -r $(IOSKIT2) $(IOSOBJ) $(AR) -r $(IOSKIT).a $(IOSOBJ)
$(IOSCLANG) -dynamiclib -mios-simulator-version-min=$(IOS_DEPLOYMENT_VERSION) \ $(IOSCLANG) -dynamiclib -mios-simulator-version-min=$(IOS_DEPLOYMENT_VERSION) \
-arch `echo $(CPUNAME) | tr '[:upper:]' '[:lower:]'` \ -arch `echo $(CPUNAME) | tr '[:upper:]' '[:lower:]'` \
...@@ -61,15 +71,14 @@ $(IOSKIT): $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o ...@@ -61,15 +71,14 @@ $(IOSKIT): $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o
-single_module \ -single_module \
-compatibility_version 1 \ -compatibility_version 1 \
-current_version 1 \ -current_version 1 \
$(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \ $(IOSKIT).a \
`$(SRCDIR)/bin/lo-all-static-libs` \ -o $(IOSKIT).dylib
-o $(IOSKIT)
ifeq ($(origin IOS_CODEID),undefined) ifeq ($(origin IOS_CODEID),undefined)
@echo "please define environment variable IOS_CODEID as\n" \ @echo "please define environment variable IOS_CODEID as\n" \
"export IOS_CODEID=<your apple code identifier>" "export IOS_CODEID=<your apple code identifier>"
@exit -1 @exit -1
else else
codesign -s "$(IOS_CODEID)" $(IOSKIT) codesign -s "$(IOS_CODEID)" $(IOSKIT).dylib
endif endif
...@@ -77,7 +86,7 @@ endif ...@@ -77,7 +86,7 @@ endif
#- clean ios ----------------------------------------------------------------- #- clean ios -----------------------------------------------------------------
$(call gb_CustomTarget_get_clean_target,ios/iOS_prelink): $(call gb_CustomTarget_get_clean_target,ios/iOS_prelink):
rm -f $(IOSKIT) $(IOSKIT2) rm -f $(IOSKIT).a $(IOSKIT).dylib
......
...@@ -17,15 +17,28 @@ $(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_setup)) ...@@ -17,15 +17,28 @@ $(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_setup))
$(call gb_CustomTarget_get_target,ios/iOS_setup): $(IOSGEN)/native-code.h $(call gb_CustomTarget_get_target,ios/iOS_setup): $(IOSGEN)/native-code.h
#- build ---------------------------------------------------------------------
.PHONY: FORCE
FORCE:
#- Generate dynamic files ---------------------------------------------------
$(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_iOS_setup.mk $(WORKDIR)/ios:
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRE,2)
mkdir -p $(IOSGEN) $(IOSRES) $(IOSRES)/services \ mkdir -p $(IOSGEN) $(IOSRES) $(IOSRES)/services \
$(IOSRES)/share/config $(IOSRES)/share/filter $(IOSRES)/program \ $(IOSRES)/share/config $(IOSRES)/share/filter $(IOSRES)/program \
$(IOSGEN)/simulator \
$(IOSGEN)/debug \
$(IOSGEN)/release \
$(IOSGEN) $(WORKDIR)/ios; $(IOSGEN) $(WORKDIR)/ios;
#- Generate dynamic files ---------------------------------------------------
$(IOSGEN)/native-code.h: $(WORKDIR)/ios $(BUILDDIR)/config_host.mk \
$(SRCDIR)/ios/CustomTarget_iOS_setup.mk
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
# generate file with call declarations # generate file with call declarations
$(SRCDIR)/solenv/bin/native-code.py \ $(SRCDIR)/solenv/bin/native-code.py \
-C -g core -g writer -g calc -g draw -g edit \ -C -g core -g writer -g calc -g draw -g edit \
...@@ -88,8 +101,20 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_i ...@@ -88,8 +101,20 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_i
#- clean ios ----------------------------------------------------------------- #- clean ios -----------------------------------------------------------------
$(call gb_CustomTarget_get_clean_target,ios/iOS_setup): $(call gb_CustomTarget_get_clean_target,ios/iOS_setup):
$(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),ENV,2) $(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),ENV,2)
rm -rf $(IOSRES) $(IOSGEN)/native-code.h $(IOSAPPXC) echo $(call gb_StaticLibrary_get_target,iOS_kitBridge)
rm -rf $(IOSRES) $(IOSGEN)/native-code.h $(IOSGEN)/build
rm -rf $(WORKDIR)/ios rm -rf $(WORKDIR)/ios
ifeq ($(ENABLE_DEBUG),TRUE)
ifeq ($(CPUNAME),X86_64)
rm -f $(IOSGEN)/simulator/*
else
rm -f $(IOSGEN)/debug/*
endif
else
ifeq ($(CPUNAME),ARM64)
rm -f $(IOSGEN)/release/*
endif
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment