Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Knx on November 19, 2007, 02:31:29 am

Title: Custom Makefile
Post by: Knx on November 19, 2007, 02:31:29 am
Url (http://wiki.codeblocks.org/index.php?title=FAQ#Q:_My_project_should_be_compiled_with_a_custom_makefile._Is_it_possible_with_Code::Blocks.3F)
Quote
Q: My project should be compiled with a custom makefile. Is it possible with Code::Blocks?

A: Yes, you can. You need to change two different settings:

a) In "Compiler Settings", under the tab "Other", there's a setting called "Build Method". Choose "Work with makefiles".

b) In your project's Properties, you can choose to use a makefile. Check "This is a custom makefile" (WARNING! if you forget to check, the makefile will be OVERWRITTEN!)

And that's it! :)

a) It's disabled...
b) Couldn't proceed...

Why is it disabled?
Title: Re: Custom Makefile
Post by: Knx on November 19, 2007, 02:54:07 am
Doing only step b), I get this message:
Quote
mingw32-make.exe: *** No rule to make target `Release'.  Stop.
Title: Re: Custom Makefile
Post by: sylvia on December 04, 2007, 07:21:38 am
I have the same problem.
Can anyone be kind to answer it?
Title: Re: Custom Makefile
Post by: kisoft on December 04, 2007, 08:45:04 am
I have the same problem.
Can anyone be kind to answer it?

I doing used custom Makefile. I have no problems.

For example, create Makefile_my.
Set this name in project properties.
On compile, will called target Release. In my example target Release equ target all.
On CleanRelease, will called target clean.

Code
default:
@echo  ****************** Make DLL ******************
@make.CMD

Debug: all
Release: all

all :
@echo  ****************** Make DLL ******************
@make.CMD

cleanDebug: clean
cleanRelease: clean

clean:
@echo  ****************** Remove DLL ******************
@removeall.cmd

If you have questions, I ready to answer.

Good luck!
Title: Re: Custom Makefile
Post by: sylvia on December 04, 2007, 10:38:53 am
Thank you for your reply. I got it.  :D