Building a mk-project project

Starting

At first some basic informations will be required:

  • The programming language from the project.

    • C
    • C++
    • Python (2 or 3)
  • The project name which will become the program name

    In case of C/C++ the binary name.

    In case of Python the main python file.

  • The program version (Optional).

  • The folder where to generate the project.

    note:The folder must be empty.
  • The license of your project.

    • GPL
    • AGPL
    • LGPL
    • FDL
    • Apache 2.0 License
    • Clear BSD
    • Free BSD
    • Other
note:The license files will be copied into the project folder.

According to your settings some more informations will be required in relationship to the choosen programming language.

Main informations

Independently to the choosen programming language you can give following informations:

  • Documentation generators.

    note:For further information sea the page: mk-project documentation.
  • Other informations:

    • Make options: the options to pass to make at every call.
    • The bash location (auto-detect).
    • Compression level for the dist-* targets, with wich you can build an archive from your project.
  • Licensing boilerplate (to edit).

    According to the choosen license you can edit this boilerplate and use the prepend-license target

    to prepend this text to every source file.

  • Desktop boilerplate (to edit).

    You can build a desktop file with this boilerplate.

Specific to a C/C++ project

Compiler settings

  • Compiler:

    You can choose a compiler to use, which default to cc for C and c++ for C++.

    warning:The exactness of your entry will be checked by compiling a minimal program.
  • Warnings:

    You can set the warnings to use.

    warning:The field is empty per default.
  • CFLAGS:

    You can set the argument to give to the compiler (like -g, -O2,...).

  • CPPFLAGS:

    Preprocessor instruction to pass onto the compile command line.

  • LDFLAGS:

    Dynamic Linker Flags.

    Warning

    If you use pkg-config use the backticks syntax:

    `pkg-config --cflags library`
    

    Else this will not work because of the make syntax.

  • LDLIBS:

    Dynamic Linker library libraries: per example -lm.

    Warning

    If you use pkg-config use the backticks syntax:

    `pkg-config --libs library`
    

    Else this will not work because of the make syntax.

Files

Here you must set the extension you will use for the source and header files.

Especially for the C++ language:

  • Source files:

    • .cpp
    • .CPP
    • .c++
    • .C
    warning:This is very important because of the compilation automatisation which will not work with the wrong extension.
  • Header files:

    • .h
    • .hh
    • .H
    • .hp
    • .hxx
    • .hpp
    • .HPP
    • .h++
    • .tcc
note:For the C language this default to .c and .h.

Debugging

Here you can give the default options to pass to the debugging tools:

  • nm options.
  • readelf options.
  • strace options.
  • ltrace options.
  • objdump options.
  • ldd options.
  • gprof options.
note:For further informations sea the mk-project code investigating, debugging and disassembling page.

C/C++ code formatters

Here you can choose the code formatter(s) you want to use.

  • You can set the options to give to indent and to astyle for the indent-user and astyle-user target if you know this tools.
  • You can set the indentation width to use and wether to use tabulation or not during the formatting process.
note:For further information sea the page: mk-project code formatters

About informations

Here you can set some informations about your program.

  • Author(s).
  • Mail address.
  • Program URL.
  • Copyright string.
note:All this informations will generate some constant definition into the ./headers/defines.h file.

Specific to a Python project

Python project

Here you can choose the version of python to use:

  • Python 2

or

  • Python 3

You can choose the python interpreter to use.

Warning

Your entry will be checked by testing a minimal script.

Python code formatter

mk-project use pindent as python code formatter.

  • You can set the indentation width to use and wether to use tabulation or not during the formatting process.
note:For further information sea the page: mk-project code formatters

About informations

Here you can set some informations about your program.

  • Author(s).
  • Mail address.
  • Program URL.
  • Copyright string.