sbsv1/buildsystem/extension/base/base_rvct_common.mk
author Zheng Shen <zheng.shen@nokia.com>
Thu, 09 Sep 2010 19:09:10 +0800
changeset 633 a4eca1f021ac
parent 599 fa7a3cc6effd
permissions -rw-r--r--
ROMTools-13.1.0.2 Bug 3415 - SBS failing to build open C libraries
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 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
# Some functions that are commonly used by base FLM
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    15
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    16
define base__compile
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    17
$(1) : $(2) : $(3)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    18
	$(call startrule,base__compile) \
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    19
	$(CC) $(ARMCCFLAGS) $$< -o $$@ \
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    20
	$(call endrule,base__compile)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    21
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    22
CLEANTARGETS := $(CLEANTARGETS) $(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    23
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    24
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    25
define base__h2inc
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    26
$(1) : $(2)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    27
	$(call startrule,base__h2inc) \
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    28
 	$(PERL) $(EPOCROOT)/epoc32/tools/h2inc.pl $$< $$@ ARMASM \
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    29
	$(call endrule,base__h2inc)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    30
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    31
CLEANTARGETS := $(CLEANTARGETS) $(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    32
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    33
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    34
define base__asm
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    35
$(1) : $(2) : $(3)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    36
	$(call startrule,base__asm) \
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    37
	$(ASM) $(AFLAGS) -o $$@ --LIST $(join $(basename $(1)),.lst) $$< \
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    38
	$(call endrule,base__asm)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    39
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    40
CLEANTARGETS := $(CLEANTARGETS) $(1) $(join $(basename $(1)),.lst)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    41
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    42
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    43
define base__link
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    44
$(1) : $(2)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    45
	$(call startrule,base__link) \
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    46
	$(LD) $(LFLAGS) -o $$@ $(FULLOBJECTS) \
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    47
	$(call endrule,base__link)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    48
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    49
CLEANTARGETS := $(CLEANTARGETS) $(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    50
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    51
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    52
define base__strip
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    53
$(1) : $(2)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    54
	$(call startrule,base__strip) \
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    55
	$(FROMELF) --bin --output $$@ $$< \
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    56
	$(call endrule,base__strip)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    57
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    58
CLEANTARGETS := $(CLEANTARGETS) $(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    59
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    60
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    61
define base__omapsig
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    62
$(1) : $(2)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    63
	$(call startrule,base__omapsig) \
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    64
	$(PERL) $(EPOCROOT)/epoc32/tools/omapsig.pl $(LINKBASE) $$< $$@ \
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    65
	$(call endrule,base__omapsig)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    66
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    67
CLEANTARGETS := $(CLEANTARGETS) $(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    68
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    69