omadrm/drmengine/group/CryptoPrep.flm
author William Roberts <williamr@symbian.org>
Mon, 08 Mar 2010 17:28:28 +0000
branchRCL_3
changeset 13 77a4e6a1beb4
parent 5 79d62d1d7957
child 26 c8580ce65571
permissions -rw-r--r--
Rework CryptoPrep.flm to make a proper fix for Bug 2121

# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of the License "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
# Contributors:
#
# Description: DRM Crypto Library build configuration
#

ifeq ($(_CRYPTOPREP_FLM_),)
# first instance of this FLM
_CRYPTOPREP_FLM_:= 1

TMPROOT:=$(subst \,/,$(EPOCROOT))
EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/

# NB: abspath doesn't like Windows drive letters
CRYPTO_SOURCE_DRIVE:=$(firstword $(subst :, ,$(EXTENSION_ROOT)))
ifeq ($(CRYPTO_SOURCE_DRIVE),$(EXTENSION_ROOT))
CREATABLEPATH:=$(abspath $(EXTENSION_ROOT)/../drmengine/drmcrypto/build))
else
CRYPTO_ABSPATH:=$(abspath $(subst $(CRYPTO_SOURCE_DRIVE):,,$(EXTENSION_ROOT)/../drmengine/drmcrypto/build))
CREATABLEPATH:=$(CRYPTO_SOURCE_DRIVE):$(CRYPTO_ABSPATH)
endif

crypto_files:=$(wildcard $(EXTENSION_ROOT)/../drmengine/drmcrypto/CMLA/*.cpp)
ifeq ($(crypto_files),)
CMLA_CRYPTO_SOURCE:=$(CREATABLEPATH)/../stub/CmlaCryptoStub.cpp
else
CMLA_CRYPTO_SOURCE:=$(CREATABLEPATH)/../CMLA/CmlaCrypto.cpp
endif

$(CREATABLEPATH)/cmlacrypto.cpp: $(CMLA_CRYPTO_SOURCE)
	$(GNUCP) $< $@

# Create dirs
$(call makepath,$(CREATABLEPATH))

## Clean up
CLEANTARGETS:=$(CREATABLEPATH)/cmlacrypto.cpp
$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS)))

else
# FLM already included - don't duplicate the targets
endif