os/ossrv/lowlevellibsandfws/pluginfw/Group/ecom3_relocatetarget.mk
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
# All rights reserved.
sl@0
     3
# This component and the accompanying materials are made available
sl@0
     4
# under the terms of "Eclipse Public License v1.0"
sl@0
     5
# which accompanies this distribution, and is available
sl@0
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
#
sl@0
     8
# Initial Contributors:
sl@0
     9
# Nokia Corporation - initial contribution.
sl@0
    10
#
sl@0
    11
# Contributors:
sl@0
    12
#
sl@0
    13
# Description:
sl@0
    14
# Different from ecom3_postbuild.mk in that on armv5 the RAMONLYTARGETDIR
sl@0
    15
# is not \epoc32\data\z\ramonly. It is \epoc32\release\armv5\<CFG>\z\ramonly.
sl@0
    16
# This template has to preserve the udeb/urel targets.
sl@0
    17
# Params:
sl@0
    18
# SOURCES - list of .exe and .dll files to relocate
sl@0
    19
# TARGET - not used
sl@0
    20
# OPTION TARGETDIR - mandatory, it is "ramonly" for ecom testing.
sl@0
    21
# OPTION TARGETBASE - optional, overrides \epoc32\release\<platform>\<cfg>\z 
sl@0
    22
# OPTION SOURCEDIR -  optional, overrides \epoc32\release\<platform>\<cfg> 
sl@0
    23
# 
sl@0
    24
#
sl@0
    25
sl@0
    26
TMPROOT:=$(subst \,/,$(EPOCROOT))
sl@0
    27
EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/
sl@0
    28
sl@0
    29
include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk
sl@0
    30
sl@0
    31
# $(/) is actually back slash in Windows environment. Since bld.inf are written
sl@0
    32
# with forward slashes and $(CP) is "copy", this substitution is important.
sl@0
    33
TARGETDIR := $(subst /,$(/),$(TARGETDIR))
sl@0
    34
sl@0
    35
ifdef TARGETBASE
sl@0
    36
TARGETBASE := $(subst PLATFORM,$(PLATFORM_PATH),$(TARGETBASE))
sl@0
    37
TARGETBASE := $(subst CFG,$(CFG_PATH),$(TARGETBASE))
sl@0
    38
TARGETBASE := $(subst /,$(/),$(TARGETBASE))
sl@0
    39
DESTDIR:=$(TARGETBASE)/$(TARGETDIR)
sl@0
    40
else
sl@0
    41
DESTDIR:=$(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/z/$(TARGETDIR)
sl@0
    42
endif
sl@0
    43
sl@0
    44
ifdef SOURCEDIR
sl@0
    45
SOURCEDIR := $(subst PLATFORM,$(PLATFORM_PATH),$(SOURCEDIR))
sl@0
    46
SOURCEDIR := $(subst CFG,$(CFG_PATH),$(SOURCEDIR))
sl@0
    47
SOURCEDIR := $(subst /,$(/),$(SOURCEDIR))
sl@0
    48
else
sl@0
    49
SOURCEDIR := $(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)
sl@0
    50
endif
sl@0
    51
sl@0
    52
TARGET_COPY := $(foreach f,$(SOURCES),$(DESTDIR)/$(f) )
sl@0
    53
sl@0
    54
$(DESTDIR) :
sl@0
    55
	$(call createdir,"$@")
sl@0
    56
sl@0
    57
$(TARGET_COPY) :
sl@0
    58
	$(CP) $(call slash2generic, $(SOURCEDIR)/$(notdir $@) $@)
sl@0
    59
	-$(ERASE) $(call slash2generic, $(SOURCEDIR)/$(notdir $@))
sl@0
    60
sl@0
    61
#
sl@0
    62
# The targets invoked by abld...
sl@0
    63
#
sl@0
    64
BLD : $(DESTDIR) $(TARGET_COPY)
sl@0
    65
sl@0
    66
MAKMAKE SAVESPACE FREEZE LIB CLEANLIB RESOURCE FINAL :
sl@0
    67
	@echo do nothing
sl@0
    68
sl@0
    69
CLEAN : 
sl@0
    70
	-$(ERASE) $(TARGET_COPY)
sl@0
    71
sl@0
    72
RELEASABLES : 
sl@0
    73
	@echo $(TARGET_COPY)
sl@0
    74