omadrm/drmengine/group/CryptoPrep.flm
author Dario Sestito <darios@symbian.org>
Tue, 13 Jul 2010 13:57:53 +0100
branchRCL_3
changeset 58 5816b2634c8a
parent 41 29f3cf766061
parent 28 34a204558a6a
permissions -rw-r--r--
Re-merge fixes for bug 1993 and bug 2121

# Copyright (c) 2009-2010 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


# 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
$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS)))

$(info <debug>$(PLATFORM) $(CFG), selecting $(CMLA_CRYPTO_SOURCE)</debug>)

else
$(info <debug>$(PLATFORM) $(CFG), already handled $(CMLA_CRYPTO_SOURCE)</debug>)
# FLM already included - don't duplicate the targets

endif