User forums > Using Code::Blocks

How to create a project through makefile in codeblocks

(1/1)

anandamu16:
I am new to codeblocks. I want to create my own project through makefile. How can I do so, any help?

My main purpose is to create a plugin. I look through the codeblocks svn code and check the plugin section. There i found that none of the plugins have any project (.cbp) file but only makefile.am. So I doubt that In codeblocks people use to develop plugins through makefile rather than using the codeblocks plugin wizard available within codeblocks.

BlueHazzard:
There are (multiple) project files for every plugin. But there are also Makefiles so codeblocks can be build without codeblocks


--- Quote ---So I doubt that In codeblocks people use to develop plugins through makefile rather than using the codeblocks plugin wizard available within codeblocks.
--- End quote ---
It is possible that the wizard is outdated or the project is not set up probably.

anandamu16:
Hi

--- Quote ---There are (multiple) project files for every plugin. But there are also Makefiles so codeblocks can be build without codeblocks

--- End quote ---

If you'll check the plugins directory "C:\zbcqcm\codeblocks_svn_code\code\src\plugins". None of the plugin has .cbp file corresponding to it. Only plugins available here "C:\zbcqcm\codeblocks_svn_code\code\src\plugins\contrib" have the cbp file. Why is it so?

Moreover If I guess that all core plugins are build up by makefile and contrib plugin is build by plugin wizard, Am I right?
Can you answer some of my queries?

- Debuggergdb is a core plugin or contrib plugin? as it doesn't contain any ,cbp file, i guess its a core plugin.
- From contrib plugin, if I open .cbp file and delete makefile, plugin project still execute fine, does it mean if I have .cbp, I don't need makefile?
- I want to start building a project from makefile, can you help me with any documentation?

BlueHazzard:
There are two completely independent ways to build codeblocks:
1) Using cb projects
2) Using Makefiles
Both have nothing to do with each other *). Cb project files are self-sustaining, all needed information is stored in there. You can't find project files for the core plugins because they are stored in the Codeblocks.cbp as targets. You can for example build the debugger plugin by selecting the target "Debugger" within the codeblocks source.



*) You have the possibility to use makefiles within the codeblocks project, by creating a Makefile project, or you set it up with Project->Properties->This is a custom Makefile
     Then the project file is simply a collection of file names, because the whole build process is handled by the makefile...
This is not how codeblocks itself is build. Codeblocks is build by either using Makefiles OR Project files /Workspace


--- Quote ---Can you answer some of my queries?
--- End quote ---
I hope i have answered all your question. If not please ask again ;)

cacb:

--- Quote from: BlueHazzard on February 22, 2017, 10:50:34 am ---There are two completely independent ways to build codeblocks:
1) Using cb projects
2) Using Makefiles
Both have nothing to do with each other

--- End quote ---

There is a tool called cbp2make for creating make files from codeblocks project files. Not sure how up to date it is now, but it can be a good way for distributing software to others (e.g. github).

Navigation

[0] Message Index

Go to full version