deprecated/buildtools/buildsystem/extension/base/bootstrap.flm
author kelvzhu
Wed, 27 Oct 2010 16:03:51 +0800
changeset 662 60be34e1b006
parent 655 3f65fd25dfd4
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
655
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     1
# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     2
# All rights reserved.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     3
# This component and the accompanying materials are made available
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     4
# under the terms of "Eclipse Public License v1.0"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     5
# which accompanies this distribution, and is available
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     7
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     8
# Initial Contributors:
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     9
# Nokia Corporation - initial contribution.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    10
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    11
# Contributors:
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    12
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    13
# Description:
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    14
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    15
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    16
ifeq ($($(NAME)_$(PLATFORM_PATH)_bootstrap_flm),)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    17
$(NAME)_$(PLATFORM_PATH)_bootstrap_flm := 1 
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    18
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    19
E32PATH := $(EXTENSION_ROOT)/$(E32PATH)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    20
SOURCES := $(foreach S,$(SOURCES),$(addprefix $(EXTENSION_ROOT)/,$(S)))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    21
INCLUDES2:=$(addprefix $(EXTENSION_ROOT)/,$(INCLUDES))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    22
EXTRA_INC_PATH := $(foreach S,$(EXTRA_INC_PATH),$(addprefix $(EXTENSION_ROOT)/,$(S)))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    23
GENINCLUDES_HEADERS := $(foreach H,$(GENINCLUDES_HEADERS),$(addprefix $(EXTENSION_ROOT)/,$(H)))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    24
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    25
ifndef LINKBASE
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    26
LINKBASE := 0x00000000
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    27
endif
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    28
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    29
UNIQ:=$(E32PATH)$(PLATFORM_PATH)$(NAME)$(MEMMODEL)$(SOURCES)$(ASM_MACROS)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    30
UNIQ:=$(word 1,$(shell echo $(UNIQ) | $(GNUMD5SUM)))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    31
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    32
# Make the output build directory name unique, starting with NAME of the binary being built
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    33
EPOCBLDABS := $(EPOCBLD)/$(NAME)_$(UNIQ)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    34
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    35
EPOCINC := $(EPOCROOT)/epoc32/include
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    36
EPOCKERNINC := $(EPOCINC)/kernel
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    37
EPOCCPUINC := $(EPOCKERNINC)/$(CPU)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    38
EPOCTRG := $(EPOCROOT)/epoc32/release/$(PLATFORM_PATH)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    39
TRG := $(EPOCTRG)/$(NAME).bin
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    40
TEMPTRG := $(EPOCBLDABS)/$(NAME).bin
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    41
ASMINCPATH := 
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    42
ASM_MACROS :=
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    43
CLEANTARGETS :=
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    44
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    45
CLEANTARGETS := $(CLEANTARGETS) $(TRG) $(TEMPTRG) $(join $(basename $(TRG)),.sym)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    46
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    47
ifneq ($(EXTRA_INC_PATH),)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    48
ASMINCPATH := $(EXTRA_INC_PATH)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    49
endif
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    50
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    51
ASMINCPATH := . $(EPOCBLDABS) $(ASMINCPATH) $(EXTENSION_ROOT) $(EPOCCPUINC) $(EXTRA_EPOC32_INC_PATH) $(E32PATH)/eka/include/kernel/$(CPU)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    52
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    53
ifeq ($(MEMMODEL),)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    54
$(error MEMMODEL parameter not specified)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    55
endif
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    56
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    57
# Convert MEMMODEL parameter to lower case
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    58
MEMMODEL := $(shell echo $(MEMMODEL) | tr A-Z a-z)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    59
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    60
ifeq ($(MEMMODEL),direct)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    61
CFG_MM := CFG_MMDirect
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    62
HEADERS_MM :=
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    63
endif
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    64
ifeq ($(MEMMODEL),flexible)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    65
CFG_MM := CFG_MMFlexible
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    66
HEADERS_MM := $(E32PATH)/eka/include/memmodel/epoc/flexible/$(CPU)/mmboot.h
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    67
endif
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    68
ifeq ($(MEMMODEL),moving)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    69
CFG_MM := CFG_MMMoving
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    70
HEADERS_MM := $(E32PATH)/eka/include/memmodel/epoc/moving/$(CPU)/mmboot.h
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    71
endif
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    72
ifeq ($(MEMMODEL),multiple)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    73
CFG_MM := CFG_MMMultiple
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    74
HEADERS_MM := $(E32PATH)/eka/include/memmodel/epoc/multiple/$(CPU)/mmboot.h
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    75
endif
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    76
ifndef CFG_MM
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    77
$(error '$(MEMMODEL)' memory model unknown)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    78
endif
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    79
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    80
ASM_MACROS := $(ASM_MACROS) $(CFG_MM)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    81
ifneq ($(SMP),)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    82
ASM_MACROS := $(ASM_MACROS) SMP
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    83
endif
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    84
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    85
ASMINCPATHCMD := $(foreach dir,$(ASMINCPATH),$(join -I ,$(dir)))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    86
ASM_MACROS := $(ASM_MACROS) USE_CXSF
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    87
      
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    88
INCEXT := inc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    89
ASM_MACRO_CMD := $(foreach macro,$(ASM_MACROS),--predefine "$(macro) SETL {TRUE}")
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    90
AFLAGS := -g --keep $(ASM_MACRO_CMD) $(ASMINCPATHCMD)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    91
LFLAGS := --ro-base $(LINKBASE) --entry $(LINKBASE) --map
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    92
SYMOPT := --symdefs
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    93
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    94
define bootstrap_asm
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    95
$(1) : $(2) : $(3)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    96
	$(call startrule,bootstrap_rvct_asm) \
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    97
	$(ASM) $(AFLAGS) -o $$@ --LIST $$(join $$(basename $$@),.lst) $$< \
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    98
	$(call endrule,bootstrap_rvct_asm)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    99
