kernel/eka/rombuild/rom.flm
author Mike Kinghan <mikek@symbian.org>
Tue, 16 Nov 2010 14:39:21 +0000
branchGCC_SURGE
changeset 303 9b85206a602c
parent 205 0b74fa7370f0
child 304 65c392e2638d
permissions -rw-r--r--
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)))