Author Topic: How to create custom makefile project?  (Read 3680 times)

Grant.Edwards

  • Guest
How to create custom makefile project?
« on: August 06, 2021, 11:02:20 pm »

I have an existing Linux-hosted C project (for an embedded system)
that uses gcc with a gnu makefile. That is not going to change.

However, I'd like to try using Code::Blocks to browse/edit files, and
then be able to run an arbitrary, user-defined shell command to do a
build. It would be nice (but not required) for Code::Blocks to
recognize/parse gcc error messages in the output from that shell
command.

After googling and searching the forum, I've seen various references
to "custom makefile" projects, but after more searching and manual
browsing, I'm still baffled as to how to create one. All the "answers"
I've found are about converting an existing C::B project to use a
custom makefile.

How do I create a custom makefile project from an existing C source
tree with an extant makefile?

Is it possible to just point C::B at a tree of C source and browse
through it?

Thanks,

--
Grant

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How to create custom makefile project?
« Reply #1 on: August 07, 2021, 12:03:59 am »
Do:
1. File -> New -> Project -> Empty project
2. After project creation set Project -> Properties -> Project settings -> This is custom makefile
3. Create one or more targets
4. Edit Project -> Build options -> Make command to suite your makefile
5. Add all the files to the project and targets, so you can see them, or use the filemanager plugin.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]