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