CBP2MAKE(1)

πŸ¦‹ NAME πŸ¦‹

okay so bestie, meet cbp2make β€” the code::blocks Makefile generation tool πŸ’…βœ¨. That's it, that's the whole name, and it hangs out in section 1 of the manual (the User Commands corner of the world, iykyk).


🌈 SYNOPSIS 🌈

cbp2make -in <project_file> [-cfg <configuration>] [-out <makefile>]
[-unix] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[,
...]]"] [--flat-objects] [--flat-objpath] [--wrap-objects]
[--wrap-options] [--with-deps] [--keep-objdir] [--keep-outdir]
[--target-case keep|lower|upper] [--macros-case keep|lower|upper]
[--quote-path auto|never|always]
cbp2make -list -in <project_file_list> [-cfg <configuration>] [-unix]
[-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
[--flat-objects] [--flat-objpath] [--wrap-objects] [--wrap-options]
[--with-deps] [--keep-objdir] [--keep-outdir] [--target-case
keep|lower|upper] [--macros-case keep|lower|upper] [--quote-path
auto|never|always]

✨ DESCRIPTION ✨

cbp2make is a stand-alone build tool πŸ› οΈ that lets you generate makefile(s) for GNU Make straight out of a Code::Blocks IDE project or workspace file. like, you hand it your IDE project and it hands you back a makefile. it's giving translation services but for build systems 🫢.


πŸ’… OPTIONS πŸ’…

  • -in <project_file> β€” points at an input file, or a whole list of files πŸ“‚
  • -cfg <configuration> β€” points at a configuration file, peep also the --local and --global options πŸ‘€
  • -out <makefile> β€” names the makefile (or a list of makefiles) you want out of this 🌸
  • -unix β€” turns on Unix / Linux compatible makefile generation 🐧
  • -windows β€” turns on Windows compatible makefile generation πŸͺŸ
  • -mac β€” turns on Macintosh compatible makefile generation 🍎
  • --all-os β€” turns on all target platforms at once, no picking favourites ✨
  • -targets "<target1>[,<target2>[, ...]]" β€” says these and only these build targets are the ones a makefile will be made for 🎯
  • --flat-objects β€” forces "flat" names for object files, with a limited character set πŸ”€
  • --flat-objpath β€” forces "flat" paths for object files, so there are no subdirectories πŸ—‚οΈ
  • --wrap-objects β€” allows multiline lists of objects, which makes a makefile easier to read πŸ“–
  • --wrap-options β€” allows multiline macros 🧡
  • --with-deps β€” allows a built-in dependency scanner for C/C++ projects πŸ”
  • --keep-objdir β€” disables the command that erases directories for object files in the 'clean' target 🧹🚫
  • --keep-outdir β€” disables the command that erases the directory for an output binary file in the 'clean' target 🧼🚫
  • --target-case [keep|lower|upper] β€” sets the style for makefile targets πŸ” 

πŸŽ€ Common options πŸŽ€

  • --local β€” use configuration from the current directory πŸ“
  • --global β€” use configuration from the home directory 🏠
  • --verbose β€” show project information πŸ—£οΈ
  • --quiet β€” hide all messages 🀫
  • --help β€” display this message πŸ“œ
  • --version β€” display version information 🏷️

🌟 CONFIGURATION 🌟

Some installation- or project-specific options β€” primarily toolchain settings β€” can be saved to a configuration file πŸ’Ύ. By default (since rev.110), cbp2make does not save any settings to a configuration file unless you, the user, explicitly specify the --config option. A configuration file can be either global (stored in the user profile / home directory) or local (stored in the current directory) πŸ πŸ“.

⚠️ please keep in mind: since cbp2make is in an early stage of development, an old configuration file may become incompatible with a new tool version 😭 and it may be necessary to update it manually or initialize a brand new one. no cap.

When cbp2make is invoked, first it tries to load a local configuration file. If a local configuration is missing, the next attempt will be to load a global one. If that attempt isn't successful either, the default built-in configuration is used 🫢. Configuration lookup order can be overridden with the --local or --global command line options. If one of those options is supplied to cbp2make, the non-specified configuration is not picked up even if the specified one is missing and the non-specified one does exist. periodt πŸ’….

πŸ”§ Manage toolchains

cbp2make --config toolchain --add [-unix|-windows|-mac] -chain
<toolchain>
cbp2make --config toolchain --remove [-unix|-windows|-mac] -chain
<toolchain>

🧰 Manage build tools

cbp2make --config tool --add [-unix|-windows|-mac] -chain <toolchain>
-tool <tool> -type <type> <tool options>
cbp2make --config tool --remove [-unix|-windows|-mac] -chain <toolchain>
-tool <tool>

πŸ–₯️ Manage platforms

cbp2make --config platform [-unix|-windows|-mac] [-pwd
<print_dir_command>] [-cd <change_dir_command>] [-rm
<remove_file_command>] [-rmf <remove_file_forced>] [-rmd
<remove_dir_command>] [-cp <copy_file_command>] [-mv
<move_file_command>] [-md <make_dir_command>] [-mdf <make_dir_forced>]
[-make <default_make_tool>]

🧚 Manage global compiler variables

cbp2make --config variable --add [-set <set_name>] -name <var_name>
[-desc <description>] [-field <field_name>] -value <var_value>
cbp2make --config variable --remove [-set <set_name>] [-name <var_name>]
[-field <field_name>]

βš™οΈ Manage options

cbp2make --config options --default-options "<options>"
cbp2make --config show

🏷️ Tool types:

  • pp β€” preprocessor
  • as β€” assembler
  • cc β€” compiler
  • rc β€” resource compiler
  • sl β€” static linker
  • dl β€” dynamic linker
  • el β€” executable linker
  • nl β€” native linker

πŸ› οΈ Tool options (common):

  • -desc <description>
  • -program <executable>
  • -command <command_template>
  • -mkv <make_variable>
  • -srcext <source_extensions>
  • -outext <output_extension>
  • -quotepath <yes|no>
  • -fullpath <yes|no>
  • -unixpath <yes|no>

🧡 Tool options (compiler):

  • -incsw <include_switch>
  • -defsw <define_switch>
  • -deps <yes|no>

πŸ”— Tool options (linker):

  • -ldsw <library_dir_switch>
  • -llsw <link_library_switch>
  • -lpfx <library_prefix>
  • -lext <library_extension>
  • -objext <object_extension>
  • -lflat <yes|no>

πŸ‘€ SEE ALSO πŸ‘€

  • codeblocks (1) β€” go say hi to the IDE that started all this πŸ’–

that's the whole page bestie, you ate it πŸ“βœ¨ β€” this was cbp2make, dated February 2014, and that's the sign-off, mwah πŸ’œπŸ¦‹