os/ossrv/lowlevellibsandfws/pluginfw/Group/ecom3_relocatetarget.mk
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/lowlevellibsandfws/pluginfw/Group/ecom3_relocatetarget.mk	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,74 @@
     1.4 +# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +# All rights reserved.
     1.6 +# This component and the accompanying materials are made available
     1.7 +# under the terms of "Eclipse Public License v1.0"
     1.8 +# which accompanies this distribution, and is available
     1.9 +# at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +#
    1.11 +# Initial Contributors:
    1.12 +# Nokia Corporation - initial contribution.
    1.13 +#
    1.14 +# Contributors:
    1.15 +#
    1.16 +# Description:
    1.17 +# Different from ecom3_postbuild.mk in that on armv5 the RAMONLYTARGETDIR
    1.18 +# is not \epoc32\data\z\ramonly. It is \epoc32\release\armv5\<CFG>\z\ramonly.
    1.19 +# This template has to preserve the udeb/urel targets.
    1.20 +# Params:
    1.21 +# SOURCES - list of .exe and .dll files to relocate
    1.22 +# TARGET - not used
    1.23 +# OPTION TARGETDIR - mandatory, it is "ramonly" for ecom testing.
    1.24 +# OPTION TARGETBASE - optional, overrides \epoc32\release\<platform>\<cfg>\z 
    1.25 +# OPTION SOURCEDIR -  optional, overrides \epoc32\release\<platform>\<cfg> 
    1.26 +# 
    1.27 +#
    1.28 +
    1.29 +TMPROOT:=$(subst \,/,$(EPOCROOT))
    1.30 +EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/
    1.31 +
    1.32 +include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk
    1.33 +
    1.34 +# $(/) is actually back slash in Windows environment. Since bld.inf are written
    1.35 +# with forward slashes and $(CP) is "copy", this substitution is important.
    1.36 +TARGETDIR := $(subst /,$(/),$(TARGETDIR))
    1.37 +
    1.38 +ifdef TARGETBASE
    1.39 +TARGETBASE := $(subst PLATFORM,$(PLATFORM_PATH),$(TARGETBASE))
    1.40 +TARGETBASE := $(subst CFG,$(CFG_PATH),$(TARGETBASE))
    1.41 +TARGETBASE := $(subst /,$(/),$(TARGETBASE))
    1.42 +DESTDIR:=$(TARGETBASE)/$(TARGETDIR)
    1.43 +else
    1.44 +DESTDIR:=$(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/z/$(TARGETDIR)
    1.45 +endif
    1.46 +
    1.47 +ifdef SOURCEDIR
    1.48 +SOURCEDIR := $(subst PLATFORM,$(PLATFORM_PATH),$(SOURCEDIR))
    1.49 +SOURCEDIR := $(subst CFG,$(CFG_PATH),$(SOURCEDIR))
    1.50 +SOURCEDIR := $(subst /,$(/),$(SOURCEDIR))
    1.51 +else
    1.52 +SOURCEDIR := $(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)
    1.53 +endif
    1.54 +
    1.55 +TARGET_COPY := $(foreach f,$(SOURCES),$(DESTDIR)/$(f) )
    1.56 +
    1.57 +$(DESTDIR) :
    1.58 +	$(call createdir,"$@")
    1.59 +
    1.60 +$(TARGET_COPY) :
    1.61 +	$(CP) $(call slash2generic, $(SOURCEDIR)/$(notdir $@) $@)
    1.62 +	-$(ERASE) $(call slash2generic, $(SOURCEDIR)/$(notdir $@))
    1.63 +
    1.64 +#
    1.65 +# The targets invoked by abld...
    1.66 +#
    1.67 +BLD : $(DESTDIR) $(TARGET_COPY)
    1.68 +
    1.69 +MAKMAKE SAVESPACE FREEZE LIB CLEANLIB RESOURCE FINAL :
    1.70 +	@echo do nothing
    1.71 +
    1.72 +CLEAN : 
    1.73 +	-$(ERASE) $(TARGET_COPY)
    1.74 +
    1.75 +RELEASABLES : 
    1.76 +	@echo $(TARGET_COPY)
    1.77 +