|
1 ## |
|
2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: |
|
15 # |
|
16 # |
|
17 |
|
18 |
|
19 # Handle issues related to SOURCEDIR |
|
20 ifneq ($(strip $(SOURCEDIR)),) |
|
21 # Replace \ with / in SOURCEDIR |
|
22 SOURCEDIR:=$(subst \,/,$(SOURCEDIR)) |
|
23 |
|
24 # Replace / with $/ in SOURCEDIR |
|
25 SOURCEDIR:=$(subst /,$/,$(SOURCEDIR)) |
|
26 |
|
27 # Insert EXTENSION_ROOT |
|
28 SOURCEDIR:=$(EXTENSION_ROOT)$/$(SOURCEDIR) |
|
29 |
|
30 endif |
|
31 |
|
32 |
|
33 # Debug prints |
|
34 #$(warning PARAMFILE $(PARAMFILE)) |
|
35 #$(warning VECTORSOURCEDIR $(VECTORSOURCEDIR)) |
|
36 #$(warning VECTORINTERMEDIATEDIR $(VECTORINTERMEDIATEDIR)) |
|
37 #$(warning BITMAPSOURCEDIR $(BITMAPSOURCEDIR)) |
|
38 #$(warning WINS_TARGETDIR $(WINS_TARGETDIR)) |
|
39 #$(warning WINSCW_TARGETDIR $(WINSCW_TARGETDIR)) |
|
40 #$(warning TARGETDIR $(TARGETDIR)) |
|
41 #$(warning HEADERDIR $(HEADERDIR)) |
|
42 #$(warning SOURCEDIR $(SOURCEDIR)) |
|
43 #$(warning TARGETFILE $(TARGETFILE)) |
|
44 #$(warning HEADERFILE $(HEADERFILE)) |
|
45 #$(warning SOURCES $(SOURCES)) |
|
46 #$(warning SOURCEFILE $(SOURCEFILE)) |
|
47 #$(warning SVGENCODINGVERSION $(SVGENCODINGVERSION)) |
|
48 |
|
49 |
|
50 |
|
51 # Check that SOURCES and SOURCESFILE is not defined at the same time and at least one of them has been defined |
|
52 $(if $(SOURCES),$(if $(SOURCEFILE),$(error Must not define both SOURCES- and SOURCEFILE-parameters!),),$(if $(SOURCEFILE),,$(error Must define either SOURCES- or SOURCEFILE-parameter!))) |
|
53 |
|
54 # If SOURCES-parameter is not empty, then it is the OPTIONS |
|
55 ifneq ($(strip $(SOURCES)),) |
|
56 OPTIONS:=$(SOURCES) |
|
57 endif |
|
58 |
|
59 # If SOURCEFILE-parameter is not empty |
|
60 ifneq ($(strip $(SOURCEFILE)),) |
|
61 # Replace \ with / in SOURCEFILE |
|
62 SOURCEFILE:=$(subst \,/,$(SOURCEFILE)) |
|
63 |
|
64 # Replace / with $/ in SOURCEFILE |
|
65 SOURCEFILE:=$(subst /,$/,$(SOURCEFILE)) |
|
66 |
|
67 # Add each of the lines in the file to the OPTIONS |
|
68 OPTIONS:=$(foreach LINE, \ |
|
69 $(shell $(TOOLCAT) $(EXTENSION_ROOT)$/$(SOURCEFILE)), \ |
|
70 $(LINE)) |
|
71 endif |
|
72 |
|
73 # Change any leading '/' into '-' due to problems in make |
|
74 OPTIONS := $(patsubst /%,-%,$(OPTIONS)) |