We need a way to pass flags to rombuilds in Raptor via extension flm interfaces, so that the CPP pass
of the rom input files can be informed what toolchain we are building with and conditionally
include or exclude files depending on whether the toolchain could build them.
#
# Copyright (c) 2009 Symbian. All rights reserved.
#
ifdef ROM_DEFS
ROMBUILD_FLAGS := --define="$(ROM_DEFS)"
endif
ifeq ($(OSTYPE),unix)
rombuilder := $(EPOCROOT)/epoc32/rom/tools/romnibus.pl
else
rombuilder := $(EPOCROOT)/sf/os/kernelhwsrv/kernel/eka/rombuild/rom_sbs.pl
endif
# macro for all the rules
define rom
FINAL::
$(call startrule,rom) \
$(PERL) $(rombuilder) $(ROMBUILD_FLAGS) --variant=$(REE_TARGET) --inst=$(PLATFORM) --build=$(CFG) --type=$(TYPE) --clean --name=$(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG).img \
$(call endrule,rom)
FINAL::
$(call startrule,copy) \
mv rom.oby $(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG)_rom.oby; \
mv ROMBUILD.LOG $(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG)_ROMBUILD.LOG; \
mv $(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG).img $(EPOCROOT)/epoc32/rom/$(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG).img; \
$(call endrule,copy)
endef
# expand
$(eval $(rom))
# The items produced by this FLM:
RELEASEABLES:=$(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG)_rom.oby $(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG)_ROMBUILD.LOG $(EPOCROOT)/epoc32/rom/$(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG).img
## What targets -- declare the files produced here
$(eval $(call whatmacro, $(RELEASEABLES)))
## Clean up
$(eval $(call GenerateStandardCleanTarget, $(RELEASEABLES)))