endef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   100
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   101
define bootstrap_link
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   102
$(EPOCBLDABS)/$(NAME).in : $(LINKOBJECTS) $(LINKFILE) | $(EPOCBLDABS)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   103
	$(call startrule,bootstrap_rvct_link) \
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   104
	$(LD) $(LFLAGS) $(SYMOPT) $$(join $$(basename $$@),.sym) -o $$@ $$(filter %.o,$$^); \
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   105
	$(GNUCP) $$@ $$(join $$(basename $(TRG)),.sym) \
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   106
	$(call endrule,bootstrap_rvct_link)	
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   107
endef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   108
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   109
define bootstrap_strip
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   110
$(TRG) : $(EPOCBLDABS)/$(NAME).in
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   111
	$(call startrule,bootstrap_strip) \
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   112
	$(FROMELF) --bin --output $$@ $$< \
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   113
	$(call endrule,bootstrap_rvct_strip)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   114
endef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   115
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   116
define bootstrap_h2inc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   117
# How to translate the .h files to .inc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   118
$(1) : $(2)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   119
	$(call startrule,bootstrap_h2inc) \
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   120
	$(PERL) $(EPOCROOT)/epoc32/tools/h2inc.pl $$< $$@ ARMASM \
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   121
	$(call endrule, bootsrap_h2inc)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   122
