11 # Contributors: |
11 # Contributors: |
12 # |
12 # |
13 # Description: DRM Crypto Library build configuration |
13 # Description: DRM Crypto Library build configuration |
14 # |
14 # |
15 |
15 |
|
16 ifeq ($(_CRYPTOPREP_FLM_),) |
|
17 # first instance of this FLM |
|
18 _CRYPTOPREP_FLM_:= 1 |
|
19 |
16 TMPROOT:=$(subst \,/,$(EPOCROOT)) |
20 TMPROOT:=$(subst \,/,$(EPOCROOT)) |
17 EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ |
21 EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ |
18 |
22 |
19 CREATABLEPATH:=$(EXTENSION_ROOT)/../drmengine/drmcrypto/build |
23 # NB: abspath doesn't like Windows drive letters |
20 CLEANTARGETS:=$(CREATABLEPATH)/cmlacrypto.cpp $(CREATABLEPATH)/omacrypto.cpp |
24 CRYPTO_SOURCE_DRIVE:=$(firstword $(subst :, ,$(EXTENSION_ROOT))) |
|
25 ifeq ($(CRYPTO_SOURCE_DRIVE),$(EXTENSION_ROOT)) |
|
26 CREATABLEPATH:=$(abspath $(EXTENSION_ROOT)/../drmengine/drmcrypto/build)) |
|
27 else |
|
28 CRYPTO_ABSPATH:=$(abspath $(subst $(CRYPTO_SOURCE_DRIVE):,,$(EXTENSION_ROOT)/../drmengine/drmcrypto/build)) |
|
29 CREATABLEPATH:=$(CRYPTO_SOURCE_DRIVE):$(CRYPTO_ABSPATH) |
|
30 endif |
21 |
31 |
22 crypto_files:=$(wildcard $(EXTENSION_ROOT)/../drmengine/drmcrypto/CMLA/*.cpp) |
32 crypto_files:=$(wildcard $(EXTENSION_ROOT)/../drmengine/drmcrypto/CMLA/*.cpp) |
|
33 ifeq ($(crypto_files),) |
|
34 CMLA_CRYPTO_SOURCE:=$(CREATABLEPATH)/../stub/CmlaCryptoStub.cpp |
|
35 else |
|
36 CMLA_CRYPTO_SOURCE:=$(CREATABLEPATH)/../CMLA/CmlaCrypto.cpp |
|
37 endif |
23 |
38 |
24 BITMAP :: $(CREATABLEPATH) |
39 $(CREATABLEPATH)/cmlacrypto.cpp: $(CMLA_CRYPTO_SOURCE) |
25 |
40 $(GNUCP) $< $@ |
26 ifeq ($(crypto_files),) |
|
27 $(GNUCP) $(CREATABLEPATH)/../stub/CmlaCryptoStub.cpp $(CREATABLEPATH)/cmlacrypto.cpp |
|
28 else |
|
29 $(GNUCP) $(CREATABLEPATH)/../CMLA/CmlaCrypto.cpp $(CREATABLEPATH)/cmlacrypto.cpp |
|
30 endif |
|
31 $(GNUCP) $(CREATABLEPATH)/../src/OmaCrypto.cpp $(CREATABLEPATH)/omacrypto.cpp |
|
32 |
41 |
33 # Create dirs |
42 # Create dirs |
34 $(call makepath,$(CREATABLEPATH)) |
43 $(call makepath,$(CREATABLEPATH)) |
35 |
44 |
36 ## Clean up |
45 ## Clean up |
|
46 CLEANTARGETS:=$(CREATABLEPATH)/cmlacrypto.cpp |
37 $(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS))) |
47 $(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS))) |
38 |
48 |
|
49 else |
|
50 # FLM already included - don't duplicate the targets |
|
51 endif |