|
1 # Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 # All rights reserved. |
|
3 # This component and the accompanying materials are made available |
|
4 # under the terms of "Eclipse Public License v1.0" |
|
5 # which accompanies this distribution, and is available |
|
6 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 # |
|
8 # Initial Contributors: |
|
9 # Nokia Corporation - initial contribution. |
|
10 # |
|
11 # Contributors: |
|
12 # |
|
13 # Description: |
|
14 # |
|
15 |
|
16 # To ensure that EPOCROOT always ends with a forward slash |
|
17 TMPROOT:=$(subst \,/,$(EPOCROOT)) |
|
18 EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ |
|
19 |
|
20 include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk |
|
21 |
|
22 |
|
23 ifneq ($(FIRST_PASS),completed) |
|
24 |
|
25 FIRST_PASS=completed |
|
26 |
|
27 SOURCE_DIRECTORY=$(EXTENSION_ROOT)/../data |
|
28 |
|
29 TOOLS=\ |
|
30 $(EPOCROOT)epoc32/tools/PARSER.pm \ |
|
31 $(EPOCROOT)epoc32/tools/WRITER.pm \ |
|
32 $(EPOCROOT)epoc32/tools/cnvtool.pl |
|
33 |
|
34 TARGET_DIRECTORY:=$(call generated,generatedcpp/charconv) |
|
35 TARGET_DIRECTORY2:=$(EPOCROOT)epoc32/tools/charconv |
|
36 |
|
37 endif |
|
38 |
|
39 |
|
40 ifeq ($(TYPE),dat) |
|
41 |
|
42 TARGET_FILES2=$(patsubst %,$(TARGET_DIRECTORY2)/%.dat,$(STEMS)) |
|
43 |
|
44 $(TARGET_FILES2) : $(TARGET_DIRECTORY2)/%.dat: $(SOURCE_DIRECTORY)/%.txt $(SOURCE_DIRECTORY)/%$(CTL_EXT).ctl $(EXTRA_DEP) $(TOOLS) |
|
45 @$(call createdir,"$(TARGET_DIRECTORY2)") |
|
46 perl $(EPOCROOT)epoc32/tools/cnvtool.pl $(subst .txt,$(CTL_EXT).ctl,$<) $< $@ -flattenHashAndSave $(foreach PARAM,$(EXTRA_PARAMS),"$(PARAM)" ) |
|
47 |
|
48 else |
|
49 |
|
50 # This is required by parellel build |
|
51 |
|
52 TARGET_FILES=$(patsubst %,$(TARGET_DIRECTORY)/g_%.cpp,$(STEMS)) |
|
53 |
|
54 $(TARGET_FILES) : $(TARGET_DIRECTORY)/g_%.cpp: $(SOURCE_DIRECTORY)/%.txt $(SOURCE_DIRECTORY)/%$(CTL_EXT).ctl $(EXTRA_DEP) $(TOOLS) |
|
55 @$(call createdir,"$(TARGET_DIRECTORY)") |
|
56 @$(call createdir,"$(TARGET_DIRECTORY2)") |
|
57 perl $(EPOCROOT)epoc32/tools/cnvtool.pl $(subst .txt,$(CTL_EXT).ctl,$<) $< $@ -generateSourceCode $(foreach PARAM,$(EXTRA_PARAMS),"$(PARAM)" ) |
|
58 |
|
59 endif |
|
60 |
|
61 |
|
62 |
|
63 ifneq ($(TYPE),all) |
|
64 |
|
65 DO_NOTHING : |
|
66 # do nothing |
|
67 |
|
68 # the targets below are the public ones |
|
69 |
|
70 MAKMAKE : $(TARGET_FILES2) $(TARGET_FILES) |
|
71 |
|
72 BLD : $(TARGET_FILES2) $(TARGET_FILES) |
|
73 |
|
74 SAVESPACE : BLD |
|
75 |
|
76 FREEZE : DO_NOTHING |
|
77 |
|
78 LIB : DO_NOTHING |
|
79 |
|
80 CLEANLIB : DO_NOTHING |
|
81 |
|
82 RESOURCE : DO_NOTHING |
|
83 |
|
84 CLEAN : |
|
85 -$(ERASE) $(TARGET_FILES2) $(TARGET_FILES) |
|
86 |
|
87 RELEASABLES : DO_NOTHING |
|
88 |
|
89 FINAL : DO_NOTHING |
|
90 |
|
91 endif |
|
92 |
|
93 |
|
94 |
|
95 ifeq ($(TYPE),dat) |
|
96 |
|
97 RELEASABLES : |
|
98 $(call formatreleasables,$(TARGET_FILES2)) |
|
99 |
|
100 endif |
|
101 |
|
102 |
|
103 |
|
104 ifeq ($(TYPE),all) |
|
105 |
|
106 TYPE=dat |
|
107 TARGET_FILES2=$(TARGET_FILES) |
|
108 |
|
109 include $(call include) |
|
110 |
|
111 endif |
|
112 |