endef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   123
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   124
# Joins two lists with a 1:1 mapping, separated by a ->
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   125
# $(call bootstrap_joinlists,a b c,d e f) returns a->d b->e c->f
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   126
define bootstrap_joinlists
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   127
$(join $(1),$(addprefix ->,$(2)))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   128
endef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   129
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   130
# Path for generic source files
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   131
BASESRCPATH := $(E32PATH)/eka/kernel/$(CPU)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   132
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   133
# Generic source files
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   134
BASESOURCES := $(foreach S,$(BASESOURCES_NAMES),$(addprefix $(BASESRCPATH)/,$(S)))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   135
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   136
HEADERS:= $(E32PATH)/eka/include/kernel/kernboot.h $(E32PATH)/eka/include/kernel/arm/bootdefs.h $(E32PATH)/eka/include/e32rom.h $(GENINCLUDES_HEADERS) $(HEADERS_MM)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   137
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   138
# Generated include files
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   139
BOOTSTRAP_GENINCLUDES := $(foreach f,$(HEADERS),$(basename $(notdir $(f))).$(INCEXT))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   140
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   141
# Non-generated generic include files
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   142
ifeq ($(BASEINCLUDES),)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   143
BASEINCLUDES := $(E32PATH)/eka/include/kernel/$(CPU)/bootcpu.inc $(E32PATH)/eka/include/kernel/$(CPU)/bootmacro.inc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   144
endif
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   145
INCLUDES2 := $(foreach f,$(INCLUDES2),$(basename $(f)).$(INCEXT))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   146
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   147
# Generic object files
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   148
FULLBASEOBJECTS := $(foreach src, $(BASESOURCES_NAMES), $(addprefix $(EPOCBLDABS)/,$(basename $(src)).o))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   149
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   150
# Platform specific object files
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   151
FULLOBJECTS := $(foreach src, $(SOURCES), $(addprefix $(EPOCBLDABS)/,$(basename $(notdir $(src))).o))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   152
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   153
LINKOBJECTS := $(FULLBASEOBJECTS) $(FULLOBJECTS)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   154
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   155
# Generated include files with paths
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   156
FULLGENINCLUDES := $(addprefix $(EPOCBLDABS)/,$(BOOTSTRAP_GENINCLUDES))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   157
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   158
CLEANTARGETS := $(CLEANTARGETS) $(FULLBASEOBJECTS) $(FULLOBJECTS) $(LINKOBJECTS) $(FULLGENINCLUDES) 
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   159
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   160
CLEANTARGETS := $(CLEANTARGETS) $(EPOCBLDABS)/$(NAME).in $(join $(basename $(EPOCBLDABS)/$(NAME).in),.sym)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   161
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   162
JOINED_INC := $(call bootstrap_joinlists,$(FULLGENINCLUDES),$(HEADERS))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   163
$(foreach J,$(JOINED_INC),$(eval $(call bootstrap_h2inc,$(word 1,$(subst ->, ,$(J))),$(word 2,$(subst ->, ,$(J))) | $(EPOCBLDABS))))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   164
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   165
# How to strip linked object to binary
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   166
$(eval $(call bootstrap_strip,$(TRG),$(EPOCBLDABS)/$(NAME).in))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   167
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   168
LISTFILE := $(foreach f,$(FULLBASEOBJECTS),$(join $(basename $(f)),.lst)) $(foreach f,$(FULLOBJECTS),$(join $(basename $(f)),.lst))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   169
CLEANTARGETS := $(CLEANTARGETS) $(LISTFILE)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   170
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   171
JOINED_BASEOBJECTS := $(call bootstrap_joinlists,$(FULLBASEOBJECTS),$(BASESOURCES))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   172
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   173
$(foreach J,$(JOINED_BASEOBJECTS),$(eval $(call bootstrap_asm,$(word 1,$(subst ->, ,$(J))),$(EPOCBLDABS)/%.o,$(word 2,$(subst ->, ,$(J))) $(BASEINCLUDES) $(FULLGENINCLUDES) $(INCLUDES2) | $(EPOCBLDABS))))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   174
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   175
JOINED_OBJECTS := $(call bootstrap_joinlists,$(FULLOBJECTS),$(SOURCES))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   176
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   177
$(foreach J,$(JOINED_OBJECTS),$(eval $(call bootstrap_asm,$(word 1,$(subst ->, ,$(J))),$(EPOCBLDABS)/%.o,$(word 2,$(subst ->, ,$(J))) $(BASEINCLUDES) $(FULLGENINCLUDES) $(INCLUDES2) |$(EPOCBLDABS))))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   178
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   179
# How to link the object files
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   180
$(eval $(bootstrap_link))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   181
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   182
# Hook into global targets
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   183
TARGET :: $(TRG)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   184
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   185
#############################################
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   186
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   187
# --what to show releasables
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   188
$(eval $(call whatmacro,$(TRG),USERFLM))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   189
# create directory
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   190
CREATABLEPATHS := $(EPOCBLDABS) $(EPOCTRG)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   191
$(call makepath,$(CREATABLEPATHS))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   192
# clean up
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   193
$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(BUILDLOC)))
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   194
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   195
endif