Author Topic: how to build using custom makefile?  (Read 10105 times)

maHo

  • Guest
how to build using custom makefile?
« on: December 21, 2004, 02:39:16 pm »
Hello.

I have project which should be build using custom makefile. I'm building it in mingw console using "make" command, and I'm using codeblocks only for editing.

It would be nice, if I could use codeblocks to whole developing process, but I don't want to resign from my automake/autoconf based makefile.

when I was using devcpp, there was such possibility. in codeblocks I can't find such.

is it possible in current state of code::blocks?

If no, is it possible to do it by writing plugin?

regards

maHo

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
how to build using custom makefile?
« Reply #1 on: December 24, 2004, 05:09:31 pm »
It is supported now. It was a minor change, so I implemented it.
The next version (due out one of these days), will support it.

Yiannis.
Be patient!
This bug will be fixed soon...

NickCt

  • Guest
I did not manage to use my own different makefiles for ....
« Reply #2 on: May 03, 2005, 11:41:35 pm »
I am a new user of Code Blocks - it seems great to me and I'll try hard to use it with wxWidgets Congratulations for the creators My problem for the forum is:
    I didn't manage to  use custom builds that is, my own different  makefiles for different builds . What is the procedure -step by step - to use my own makefiles for dif builds !!! say "build borland debug dll" (with custom makefile),"build gcc release dll" (with another custom makefile)[/list:u]
      Where can I find extended help for Code blocks ( I would like Code Blocks help and wxWidgets help included in Code::Blocks also but it is not a must unless it might be included on right click  on a words(wxWidgets Help.chm I mean!!!) which would be a great help )[/list:u]
        Where can I find an explanation on how the general / project settings for a compiler are used ? [/list:u]
          Thank you ![/list:u]

      Offline mandrav

      • Project Leader
      • Administrator
      • Lives here!
      • *****
      • Posts: 4291
        • Code::Blocks IDE
      how to build using custom makefile?
      « Reply #3 on: May 04, 2005, 08:28:46 am »
      You can have one custom makefile per-project, which you can set in project properties.
      Your makefile's targets should match the targets of your project if you want to be able to do anything else than a "make all" (btw, you will want to avoid spaces in target names).

      When you try it, come here for help with any problems that may have risen :)

      Yiannis.
      Be patient!
      This bug will be fixed soon...

      Anonymous

      • Guest
      how to build using custom makefile?
      « Reply #4 on: May 04, 2005, 01:03:49 pm »
      Hello,

      Including help in codeblocks is really easy to do. Check my little plugin in General forum (http://www.codeblocks.org/index.php?name=PNphpBB2&file=viewtopic&t=292) and wxHelpController documentation for chm files.

      NickCt

      • Guest
      how to build using custom makefile?
      « Reply #5 on: May 08, 2005, 12:03:00 am »
      It's ok with the help.
      But problems with the makefile build. Untill i'll be able to build a plugin and to work with the source ,is it possible to capture the output from tools in a compilers window  ? - as I use tools to build with makefiles
      I could not configure the system to work with makefiles. It must be something with the environment -  I use 3-4  copilators at the same time and none's path  is in the environment usualy.
      Thank  you!

      Offline mandrav

      • Project Leader
      • Administrator
      • Lives here!
      • *****
      • Posts: 4291
        • Code::Blocks IDE
      how to build using custom makefile?
      « Reply #6 on: May 08, 2005, 09:04:13 am »
      Can you give a little more info on what exactly you 're trying to do? Maybe then I can be of more help...

      Yiannis.
      Be patient!
      This bug will be fixed soon...

      Anonymous

      • Guest
      how to build using custom makefile?
      « Reply #7 on: May 17, 2005, 04:59:17 pm »
      I use BCC55,gcc,avr-gcc (diff assemblers too ),VC++6,.... . I intend to use  wxWindows exclusively in my projects and  I think CB will be VERY good!

       1. How do I register a compiler - I use avr-gcc for microcontroler (avr)  programs. Is it possible to use different gcc versions at the same time? ( 3.3.1, 3.4.2 )
       2. I use different tools - asembler for example - mostly with makefiles . I would like to have the output of the tool captured  in a window , so to jump to the file/line where an error occured.
       3. To integrate practically any tool , the most simple solution would be :
              -  to be able to capture the output of the tool in a window
              -  to be able to jump to the error  (file,line,column) - as defined by me - with dblclk in the output window  SEE : http://conic.clawz.com/ToolCapture.jpg solution  from pn2
       4. Are the compiler, project settings and build option cumulative ??
              Are these true :
                  - the options defined for a compilers aplies to all projects when compiled with that compiler
                  - the options defined for a project are added to command line together with the compiler options for any build in the project
                  - what is defined for a build is added to that build only

                  - does the system have implicit search paths? - can I change them for a project?
                       
                  - how can I see the command line (when compiling a file or linking ....) ?-It would be very good for debuging, options control, see the way the IDE reacts at option  changes.
        Thak you. Nick.

      Offline mandrav

      • Project Leader
      • Administrator
      • Lives here!
      • *****
      • Posts: 4291
        • Code::Blocks IDE
      how to build using custom makefile?
      « Reply #8 on: May 17, 2005, 08:25:38 pm »
      Quote
      1. How do I register a compiler - I use avr-gcc for microcontroler (avr) programs. Is it possible to use different gcc versions at the same time? ( 3.3.1, 3.4.2 )

      "Compile->Compiler options" and create a copy of a compiler (in your case, GCC). So, yes, you can use as many different compilers as you like.

      Quote
      2. I use different tools - asembler for example - mostly with makefiles . I would like to have the output of the tool captured in a window , so to jump to the file/line where an error occured.

      The output of the currently running command is displayed in the compiler log, provided you 're having full logging on - see below). So, if the current file is processed by an assembler, the assembler's output will be captured.

      Quote
      3. To integrate practically any tool , the most simple solution would be :
      - to be able to capture the output of the tool in a window
      - to be able to jump to the error (file,line,column) - as defined by me - with dblclk in the output window SEE : http://conic.clawz.com/ToolCapture.jpg solution from pn2

      This exists since beta5 or 6. "Compile->Compiler options->Other->Advanced options->Output parsing". It's using regex's so it's very powerful.

      Quote
      4. Are the compiler, project settings and build option cumulative ??
      Are these true :
      - the options defined for a compilers aplies to all projects when compiled with that compiler
      - the options defined for a project are added to command line together with the compiler options for any build in the project
      - what is defined for a build is added to that build only

      Yes to all. On top of that, you can configure the order of precedence for target's options using the "Policy" combobox above these settings.

      Quote
      - does the system have implicit search paths? - can I change them for a project?

      The compiler search paths are found in "Compile->Compiler options".

      Quote
      - how can I see the command line (when compiling a file or linking ....) ?-It would be very good for debuging, options control, see the way the IDE reacts at option changes.

      "Compile->Compiler options->Other->Compiler logging" and set it to "Full command line". This is a per-compiler setting so you 'll have to set it for every compiler you care.

      HTH,
      Yiannis.
      Be patient!
      This bug will be fixed soon...

      Anonymous

      • Guest
      how to build using custom makefile?
      « Reply #9 on: May 18, 2005, 08:35:15 pm »
      It' OK. I have now a better "big picture " on how I should use cb.
      Thank you very much!

      Nick