summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'documentation')
-rw-r--r--documentation/sdk-manual/working-projects.rst28
1 files changed, 21 insertions, 7 deletions
diff --git a/documentation/sdk-manual/working-projects.rst b/documentation/sdk-manual/working-projects.rst
index ceae1fedd5..d64dae435f 100644
--- a/documentation/sdk-manual/working-projects.rst
+++ b/documentation/sdk-manual/working-projects.rst
@@ -56,7 +56,9 @@ project:
56 Create the remaining 56 Create the remaining
57 three files as follows: 57 three files as follows:
58 58
59 - ``hello.c``:: 59 - ``hello.c``:
60
61 .. code-block:: c
60 62
61 #include <stdio.h> 63 #include <stdio.h>
62 64
@@ -66,7 +68,9 @@ project:
66 return 0; 68 return 0;
67 } 69 }
68 70
69 - ``configure.ac``:: 71 - ``configure.ac``:
72
73 .. code-block:: none
70 74
71 AC_INIT(hello,0.1) 75 AC_INIT(hello,0.1)
72 AM_INIT_AUTOMAKE([foreign]) 76 AM_INIT_AUTOMAKE([foreign])
@@ -74,7 +78,9 @@ project:
74 AC_CONFIG_FILES(Makefile) 78 AC_CONFIG_FILES(Makefile)
75 AC_OUTPUT 79 AC_OUTPUT
76 80
77 - ``Makefile.am``:: 81 - ``Makefile.am``:
82
83 .. code-block:: none
78 84
79 bin_PROGRAMS = hello 85 bin_PROGRAMS = hello
80 hello_SOURCES = hello.c 86 hello_SOURCES = hello.c
@@ -271,7 +277,9 @@ example:
271 277
272 Create the three files as follows: 278 Create the three files as follows:
273 279
274 - ``main.c``:: 280 - ``main.c``:
281
282 .. code-block:: c
275 283
276 #include "module.h" 284 #include "module.h"
277 void sample_func(); 285 void sample_func();
@@ -281,12 +289,16 @@ example:
281 return 0; 289 return 0;
282 } 290 }
283 291
284 - ``module.h``:: 292 - ``module.h``:
293
294 .. code-block:: c
285 295
286 #include <stdio.h> 296 #include <stdio.h>
287 void sample_func(); 297 void sample_func();
288 298
289 - ``module.c``:: 299 - ``module.c``:
300
301 .. code-block:: c
290 302
291 #include "module.h" 303 #include "module.h"
292 void sample_func() 304 void sample_func()
@@ -321,7 +333,9 @@ example:
321 two lines that can be used to set the :term:`CC` variable. One line is 333 two lines that can be used to set the :term:`CC` variable. One line is
322 identical to the value that is set when you run the SDK environment 334 identical to the value that is set when you run the SDK environment
323 setup script, and the other line sets :term:`CC` to "gcc", the default 335 setup script, and the other line sets :term:`CC` to "gcc", the default
324 GNU compiler on the build host:: 336 GNU compiler on the build host:
337
338 .. code-block:: Makefile
325 339
326 # CC=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux 340 # CC=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux
327 # CC="gcc" 341 # CC="gcc"