Wednesday, May 18, 2011

Generating Doxygen Output

To generate the output of C code using Doxygen, one has to generate a Doxygen Configuration file and customize some options there according to one's requirement. The steps that I generally follow are listed below:

  1. doxygen -g [config-file-name-optional]: if the file name is given then configuration file is named that else it is Doxyfile.
  2. Edit Doxyfile. I prefer it with vim, so
    vim Doxyfile
    Then set following options:
    1. OPTIMISE_OUTPUT_FOR_C = YES
    2. FILE_PATTERNS = *.c *.h
    3. RECURSIVE = YES
    4. EXTRACT_ALL = YES
    5. EXTRACT_STATIC = YES
    6. SHOW_INCLUDE_FILES = NO
    7. Save and exit the vim editor with the key combination [esc]:wq
  3. Now just run doxygen by issuing command
    doxygen [config-file-name-optional]. In my case I write just doxygen
  4. Two folders are created html/ and latex/.
Start browsing your documentation in any browser by clicking on the files.html present in the html/ folder.
To generate pdf we need the latex/ folder. How to generate pdf? Use pdflatex tool.

No comments:

Post a Comment