sl@0: # Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: # All rights reserved. sl@0: # This component and the accompanying materials are made available sl@0: # under the terms of "Eclipse Public License v1.0" sl@0: # which accompanies this distribution, and is available sl@0: # at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: # sl@0: # Initial Contributors: sl@0: # Nokia Corporation - initial contribution. sl@0: # sl@0: # Contributors: sl@0: # sl@0: # Description: sl@0: # Different from ecom3_postbuild.mk in that on armv5 the RAMONLYTARGETDIR sl@0: # is not \epoc32\data\z\ramonly. It is \epoc32\release\armv5\\z\ramonly. sl@0: # This template has to preserve the udeb/urel targets. sl@0: # Params: sl@0: # SOURCES - list of .exe and .dll files to relocate sl@0: # TARGET - not used sl@0: # OPTION TARGETDIR - mandatory, it is "ramonly" for ecom testing. sl@0: # OPTION TARGETBASE - optional, overrides \epoc32\release\\\z sl@0: # OPTION SOURCEDIR - optional, overrides \epoc32\release\\ sl@0: # sl@0: # sl@0: sl@0: TMPROOT:=$(subst \,/,$(EPOCROOT)) sl@0: EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ sl@0: sl@0: include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk sl@0: sl@0: # $(/) is actually back slash in Windows environment. Since bld.inf are written sl@0: # with forward slashes and $(CP) is "copy", this substitution is important. sl@0: TARGETDIR := $(subst /,$(/),$(TARGETDIR)) sl@0: sl@0: ifdef TARGETBASE sl@0: TARGETBASE := $(subst PLATFORM,$(PLATFORM_PATH),$(TARGETBASE)) sl@0: TARGETBASE := $(subst CFG,$(CFG_PATH),$(TARGETBASE)) sl@0: TARGETBASE := $(subst /,$(/),$(TARGETBASE)) sl@0: DESTDIR:=$(TARGETBASE)/$(TARGETDIR) sl@0: else sl@0: DESTDIR:=$(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/z/$(TARGETDIR) sl@0: endif sl@0: sl@0: ifdef SOURCEDIR sl@0: SOURCEDIR := $(subst PLATFORM,$(PLATFORM_PATH),$(SOURCEDIR)) sl@0: SOURCEDIR := $(subst CFG,$(CFG_PATH),$(SOURCEDIR)) sl@0: SOURCEDIR := $(subst /,$(/),$(SOURCEDIR)) sl@0: else sl@0: SOURCEDIR := $(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH) sl@0: endif sl@0: sl@0: TARGET_COPY := $(foreach f,$(SOURCES),$(DESTDIR)/$(f) ) sl@0: sl@0: $(DESTDIR) : sl@0: $(call createdir,"$@") sl@0: sl@0: $(TARGET_COPY) : sl@0: $(CP) $(call slash2generic, $(SOURCEDIR)/$(notdir $@) $@) sl@0: -$(ERASE) $(call slash2generic, $(SOURCEDIR)/$(notdir $@)) sl@0: sl@0: # sl@0: # The targets invoked by abld... sl@0: # sl@0: BLD : $(DESTDIR) $(TARGET_COPY) sl@0: sl@0: MAKMAKE SAVESPACE FREEZE LIB CLEANLIB RESOURCE FINAL : sl@0: @echo do nothing sl@0: sl@0: CLEAN : sl@0: -$(ERASE) $(TARGET_COPY) sl@0: sl@0: RELEASABLES : sl@0: @echo $(TARGET_COPY) sl@0: