Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: sumalama on May 28, 2016, 05:46:55 pm

Title: source code compile/build with makefile.am
Post by: sumalama on May 28, 2016, 05:46:55 pm
Hi,

I have c source file with lots of folders containing c files and in the root folder it has makefile.am, configure.ac, .pc.in etc

How can I load this project in code blocks and compile/build them. do i have to run the makefile.am?

Thanks
Title: Re: source code compile/build with makefile.am
Post by: BlueHazzard on May 29, 2016, 02:33:32 pm
Do you simply want to compile this project? I would recommend to use the console approach, it is easy and fast, and you don't have to fiddle around...

Do you want to convert it to a c::b project? Does  the makefile something fancy? Or is it only a thing about compiling one single executable/library?

NOTE: This steps are not tested, it may be that there are errors...

if the makefile does something fancy:
1) create a new project (empty project) -> finish the wizard
2) Project->Properties
 a) tick at "This is a custom Makefile" and enter the name of the makefile (the project should be in the same folder as the makefile)
 b) ok
3) Add all files with Project -> Add files recursively
4) save and try to compile

if the makefile does nothing special (for ex. one simple target)
1) Create a project (empty project, or library, or console, dont know what your files are about)
2) Add all files recursively

if there are errors:
http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

if you give some more information we can help better...

greetings
Title: Re: source code compile/build with makefile.am
Post by: sumalama on May 31, 2016, 01:16:59 pm
thank you for this suggestion, the technique worked but i got build error in makefile