221 DSODEFFILENAMEBASE:=$(E32SOME){$(VERSIONHEX)}.$(E32VAR2) |
221 DSODEFFILENAMEBASE:=$(E32SOME){$(VERSIONHEX)}.$(E32VAR2) |
222 else |
222 else |
223 DSODEFFILENAMEBASE:=$(TARGET){$(VERSIONHEX)} |
223 DSODEFFILENAMEBASE:=$(TARGET){$(VERSIONHEX)} |
224 endif |
224 endif |
225 GENERATED_DSO:=$(call dblquote,$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).dso) |
225 GENERATED_DSO:=$(call dblquote,$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).dso) |
226 GENERATED_DEFFILE:=$(call dblquote,$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).def) |
226 GENERATED_DEFFILE:=$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).def |
227 |
227 |
228 ## IMPORT LIBRARY ########################################################### |
228 ## IMPORT LIBRARY ########################################################### |
229 |
229 |
230 # Static libraries will be postlinked when they are used so don't try to postlink them |
230 # Static libraries will be postlinked when they are used so don't try to postlink them |
231 |
231 |
349 |
349 |
350 # If frozen, a prepped .def file is used as the basis for .lib creation |
350 # If frozen, a prepped .def file is used as the basis for .lib creation |
351 # If unfrozen, .lib files are based on the .def file generated by the final postlink |
351 # If unfrozen, .lib files are based on the .def file generated by the final postlink |
352 $(IMPORTLIBTARGETVERSIONED_LIB): $(if $(EXPORTUNFROZEN),$(E32TARGET),$(PREPPEDDEFFILE)) |
352 $(IMPORTLIBTARGETVERSIONED_LIB): $(if $(EXPORTUNFROZEN),$(E32TARGET),$(PREPPEDDEFFILE)) |
353 $(call startrule,importlibversioned_abiv1) \ |
353 $(call startrule,importlibversioned_abiv1) \ |
354 if [ -f "$(EPOCROOT)/epoc32/tools/def2dll.pl" -a -f "$(if $(EXPORTUNFROZEN),$(GENERATED_DEFFILE),$(PREPPEDDEFFILE))" ]; then \ |
354 if [ -f "$(EPOCROOT)/epoc32/tools/def2dll.pl" -a -f "$(if $(EXPORTUNFROZEN),$(call dblquote,$(GENERATED_DEFFILE)),$(PREPPEDDEFFILE))" ]; then \ |
355 $(PERL) $(EPOCROOT)/epoc32/tools/def2dll.pl \ |
355 $(PERL) $(EPOCROOT)/epoc32/tools/def2dll.pl \ |
356 --path=$(IMPORTLIBPATH) \ |
356 --path=$(IMPORTLIBPATH) \ |
357 --bldpath=$(INTERMEDIATEPATH) \ |
357 --bldpath=$(INTERMEDIATEPATH) \ |
358 --import=$(notdir $(basename $(IMPORTLIBTARGETVERSIONED_LIB))) \ |
358 --import=$(notdir $(basename $(IMPORTLIBTARGETVERSIONED_LIB))) \ |
359 --deffile="$(if $(EXPORTUNFROZEN),$(GENERATED_DEFFILE),$(PREPPEDDEFFILE))" \ |
359 --deffile="$(if $(EXPORTUNFROZEN),$(call dblquote,$(GENERATED_DEFFILE)),$(PREPPEDDEFFILE))" \ |
360 --linkAs=$(call dblquote,$(LINKASVERSIONED)) \ |
360 --linkAs=$(call dblquote,$(LINKASVERSIONED)) \ |
361 --inter ; fi \ |
361 --inter ; fi \ |
362 $(call endrule,importlibversioned_abiv1) |
362 $(call endrule,importlibversioned_abiv1) |
363 |
363 |
364 ifeq ($(EXPLICITVERSION),) |
364 ifeq ($(EXPLICITVERSION),) |
601 $(call groupin10,$(LINKOBJECTS)) ;) |
601 $(call groupin10,$(LINKOBJECTS)) ;) |
602 $(call startrule,link) \ |
602 $(call startrule,link) \ |
603 $(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \ |
603 $(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \ |
604 $(if $(SUPPORTS_STDCPP_NEWLIB),$(if $(located_STATICLIBRARIES),$(CHECKLIB) $(CHECKLIB_TYPE) --elf $(call dblquote,$(located_STATICLIBRARIES)) &&,),) \ |
604 $(if $(SUPPORTS_STDCPP_NEWLIB),$(if $(located_STATICLIBRARIES),$(CHECKLIB) $(CHECKLIB_TYPE) --elf $(call dblquote,$(located_STATICLIBRARIES)) &&,),) \ |
605 $(LD) $(LINKER_MISC_FLAGS) $(LINKER_DEFAULT_LIB_PATHS) $(SYMBIAN_LINK_FLAGS) $(if $(DEBUG_INFO),$(LINKER_DEBUG_OPTION),$(LINKER_NODEBUG_OPTION)) \ |
605 $(LD) $(LINKER_MISC_FLAGS) $(LINKER_DEFAULT_LIB_PATHS) $(SYMBIAN_LINK_FLAGS) $(if $(DEBUG_INFO),$(LINKER_DEBUG_OPTION),$(LINKER_NODEBUG_OPTION)) \ |
|
606 $(if $(ARMLIBS),$(LD_WARNINGS_SUPPRESSION_ARMLIBS),) \ |
606 $(SHARED_OBJECT_OPTION) $(SPLIT_OPTION) \ |
607 $(SHARED_OBJECT_OPTION) $(SPLIT_OPTION) \ |
607 $(RW_BASE_OPTION) 0x400000 \ |
608 $(RW_BASE_OPTION) 0x400000 \ |
608 $(LINKER_ARCH_OPTION) \ |
609 $(LINKER_ARCH_OPTION) \ |
609 $(SYMVER_OPTION) $(SO_NAME_OPTION) $(call dblquote,$(LINKASVERSIONED)) \ |
610 $(SYMVER_OPTION) $(SO_NAME_OPTION) $(call dblquote,$(LINKASVERSIONED)) \ |
610 $(LINKER_ENTRYPOINT_SETTING) \ |
611 $(LINKER_ENTRYPOINT_SETTING) \ |
850 |
851 |
851 define e32freeze |
852 define e32freeze |
852 |
853 |
853 FREEZE:: $(1) |
854 FREEZE:: $(1) |
854 $(call startrule,freeze,,$(RESOLVED_DEFFILE)) \ |
855 $(call startrule,freeze,,$(RESOLVED_DEFFILE)) \ |
855 $(EFREEZE) $(EFREEZE_REMOVE_OPTION) "$(RESOLVED_DEFFILE)" $(FIVESPACES) $(GENERATED_DEFFILE) \ |
856 $(EFREEZE) $(EFREEZE_REMOVE_OPTION) "$(RESOLVED_DEFFILE)" $(FIVESPACES) $(call dblquote,$(GENERATED_DEFFILE)) \ |
856 $(call endrule,freeze) |
857 $(call endrule,freeze) |
857 endef |
858 endef |
858 |
859 |
859 # DEFFILE should only be generated for target types that have a def file |
860 # Only freeze once - udeb and urel cannot differ |
860 ifeq ($(MAKEDEFFILE),1) |
|
861 # Eval freeze only once - no point making the DEFFILE for urel *and* udeb. |
|
862 ifeq ($($(FREEZEGUARD)),) |
861 ifeq ($($(FREEZEGUARD)),) |
863 $(eval $(call e32freeze,$(E32TARGET))) |
862 # For most freezing activity we need the temporary .def file generated in the final post-link |
864 $(FREEZEGUARD):=1 |
863 # that lists the current exports - FREEZE can therefore be dependent on the final post-linked binary, |
865 endif |
864 # with the side-effect that a build is triggered if someone tries to freeze without having built. |
|
865 # |
|
866 # However, there's one case where we don't want to be dependent on the post-linked binary in this way, |
|
867 # and that's when (a) there are missing exports, (b) the user's aware of them and (c) they're deliberately freezing to |
|
868 # remove them using EFREEZE's remove option. Being dependent on the post-linked binary in this case, where ELF2E32 |
|
869 # actually fails to generate a final binary, would mean that the freeze would never happen and post-linking would |
|
870 # just be continually re-attempted (to fail each time). |
|
871 # |
|
872 # So, as a special case, if the user is explicitly attempting to freeze and perform removals, we make FREEZE dependent |
|
873 # on the temporary .def file instead. This has no rule to actually make it, but gives a hint as to what is wrong if |
|
874 # the users performs a freeze with remove without having explicitly built previously. |
|
875 # |
|
876 ifneq ($(EFREEZE_REMOVE_OPTION),) |
|
877 $(eval $(call e32freeze,$(GENERATED_DEFFILE))) |
|
878 else |
|
879 $(eval $(call e32freeze,$(E32TARGET))) |
|
880 endif |
|
881 $(FREEZEGUARD):=1 |
866 endif |
882 endif |
867 |
883 |
868 endif |
884 endif |
869 |
885 |
870 CLEANTARGETS:=$(CLEANTARGETS) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT),$(CPPFILES_LINKOBJECTS) $(CFILES_LINKOBJECTS)) |
886 CLEANTARGETS:=$(CLEANTARGETS) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT),$(CPPFILES_LINKOBJECTS) $(CFILES_LINKOBJECTS)) |