kernel/eka/extension/rom.flm
author William Roberts <williamr@symbian.org>
Sun, 03 Oct 2010 11:32:45 +0100
changeset 277 1686aa1db1e4
permissions -rw-r--r--
Add rom.flm and rom_sbs.pl
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
277
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
     1
#
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
     2
# Copyright (c) 2009-2010 Symbian.  All rights reserved.
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
     3
# All rights reserved.
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
     4
# This component and the accompanying materials are made available
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
     5
# under the terms of "Eclipse Public License v1.0"
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
     6
# which accompanies this distribution, and is available
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
     8
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
     9
# macro for all the rules
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    10
define rom
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    11
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    12
FINAL::	
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    13
ifeq ($(OSTYPE),unix)
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    14
	$(call startrule,rom) \
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    15
	echo "This is not supported currently"; \
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    16
	$(call endrule,rom)
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    17
else
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    18
	$(call startrule,rom) \
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    19
	$(PERL) $(EPOCROOT)/sf/os/kernelhwsrv/kernel/eka/rombuild/rom_sbs.pl --variant=$(REE_TARGET) --inst=$(REE_PLATFORM) --build=$(CFG) --type=$(TYPE) --clean $(ROM_OPTIONS) --name=$(FULL_ROM_NAME).img \
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    20
	$(call endrule,rom)
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    21
endif
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    22
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    23
	$(call startrule,copy) \
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    24
	mv rom.oby $(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(FULL_ROM_NAME)_rom.oby; \
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    25
	mv ROMBUILD.LOG $(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(FULL_ROM_NAME)_ROMBUILD.LOG; \
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    26
	mv $(FULL_ROM_NAME).img $(EPOCROOT)/epoc32/rom/$(FULL_ROM_NAME).img; \
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    27
	$(call endrule,copy)
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    28
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    29
endef
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    30
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    31
# expand
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    32
ROM_OPTIONS:=$(foreach macro,$(REE_DEFINES), -d $(macro))
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    33
REE_PLATFORM:=$(PLATFORM)
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    34
ifneq ($(findstring SMP,$(REE_PLATFORM)),)
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    35
  # SMP target, so select underlying instruction set
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    36
  ROM_OPTIONS:=$(ROM_OPTIONS) --xabi=$(PLATFORM)
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    37
  REE_PLATFORM:=$(subst SMP,,$(REE_PLATFORM))
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    38
endif
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    39
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    40
ifeq "$(ROM_NAME)" ""
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    41
ROM_NAME:=$(REE_TARGET)
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    42
endif
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    43
FULL_ROM_NAME:=$(ROM_NAME)_$(TYPE)_$(PLATFORM)_$(CFG)
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    44
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    45
$(eval $(rom))
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    46
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    47
# The items produced by this FLM:
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    48
RELEASEABLES:=$(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(FULL_ROM_NAME)_rom.oby $(EPOCROOT)/epoc32/rom/$(REE_TARGET)/$(FULL_ROM_NAME)_ROMBUILD.LOG $(EPOCROOT)/epoc32/rom/$(FULL_ROM_NAME).img
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    49
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    50
## What targets -- declare the files produced here
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    51
$(eval $(call whatmacro, $(RELEASEABLES)))
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    52
## Clean up
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    53
$(eval $(call GenerateStandardCleanTarget, $(RELEASEABLES)))
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    54
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    55
1686aa1db1e4 Add rom.flm and rom_sbs.pl
William Roberts <williamr@symbian.org>
parents:
diff changeset
    56