1 /*
2 * Copyright (c) 2009 Texas Instruments and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Texas Instruments - initial implementation
10 *
11 * */
12 /*
13 * ======== ITarget.xdc ========
14 */
15 package xdc.bld;
16
17 /*!
18 * ======== ITarget2 ========
19 * Extension of the interface {@link xdc.bld.ITarget}.
20 *
21 * This interface contains some common structures and config parameters
22 * shared by several packages that contain targets.
23 */
24 metaonlyinterface ITarget2 inherits ITarget {
25
26 /*!
27 * ======== Command ========
28 * Required command and options.
29 *
30 * The compile, link, and archive functions in this interface are
31 * implemented by expanding the strings specified in this structure
32 * and inserting strings from the Options structure to form a single
33 * command. The strings in this structure can not be changed by
34 * the user (they are fixed by the target), but the string in the
35 * Options structure may be changed by the user.
36 *
37 * The final command is:
38 * Command.cmd Options.prefix Command.opts Options.suffix
39 *
40 * @field(cmd) name of a tool-chain executable without any path
41 * information. The location of this executable is
42 * specified by the binDir (or pathPrefix)
43 * configuration parameter.
44 *
45 * @field(opts) required options passed to the command; these options
46 * can not be changed or eliminated by user's
47 * configuration script.
48 */
49 struct Command {
50 string cmd; /*! the command to run */
51 string opts; /*! required options for the command */
52 }
53
54 /*!
55 * ======== Options ========
56 * User configurable command options.
57 *
58 * The option strings allow the user to pass additional parameters to the
59 * executable that is responsible for compiling, linker, or archiving.
60 * See `{@link #Command xdc.bld.ITarget2.Command}`.
61 */
62 struct Options {
63 string prefix; /*! options that appear before Command.opts */
64 string suffix; /*! options that appear after Command.opts */
65 }
66
67 /*!
68 * ======== ar ========
69 * The command used to create an archive
70 */
71 readonlyconfig Command ar;
72
73 /*!
74 * ======== arOpts ========
75 * User configurable archiver options.
76 */
77 config Options arOpts = {
78 prefix: "",
79 suffix: ""
80 };
81
82 /*!
83 * ======== lnk ========
84 * The command used to link executables.
85 */
86 readonlyconfig Command lnk;
87
88 /*!
89 * ======== lnkOpts ========
90 * User configurable linker options.
91 */
92 config Options lnkOpts = {
93 prefix: "",
94 suffix: ""
95 };
96
97 /*!
98 * ======== cc ========
99 * The command used to compile C/C++ source files into object files
100 */
101 readonlyconfig Command cc;
102
103 /*!
104 * ======== ccOpts ========
105 * User configurable compiler options.
106 */
107 config Options ccOpts = {
108 prefix: "",
109 suffix: ""
110 };
111
112 /*!
113 * ======== ccConfigOpts ========
114 * User configurable compiler options for the generated config C file.
115 *
116 * By default, this parameter inherits values specified in
117 * `{@link #ccOpts ccOpts}`. The strings `"$(ccOpts.prefix)"` and
118 * `"$(ccOpts.suffix)"` are expanded into the values specified by
119 * `{@link #ccOpts ccOpts}` for this target.
120 */
121 config Options ccConfigOpts = {
122 prefix: "$(ccOpts.prefix)",
123 suffix: "$(ccOpts.suffix)"
124 };
125
126 /*!
127 * ======== asm ========
128 * The command used to assembles assembly source files into object files
129 */
130 readonlyconfig Command asm;
131
132 /*!
133 * ======== asmOpts ========
134 * User configurable assembler options.
135 */
136 config Options asmOpts = {
137 prefix: "",
138 suffix: ""
139 };
140
141 /*!
142 * ======== includeOpts ========
143 * Additional user configurable target-specific include path options
144 */
145 config string includeOpts;
146 }
147 /*
148 * @(#) xdc.bld; 1, 0, 2,300; 1-26-2011 10:39:07; /db/ztree/library/trees/xdc/xdc-v56x/src/packages/
149 */
150