--- a/sbsv2/raptor/lib/flm/e32abiv2.flm Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/flm/e32abiv2.flm Fri Jun 04 13:09:28 2010 +0100
@@ -48,11 +48,18 @@
ifeq ($(DOBUILD),1)
-$(if $(FLMDEBUG),$(info <flm name='e32abiv2' target='$(TARGET)' type='$(TARGETTYPE)' outputpath='$(OUTPUTPATH)' metasource='$(METASOURCE)' postlinkfiletype='$(POSTLINKFILETYPE)' />))
+$(if $(FLMDEBUG),$(info <debug><flm name='e32abiv2' target='$(TARGET)' type='$(TARGETTYPE)' outputpath='$(OUTPUTPATH)' metasource='$(METASOURCE)' postlinkfiletype='$(POSTLINKFILETYPE)' /></debug>))
+
+# Enable DELETE_ON_FAILED_COMPILE work around for failed RVCT 2.2 compiles
+ifneq ($(DELETE_ON_FAILED_COMPILE),)
+RVCT22_DELETE_WORKAROUND:=|| { $$(GNURM) $$@; exit 1; }
+endif # ifneq ($(DELETE_ON_FAILED_COMPILE),)
# Strip switch-type parameters
#
POSTLINKTARGETTYPE:=$(strip $(POSTLINKTARGETTYPE))
+TARGETEXT:=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
+
UID1:=$(strip $(UID1))
UID2:=$(strip $(UID2))
UID3:=$(strip $(UID3))
@@ -128,9 +135,9 @@
# Postlinkable targets need to be linked and elf2e32'd
ifneq ($(DOPOSTLINK),)
- E32TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
- LINK_TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).sym
- MAPFILE:=$(RELEASABLEPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).map
+ E32TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(TARGETEXT)
+ LINK_TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(TARGETEXT).sym
+ MAPFILE:=$(RELEASABLEPATH)/$(TARGET).$(TARGETEXT).map
else
E32TARGET:=
LINK_TARGET:=
@@ -165,13 +172,12 @@
IMPORTLIBTARGETVERSIONED_DSO:=$(VER_E32IMPORTLIBBASE).dso
endif
- # ABIv1 .lib (for specific builds, toolchains and host OS platforms only)
+ # ABIv1 .lib (for specific kits and toolchains only)
IMPORTLIBTARGET_LIB:=
IMPORTLIBTARGETVERSIONED_LIB:=
BUILDMARKER_IMPORTLIBTARGET_LIB:=TARGET_$(subst :,,$(VER_E32IMPORTLIBBASE)).lib
- # Only for builds that require and support them, and only on windows
- ifeq ($(OSTYPE),cygwin)
- ifeq ($(GENERATE_ABIV1_IMPLIBS),1)
+ # Only for kits that require and tools that support them
+ ifneq ($(SUPPORTS_ABIV1_IMPLIBS),)
WHATRELEASE:=$(WHATRELEASE) $(if $(EXPLICITVERSION),,$(TMP_IMPORTLIBTARGET_ROOT).lib)
WHATRELEASE:=$(WHATRELEASE) $(VER_E32IMPORTLIBBASE).lib
ifeq ($($(BUILDMARKER_IMPORTLIBTARGET_LIB)),)
@@ -179,7 +185,6 @@
IMPORTLIBTARGETVERSIONED_LIB:=$(VER_E32IMPORTLIBBASE).lib
endif
endif
- endif
endif
# Try to make sure that we get the right linkas name
@@ -187,7 +192,7 @@
# put the hex version number in the right place
ifeq ($(LINKAS),)
LINKASNAME=$(TARGET)
- LINKASTYPE=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
+ LINKASTYPE=$(TARGETEXT)
else
SPLIT_LINKAS=$(subst ., ,$(LINKAS))
LINKASNAME=$(word 1,$(SPLIT_LINKAS))
@@ -712,6 +717,7 @@
# USE_TRACE_COMPILER defaults to blank in Raptor config.
# Users can turn TC on by setting it to 1 in user config.
ifneq ($(USE_TRACE_COMPILER),)
+ # TARGETEXT is already set
include $(FLMHOME)/tracecompiler.mk
WHATRELEASE:=$(WHATRELEASE) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER)
endif
@@ -792,7 +798,7 @@
$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(1).d)) \
$(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACK_OPTION)$(call dblquote,$(FEEDBACKFILE))) \
$(if $(MULTIFILE_ENABLED),--multifile $(OUTPUT_OPTION) $(MULTIFILEOBJECT) \
- --via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<)) \
+ --via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<)) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(call endrule,compile)
ifeq ($(NO_DEPEND_GENERATE),)
@@ -851,7 +857,7 @@
$(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(USERINCLUDE))) \
$(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(SYSTEMINCLUDE))) \
$(if $(NOHIDEALL),--no_hide_all,) \
- $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) \
+ $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(call endrule,e32cpponly)
CLEANTARGETS:=$$(CLEANTARGETS) $(CPPONLYTARGET)
@@ -864,7 +870,7 @@
define e32abiv2_listing
# $1 is the sourcefile
-$(eval LISTINGTARGET:=$(strip $(call extractandmap,$(CPPFILEEXTENSIONS) $(CFILEEXTENSIONS),.$(subst _,.,$(call sanitise,$(FULLVARIANTPATH))).$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).lst,$1)))
+$(eval LISTINGTARGET:=$(strip $(call extractandmap,$(CPPFILEEXTENSIONS) $(CFILEEXTENSIONS),.$(subst _,.,$(call sanitise,$(FULLVARIANTPATH))).$(TARGET).$(TARGETEXT).lst,$1)))
$(eval DEPENDFILENAME:=$(call map2listfile,$1).d)
$(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
@@ -886,7 +892,7 @@
$(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(SYSTEMINCLUDE))) \
$(if $(NOHIDEALL),--no_hide_all,) \
$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \
- $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) \
+ $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(call endrule,e32listing)
CLEANTARGETS:=$$(CLEANTARGETS) $(LISTINGTARGET)
@@ -920,7 +926,7 @@
# separate arguments are interpreted as a single argument when passed to bash
FIVESPACES=$(BLANK) $(BLANK)
-FREEZEGUARD:=TARGET_$(TARGET)_$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))_$(IMPORTLIBPATH)_EFREEZE
+FREEZEGUARD:=TARGET_$(TARGET)_$(TARGETEXT)_$(IMPORTLIBPATH)_EFREEZE
define e32freeze
@@ -981,7 +987,7 @@
$(call makemacrodef,-D,$(COMPILER_INTERWORK_DEFINES) $(CDEFS) $(CIADEFS)) $(CPP_LANG_OPTION) \
$(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(USERINCLUDE))) \
$(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(SYSTEMINCLUDE))) \
- $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \
+ $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(call endrule,cia2cpp2o)
@@ -1007,7 +1013,7 @@
$(e32abiv2_PREFILE): $1 $(PROJECT_META) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT)
$(call startrule,cia2cpp,,$1) \
$(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \
- $(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) \
+ $(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(if $(NO_DEPEND_GENERATE),,&& $(CC) -M $(e32abiv2_PREFILE_OPTIONS) --depend_format=unix $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) > $(call dblquote,$(e32abiv2_PREFILE).d)) \
$(call endrule,cia2cpp)
@@ -1052,12 +1058,12 @@
$(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \
$(CC) $(e32abiv2_asm_OPTIONS) \
$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \
- $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \
+ $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(call endrule,asmcompile)
ifeq ($(NO_DEPEND_GENERATE),)
$(call startrule,asmdependencies) \
$(CC) -M $(subst --no_rtti,,$(e32abiv2_asm_OPTIONS)) --depend_format=unix \
- $(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) \
+ $(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(call endrule,asmdependencies)
endif
@@ -1096,7 +1102,7 @@
# Default values
ROMFILETYPE:=file
ROMFILE:=$(TARGET).$(REQUESTEDTARGETEXT)
- ROMPATH:=sys/bin/
+ ROMPATH:=$(if $(TARGETPATH),$(TARGETPATH)/,sys/bin/)
ROMDECORATIONS:=
ROMFILETYPE_RAM:=data
ROMFILE_RAM:=$(TARGET).$(REQUESTEDTARGETEXT)
@@ -1117,6 +1123,7 @@
endif
+ DATATEXT:=
ifeq ($(TESTCODE),TRUE)
# Add 'TEST' to the .iby filename
ROMTEST:=test
@@ -1127,8 +1134,6 @@
DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TEST_OPTION).bat test/$(MODULE).$(TEST_OPTION).bat"
endif
endif
- else
- DATATEXT:=
endif
# ROMTARGET
@@ -1174,8 +1179,8 @@
$(call startrule,rombuild) \
$(GNUMKDIR) -p $(ROMDIR) \
$(if $(ROMFILE_CREATED_$(TOBLDINF)),,&& echo -e "// $(subst $(EPOC_ROOT)/,,$(ROMFILENAME))\n//\n$(DATATEXT)" > $(ROMFILENAME)) \
- $(if $(BUILDROMTARGET),&& echo "$(ROMFILETYPE)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET).$(REQUESTEDTARGETEXT) $(1)$(ROMDECORATIONS)" >> $(ROMFILENAME)) \
- $(if $(RAMTARGET),&& echo "$(ROMFILETYPE_RAM)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET).$(REQUESTEDTARGETEXT) $(ROMPATH_RAM)$(ROMFILE_RAM)$(ROMDECORATIONS_RAM)" >> $(ROMFILENAME)) \
+ $(if $(BUILDROMTARGET),&& echo "$(ROMFILETYPE)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(REQUESTEDTARGETEXT) $(1)$(ROMDECORATIONS)" >> $(ROMFILENAME)) \
+ $(if $(RAMTARGET),&& echo "$(ROMFILETYPE_RAM)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(REQUESTEDTARGETEXT) $(ROMPATH_RAM)$(ROMFILE_RAM)$(ROMDECORATIONS_RAM)" >> $(ROMFILENAME)) \
$(call endrule,buildromfiletarget)
endef