News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Makefile execution directory

Started by gbr, November 21, 2008, 07:33:31 PM

Previous topic - Next topic

gbr

Hi,

I'm moving some Makefile projects into Code::Blocks.  My directory structure is:


[dir]src
     [sub dir 1]project (contains source)
          [sub dir 2]makefile_dir


All of my source is in src/project, and my Makefile is in src/project/makefile_dir.  I can get Code::Blocks to use the proper Makefile, but it seems to want to execute it from the src/project directory rather than the src/project/makefile_dir directory.  Because of this, all the references in the Makefile to my source code are wrong.  The Makefile points to all source code as ../, which is correct since the Makefile is in a subdir.  But it's wrong for where Code::Blocks executes the Makefile.

I hope that's clear enough. 

My question is, can I make Code::Block chdir to makefile_dir before executing make?

Thanks,
Gerald

gbr



I went into Project->Build Options->Makefile and added 'cd dir;' in front of the makefile.

Gerald