author | Zheng Shen <zheng.shen@nokia.com> |
Wed, 27 Oct 2010 19:16:18 +0800 | |
changeset 663 | 8e27d440923e |
parent 625 | a1925fb7753a |
child 674 | 37ee82a83d43 |
permissions | -rw-r--r-- |
625
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
1 |
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
2 |
# All rights reserved. |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
3 |
# This component and the accompanying materials are made available |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
4 |
# under the terms of the License "Eclipse Public License v1.0" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
5 |
# which accompanies this distribution, and is available |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
7 |
# |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
8 |
# Initial Contributors: |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
9 |
# Nokia Corporation - initial contribution. |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
10 |
# |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
11 |
# Contributors: |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
12 |
# |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
13 |
# Description: |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
14 |
# |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
15 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
16 |
EPOC_ROOT:=$(patsubst %/,%,$(EPOCROOT)) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
17 |
TOBLDINF:=$(dir $(subst :,,$(subst $(EPOC_ROOT)/,,$(COMPONENT_META)))) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
18 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
19 |
ifeq ($(ROMFILE_$(call sanitise,$(TOBLDINF)$(TARGET).$(REQUESTEDTARGETEXT))),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
20 |
ROMFILE_$(call sanitise,$(TOBLDINF)$(TARGET).$(REQUESTEDTARGETEXT)):=1 |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
21 |
ROMDIR:=$(EPOC_ROOT)/epoc32/rom/$(TOBLDINF) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
22 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
23 |
# Default values |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
24 |
ROMFILETYPE:=file |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
25 |
ROMFILE:=$(TARGET).$(REQUESTEDTARGETEXT) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
26 |
ROMPATH:=$(if $(TARGETPATH),$(TARGETPATH)/,sys/bin/) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
27 |
ROMDECORATIONS:= |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
28 |
ROMFILETYPE_RAM:=data |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
29 |
ROMFILE_RAM:=$(TARGET).$(REQUESTEDTARGETEXT) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
30 |
ROMPATH_RAM:=sys/bin/ |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
31 |
BUILDROMTARGET:=1 |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
32 |
ABIDIR:=MAIN |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
33 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
34 |
define DoRomSet |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
35 |
ifeq ($(call uppercase,$(TARGETTYPE)),LIB) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
36 |
BUILDROMTARGET:= |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
37 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
38 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
39 |
ifeq ($(call uppercase,$(TARGETTYPE)),KEXT) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
40 |
ROMFILETYPE:=extension[MAGIC] |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
41 |
ABIDIR:=KMAIN |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
42 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
43 |
ifeq ($(call uppercase,$(TARGETTYPE)),LDD) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
44 |
ROMFILETYPE:=device[MAGIC] |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
45 |
ABIDIR:=KMAIN |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
46 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
47 |
ifeq ($(call uppercase,$(TARGETTYPE)),PDD) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
48 |
ROMFILETYPE:=device[MAGIC] |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
49 |
ABIDIR:=KMAIN |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
50 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
51 |
ifeq ($(call uppercase,$(TARGETTYPE)),VAR) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
52 |
ROMFILETYPE:=variant[MAGIC] |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
53 |
ABIDIR:=KMAIN |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
54 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
55 |
ifeq ($(call uppercase,$(TARGETTYPE)),KDLL) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
56 |
ABIDIR:=KMAIN |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
57 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
58 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
59 |
ifneq ($(CALLDLLENTRYPOINTS),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
60 |
ROMFILETYPE:=dll |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
61 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
62 |
ifeq ($(ROMFILETYPE),primary) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
63 |
ABIDIR:=KMAIN |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
64 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
65 |
endef |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
66 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
67 |
$(eval $(call DoRomSet)) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
68 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
69 |
ifneq ($(EPOCFIXEDPROCESS),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
70 |
ROMDECORATIONS:=$(ROMDECORATIONS) fixed |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
71 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
72 |
ifeq ($(PAGED),1) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
73 |
ROMDECORATIONS:=$(ROMDECORATIONS) paged |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
74 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
75 |
ifeq ($(PAGED),0) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
76 |
ROMDECORATIONS:=$(ROMDECORATIONS) unpaged |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
77 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
78 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
79 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
80 |
DATATEXT:= |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
81 |
ifeq ($(TESTCODE),TRUE) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
82 |
# Add 'TEST' to the .iby filename |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
83 |
ROMTEST:=test |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
84 |
ifeq ($(TEST_OPTION),BOTH) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
85 |
DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).auto.bat test/$(MODULE).auto.bat"\n"data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).manual.bat test/$(MODULE).manual.bat" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
86 |
else |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
87 |
ifneq ($(TEST_OPTION),NONE) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
88 |
DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TEST_OPTION).bat test/$(MODULE).$(TEST_OPTION).bat" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
89 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
90 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
91 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
92 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
93 |
# ROMTARGET |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
94 |
ifneq ($(ROMTARGET),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
95 |
ifneq ($(words $(ROMTARGET)),1) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
96 |
ROMTARGETALL:=$(ROMTARGET) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
97 |
ROMTARGET:=$(word 1,$(ROMTARGET)) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
98 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
99 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
100 |
ifeq ($(ROMTARGET),<none>) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
101 |
BUILDROMTARGET:= |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
102 |
else |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
103 |
ifneq ($(ROMTARGET),+) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
104 |
ifneq ($(notdir $(ROMTARGET)),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
105 |
ROMFILE:=$(notdir $(ROMTARGET)) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
106 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
107 |
ifneq ($(dir $(ROMTARGET)),./) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
108 |
ROMPATH:=$(dir $(ROMTARGET)) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
109 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
110 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
111 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
112 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
113 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
114 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
115 |
ROMFILENAME:=$(ROMDIR)$(PLATFORM)$(ROMTEST).iby |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
116 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
117 |
# RAMTARGET |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
118 |
ifneq ($(RAMTARGET),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
119 |
ROMDECORATIONS_RAM:=" attrib=r" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
120 |
ifneq ($(RAMTARGET),+) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
121 |
ifneq ($(notdir $(RAMTARGET)),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
122 |
ROMFILE_RAM:=$(notdir $(RAMTARGET)) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
123 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
124 |
ifneq ($(dir $(RAMTARGET)),./) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
125 |
ROMPATH_RAM:=$(dir $(RAMTARGET)) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
126 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
127 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
128 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
129 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
130 |
define BuildRomfileTarget |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
131 |
$(ALLTARGET)::ROMFILE |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
132 |
ROMFILE:: |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
133 |
$(call startrule,rombuild) \ |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
134 |
$(GNUMKDIR) -p $(ROMDIR) \ |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
135 |
$(if $(ROMFILE_CREATED_$(TOBLDINF)),,&& echo -e "// $(subst $(EPOC_ROOT)/,,$(ROMFILENAME))\n//\n$(DATATEXT)" > $(ROMFILENAME)) \ |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
136 |
$(if $(BUILDROMTARGET),&& echo "$(ROMFILETYPE)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(REQUESTEDTARGETEXT) $(1)$(ROMDECORATIONS)" >> $(ROMFILENAME)) \ |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
137 |
$(if $(RAMTARGET),&& echo "$(ROMFILETYPE_RAM)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(REQUESTEDTARGETEXT) $(ROMPATH_RAM)$(ROMFILE_RAM)$(ROMDECORATIONS_RAM)" >> $(ROMFILENAME)) \ |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
138 |
$(call endrule,buildromfiletarget) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
139 |
endef |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
140 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
141 |
# When VARIANTTYPE changes, romfile is finished, |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
142 |
# apart from if this is a new component...... |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
143 |
ifneq ($(PREVIOUSVARIANTTYPE),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
144 |
ifneq ($(VARIANTTYPE),$(PREVIOUSVARIANTTYPE)) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
145 |
ifneq ($(ROMFILE_CREATED_$(TOBLDINF)),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
146 |
ROMFILEFINISHED:=1 |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
147 |
else |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
148 |
ROMFILEFINISHED:= |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
149 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
150 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
151 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
152 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
153 |
# When romfile is finished, don't continue to add to it |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
154 |
ifeq ($(ROMFILEFINISHED),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
155 |
$(eval $(call BuildRomfileTarget,$(ROMPATH)$(ROMFILE))) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
156 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
157 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
158 |
# Don't allow romfile to be recreated for every MMP |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
159 |
ifeq ($(ROMFILE_CREATED_$(TOBLDINF)),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
160 |
ROMFILE_CREATED_$(TOBLDINF):=1 |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
161 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
162 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
163 |
# Build other ROMTARGETs if there is more than one |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
164 |
ifneq ($(ROMTARGETALL),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
165 |
RAMTARGET:= |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
166 |
$(foreach ROMTARGET,$(wordlist 2,$(words $(ROMTARGETALL)),$(ROMTARGETALL)),$(eval $(call BuildRomfileTarget,$(ROMTARGET)))) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
167 |
ROMTARGETALL:= |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
168 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
169 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
170 |
# Keep track of variant type while romfile is being created |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
171 |
PREVIOUSVARIANTTYPE:=$(VARIANTTYPE) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
172 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
173 |
WHATRELEASE:=$(WHATRELEASE) $(ROMFILENAME) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
174 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
175 |