Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: d14ec8652c1aa944255335ae61dca891ad1514a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html lang="en">

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Creating a make target</title>
<link rel="stylesheet" type="text/css" href="../help.css">
</head>

<body>

<h1>Creating a make target</h1>

<p>A make target is an action called by the make utility to perform a customized 
build-related task. For example, many makefiles support a target named clean, 
which is called as make clean. You can call your own target (such as myMakeAction) to be called as make myMakeAction.</p>

<p>You can also use a make target 
to pass options such as CPULIST=x86, which causes the make utility to build only 
for x86. These options work only if they are already defined in the makefile. </p>

<p>If you have added your own make targets, you can configure the CDT to call them 
specifically. For more information, see <a href="cdt_t_proj_build_set.htm">
Defining build settings</a>.</p>

<p>To create a customized make target:</p>

<ol>
  <li>In the C/C++ Projects view, right-click a project, and select <b>Create Make 
  Target</b>.</li>
  <li>In the <b>Target Name</b> box, type the name of the make target.</li>
  <li>In the <b>Build Target</b> box, type a build target.</li>
  <li>Select one of the following:</li>
  <ul>
  <li><b>Stop On Error</b> to stop the build when an error is encountered.</li>
  <li><b>Keep Going On Error</b> to continue the build even if an error is 
  encountered.</li>
  </ul>
  <li>Select one of the following:</li>
  <ul>
  <li>Select the <b>Use Default</b> check box to use the default make command.</li>
  <li>Clear the <b>Use Default</b> check box to use a different make utility to build your project and 
  enter your own command in the <b>Build Command</b> box.</li>
  </ul>
<li>Click <b>OK</b>.</li>
  <p>The target option is added under the <b>Build Make Target</b> menu item on the C/C++ 
Projects view context menu.</p>
  <p>You can view the output of the make 
  utility in the C-Build view.</p>
</ol>

<p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
<br>
<a href="../concepts/cdt_c_build_over.htm">Build overview</a></p>
<p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
<br>
<a href="cdt_t_proj_build_set.htm">Defining build settings</a><br>
<a href="cdt_o_build_task.htm">Building</a></p>
<p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21"> <br>
<a href="../reference/cdt_u_newproj_buildset.htm">Make Builder page, C/C++ Properties window</a></p>
<img src="../images/ngtasks.gif" ALT="IBM Copyright Statement" BORDER=0 width="324" height="14">

</body>

</html>

Back to the top