doc: add examples to the Doxygen documentation
[libam7xxx.git] / HACKING.asciidoc
1 == Hacking libam7xxx
2
3 === Coding style
4
5 libam7xxx uses the linux kernel coding style:
6 http://kernel.org/doc/Documentation/CodingStyle
7
8 === Debug builds
9
10 The suggested way to hack on the project is:
11
12   $ mkdir build
13   $ cd build
14   $ cmake ../ -DCMAKE_BUILD_TYPE=debug -DSTRICT_COMPILATION_CHECKS=ON
15   $ make
16
17 If you want to check the code with the ''sparse'' static analysis tool you
18 can run:
19
20   $ mkdir build
21   $ cd build
22   $ cmake ../ -DCMAKE_C_COMPILER=cgcc
23   $ make
24
25 === Valgrind
26
27 You can run the test program under the http://valgrind.org/[valgrind]
28 dynamic analyzer by using a command like:
29
30   $ valgrind --leak-check=full --show-reachable=yes --track-origins=yes \
31     ./bin/picoproj -W 800 -H 480 -f my_image.jpg