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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
99
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
     1
#
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
     2
# Copyright (c) 2009 Symbian.  All rights reserved.
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
     3
#
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
     4
303
9b85206a602c We need a way to pass flags to rombuilds in Raptor via extension flm interfaces, so that the CPP pass
Mike Kinghan <mikek@symbian.org>
parents: 205
diff changeset
     5
ifdef ROM_DEFS
9b85206a602c We need a way to pass flags to rombuilds in Raptor via extension flm interfaces, so that the CPP pass
Mike Kinghan <mikek@symbian.org>
parents: 205
diff changeset
     6
ROMBUILD_FLAGS := --define="$(ROM_DEFS)"
9b85206a602c We need a way to pass flags to rombuilds in Raptor via extension flm interfaces, so that the CPP pass
Mike Kinghan <mikek@symbian.org>
parents: 205
diff changeset
     7
endif
9b85206a602c We need a way to pass flags to rombuilds in Raptor via extension flm interfaces, so that the CPP pass
Mike Kinghan <mikek@symbian.org>
parents: 205
diff changeset
     8
205
0b74fa7370f0 Support rom building under Linux, using the FCL/interim/sftools/linux_build/ tools
Mike Kinghan <mikek@symbian.org>
parents: 99
diff changeset
     9
ifeq ($(OSTYPE),unix)
0b74fa7370f0 Support rom building under Linux, using the FCL/interim/sftools/linux_build/ tools
Mike Kinghan <mikek@symbian.org>
parents: 99
diff changeset
    10
	rombuilder := $(EPOCROOT)/epoc32/rom/tools/romnibus.pl
0b74fa7370f0 Support rom building under Linux, using the FCL/interim/sftools/linux_build/ tools
Mike Kinghan <mikek@symbian.org>
parents: 99
diff changeset
    11
else
0b74fa7370f0 Support rom building under Linux, using the FCL/interim/sftools/linux_build/ tools
Mike Kinghan <mikek@symbian.org>
parents: 99
diff changeset
    12
	rombuilder := $(EPOCROOT)/sf/os/kernelhwsrv/kernel/eka/rombuild/rom_sbs.pl 
0b74fa7370f0 Support rom building under Linux, using the FCL/interim/sftools/linux_build/ tools
Mike Kinghan <mikek@symbian.org>
parents: 99
diff changeset
    13
endif
0b74fa7370f0 Support rom building under Linux, using the FCL/interim/sftools/linux_build/ tools
Mike Kinghan <mikek@symbian.org>
parents: 99
diff changeset
    14
99
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    15
# macro for all the rules
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    16
define rom
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    17
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    18
FINAL::	
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    19
	$(call startrule,rom) \
303
9b85206a602c We need a way to pass flags to rombuilds in Raptor via extension flm interfaces, so that the CPP pass
Mike Kinghan <mikek@symbian.org>
parents: 205
diff changeset
    20
	$(PERL) $(rombuilder) $(ROMBUILD_FLAGS) --variant=$(REE_TARGET) --inst=$(PLATFORM) --build=$(CFG) --type=$(TYPE) --clean --name=$(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG).img \
99
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    21
	$(call endrule,rom)
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    22
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    23
FINAL::	
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    24
	$(call startrule,copy) \
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    25
	mv rom.oby $(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG)_rom.oby; \
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    26
	mv ROMBUILD.LOG $(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG)_ROMBUILD.LOG; \
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    27
	mv $(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG).img $(EPOCROOT)/epoc32/rom/$(REE_TARGET)_$(TYPE)_$(PLATFORM)_$(CFG).img; \
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    28
	$(call endrule,copy)
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    29
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    30
endef
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    31
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    32
# expand
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    33
$(eval $(rom))
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    34
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    35
# The items produced by this FLM:
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    36
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
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    37
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    38
## What targets -- declare the files produced here
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    39
$(eval $(call whatmacro, $(RELEASEABLES)))
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    40
## Clean up
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    41
$(eval $(call GenerateStandardCleanTarget, $(RELEASEABLES)))
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    42
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    43
6e5f9f6173bc re-apply changes to support syborg rom
andy simpson <andrews@symbian.org>
parents:
diff changeset
    44