|
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 the License "Symbian Foundation License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * cmaker makefile installation. |
|
16 * cMaker - a Make-based configuration export tool |
|
17 |
|
18 Setting up environment to use this version of cmaker |
|
19 ==================================================== |
|
20 |
|
21 - Extract env |
|
22 - Merge the makefiles from config_maker\config to the root config project |
|
23 |
|
24 Usage of cmaker |
|
25 =============== |
|
26 |
|
27 At the root of the config folder, type: |
|
28 |
|
29 cmaker [target] [ACTION=<action>] [NCP=[ncp number][,ncp number]*] [S60=[s60 number][,s60 number]*] [PPD=[ppd number][,ppd number]*] |
|
30 |
|
31 action: actions are found from \epoc32\rom\cmaker\functions.ml |
|
32 * export = copy the given target from source |
|
33 * clean = delete the target |
|
34 * what = print the target |
|
35 * what_deps = print source target |
|
36 |
|
37 Default ACTION is export. |
|
38 |
|
39 The cmaker can be called without any parameters, in which case the makefile in the current folder is included first |
|
40 and the first target defined in that makefile is executed. |
|
41 |
|
42 Example usage: |
|
43 -------------- |
|
44 |
|
45 1) Export all NCP53 configs |
|
46 >cd \config\ |
|
47 >cmaker ncp53_all NCP=53 |
|
48 or |
|
49 >cd \config\ncp_config\ncp5.3_config |
|
50 >cmaker |
|
51 |
|
52 2) 'What' list of all NCP53 and 5332 and dependent config exports |
|
53 >cd \config\ |
|
54 >cmaker NCP=53 S60=32 ACTION=what |
|
55 |
|
56 3) What_deps list of all NCP53 and 5332 config exports |
|
57 >cd \config\ |
|
58 >cmaker NCP=53 S60=32 ACTION=what_deps |
|
59 |
|
60 4) Clean all NCP71 and PPD5332 config exports |
|
61 >cd \config\ |
|
62 >cmaker NCP=53 S60=32 ACTION=clean |
|
63 |
|
64 |
|
65 === Configuring cmaker === |
|
66 |
|
67 === Project makefile === |
|
68 Example project makefile that defines ncp52_config as a project target. The intention here is that the CM Synergy project name is always a target in cmaker, which can be exported. The other defined targets are there to define dependencies. |
|
69 {{{ |
|
70 # NCP5.2 config level configuration makefile |
|
71 |
|
72 |
|
73 #Define this platform as default if nothing is defined |
|
74 ifeq (,$(NCP)) |
|
75 NCP += 52 |
|
76 $(warning Ncp platform not defined (E.g. NCP=53)! Using $(NCP)) |
|
77 endif |
|
78 |
|
79 ifeq (52,$(findstring 52,$(NCP))) |
|
80 MAKEFILE = /config/ncp_config/ncp5.2_config/makefile |
|
81 |
|
82 # Place the first target as the default target which is executed from this level |
|
83 ncp52_all :: ncp52_config |
|
84 ncp52_config :: |
|
85 ncp52_config :: ncp_config |
|
86 ncp_all :: ncp52_all |
|
87 |
|
88 include include_template.mk |
|
89 |
|
90 endif |
|
91 }}} |
|
92 |
|
93 === export.mk === |
|
94 Example folder exporting makefile. The export.mk defines source and target (files|folder) as make variables (e.g. DATAFILES in the example). Then the example uses a add-files macro to add DATAFILES as targets for the system (e.g. $(call addfiles, $(DATAFILES), ncp52_config-data) in the example). This makes every target file in DATAFILES a make target, and defines a dependency from ncp_config-data to each target file. So if you run ncp_config-data target you would actually run every target file defined in DATAFILES. |
|
95 |
|
96 {{{ |
|
97 # NCP5.2 config's actual configuration export makefile |
|
98 |
|
99 MAKEFILE = /config/ncp_config/ncp5.2_config/config/export.mk |
|
100 $(call push,MAKEFILE_STACK,$(MAKEFILE)) |
|
101 |
|
102 SECENVDIR = /ncp_sw/corecom/sec_env/bin_NCP_5_1/ |
|
103 |
|
104 DATAFILES = $(MAKEFILEDIR)data/base_directory.mke /epoc32/include/oem/ \ |
|
105 $(MAKEFILEDIR)data/HWRMLightsPolicy.ini /epoc32/data/Z/private/101f7a02/ \ |
|
106 $(MAKEFILEDIR)data/tcpip_52.ini /epoc32/data/z/private/101F7989/esock/ |
|
107 |
|
108 INCFILES = $(MAKEFILEDIR)inc/*.hrh /epoc32/include/oem/ \ |
|
109 $(MAKEFILEDIR)inc/*.hrh /epoc32/include/config/ncp52/ \ |
|
110 $(MAKEFILEDIR)inc/adaptation_conf.h /epoc32/include/internal/ |
|
111 |
|
112 ROMFILES = $(MAKEFILEDIR)rom/config/base_romfiles.txt /epoc32/rombuild/ \ |
|
113 $(MAKEFILEDIR)rom/config/rapido.ini /epoc32/rombuild/ \ |
|
114 $(MAKEFILEDIR)rom/config/x_conf_rapido_ncp52.txt /epoc32/rom/config/ncp52/ \ |
|
115 $(MAKEFILEDIR)rom/config/*.axf /epoc32/rom/config/ncp52/ \ |
|
116 $(MAKEFILEDIR)rom/config/*.mk /epoc32/rom/config/ncp52/ \ |
|
117 $(MAKEFILEDIR)rom/variant/*.* /epoc32/rom/config/ncp52/ \ |
|
118 $(MAKEFILEDIR)rom/include/*.* /epoc32/rom/config/ncp52/ \ |
|
119 $(MAKEFILEDIR)rom/include/*.* /epoc32/rom/include/ \ |
|
120 $(SECENVDIR)pa_cmt_NCP_5_1.bin /epoc32/rom/config/ncp52/ \ |
|
121 $(SECENVDIR)ppa_cmt_NCP_5_1.bin /epoc32/rom/config/ncp52/ |
|
122 |
|
123 TOOLFILES = $(MAKEFILEDIR)tools/*.* /epoc32/tools/ \ |
|
124 $(MAKEFILEDIR)tools/rom/image.txt /epoc32/tools/rom/ |
|
125 |
|
126 ncp52_config-data :: |
|
127 |
|
128 $(call addfiles, $(DATAFILES), ncp52_config-data) |
|
129 |
|
130 ncp52_config-inc :: |
|
131 |
|
132 $(call addfiles, $(INCFILES), ncp52_config-inc) |
|
133 |
|
134 ncp52_config-rom :: |
|
135 |
|
136 $(call addfiles, $(ROMFILES), ncp52_config-rom) |
|
137 |
|
138 ncp52_config-tools :: |
|
139 |
|
140 $(call addfiles, $(TOOLFILES), ncp52_config-tools) |
|
141 |
|
142 ncp52_config :: ncp52_config-data ncp52_config-inc ncp52_config-rom ncp52_config-tools |
|
143 |
|
144 $(call popout,MAKEFILE_STACK) |
|
145 }}} |