User forums > General (but related to Code::Blocks)

Directories for object files

<< < (2/3) > >>

mandrav:

--- Quote from: hd ---Hi,

(using cvs version of CodeBlocks)

This .objs directory solution is better than none...

--- End quote ---

Yes, think of it as the first step...

--- Quote from: hd ---- But if you have to use a source/header file in a directory which you don't
have write rights ?

--- End quote ---

You 've got a valid point. Expect a fix (i.e. configuration option) soon.

--- Quote from: hd ---- It does not solve common debug/release configuration problem

--- End quote ---

This "common debug/release configuration" is actually common between MSVC users. I never had the need for that. I always work with debugging flags on and when the project is done, I compile it as "release", i.e. stripped of debugging info and optimized.
Anyway, I 'll see what can be done about an "object-output" option *per-target*...

--- Quote from: hd ---  -requires rebuild every time ?-

--- End quote ---

Ofcourse no! How did you reach this conclusion?

Greetings,
Yiannis.

troels:

--- Quote from: mandrav ---
--- Quote from: hd ---I 'll see what can be done about an "object-output" option *per-target*...
--- End quote ---


It's in Beta5! Very well done, it's a killer feature. This is an amazing program!
/Troels
--- End quote ---

hd:
(Note: It is not me who started this again ;-))

Would you mind to look following makefile fragments please:

- This one is generated by ide

..\\..\\..\\_lib\\.deps\\LocaleUtils.d: ..\\..\\..\\_lib\\LocaleUtils.cpp
   @echo Calculating dependencies for "..\..\..\_lib\LocaleUtils.cpp"...
   -@if not exist ".\..\..\..\_lib\.deps\." mkdir ".\..\..\..\_lib\.deps"
   @$(CPP) -MM $(gc_release_CFLAGS) -MF ..\\..\\..\\_lib\\.deps\\LocaleUtils.d -MT ..\\..\\..\\_lib\\.orgc\\LocaleUtils.o $(gc_release_INCS) ..\\..\\..\\_lib\\LocaleUtils.cpp

..\\..\\..\\_lib\\.orgc\\LocaleUtils.o: ..\\..\\..\\_lib\\.deps\\LocaleUtils.d
   @echo Compiling "..\..\..\_lib\LocaleUtils.cpp"...
   -@if not exist ".\..\..\..\_lib\.orgc\." mkdir ".\..\..\..\_lib\.orgc"
   @$(CPP) $(gc_release_CFLAGS) $(gc_release_INCS) -c ..\\..\\..\\_lib\\LocaleUtils.cpp -o ..\\..\\..\\_lib\\.orgc\\LocaleUtils.o

..\\..\\..\\_lib\\.deps\\Lua_Interpreter.d: ..\\..\\..\\_lib\\Lua_Interpreter.cpp
   @echo Calculating dependencies for "..\..\..\_lib\Lua_Interpreter.cpp"...
   -@if not exist ".\..\..\..\_lib\.deps\." mkdir ".\..\..\..\_lib\.deps"
   @$(CPP) -MM $(gc_release_CFLAGS) -MF ..\\..\\..\\_lib\\.deps\\Lua_Interpreter.d -MT ..\\..\\..\\_lib\\.orgc\\Lua_Interpreter.o $(gc_release_INCS) ..\\..\\..\\_lib\\Lua_Interpreter.cpp

..\\..\\..\\_lib\\.orgc\\Lua_Interpreter.o: ..\\..\\..\\_lib\\.deps\\Lua_Interpreter.d
   @echo Compiling "..\..\..\_lib\Lua_Interpreter.cpp"...
   -@if not exist ".\..\..\..\_lib\.orgc\." mkdir ".\..\..\..\_lib\.orgc"
   @$(CPP) $(gc_release_CFLAGS) $(gc_release_INCS) -c ..\\..\\..\\_lib\\Lua_Interpreter.cpp -o ..\\..\\..\\_lib\\.orgc\\Lua_Interpreter.o




- This one is hand edited -again generated by ide-

.deps\\_lib\\LocaleUtils.d: ..\\..\\..\\_lib\\LocaleUtils.cpp
   @echo Calculating dependencies for "..\..\_lib\LocaleUtils.cpp"...
   -@if not exist ".deps\_lib\." mkdir ".\.deps\_lib"
   @$(CPP) -MM $(gc_release_CFLAGS) -MF .deps\\_lib\\LocaleUtils.d -MT .orgc\\_lib\\LocaleUtils.o $(gc_release_INCS) ..\\..\\..\\_lib\\LocaleUtils.cpp

.orgc\\_lib\\LocaleUtils.o: .deps\\_lib\\LocaleUtils.d
   @echo Compiling "..\..\_lib\LocaleUtils.cpp"...
   -@if not exist ".\.orgc\_lib\." mkdir ".\.orgc\_lib"
   @$(CPP) $(gc_release_CFLAGS) $(gc_release_INCS) -c ..\\..\\..\\_lib\\LocaleUtils.cpp -o .orgc\\_lib\\LocaleUtils.o

.deps\\_lib\\Lua_Interpreter.d: ..\\..\\..\\_lib\\Lua_Interpreter.cpp
   @echo Calculating dependencies for "..\..\_lib\Lua_Interpreter.cpp"...
   -@if not exist ".\.deps\_lib\." mkdir ".\.deps\_lib"
   @$(CPP) -MM $(gc_release_CFLAGS) -MF .deps\\_lib\\Lua_Interpreter.d -MT .orgc\\_lib\\Lua_Interpreter.o $(gc_release_INCS) ..\\..\\..\\_lib\\Lua_Interpreter.cpp

.orgc\\_lib\\Lua_Interpreter.o: .deps\\_lib\\Lua_Interpreter.d
   @echo Compiling "..\..\_lib\Lua_Interpreter.cpp"...
   -@if not exist ".\.orgc\_lib\." mkdir ".\.orgc\_lib"
   @$(CPP) $(gc_release_CFLAGS) $(gc_release_INCS) -c ..\\..\\..\\_lib\\Lua_Interpreter.cpp -o .orgc\\_lib\\Lua_Interpreter.o



IDE is confused nested directories, IMO.

Since both are working/compiling, maybe it is not that important...

--
Regards,
Hakki Dogusan

mandrav:
Hi Hakki :)

which CB version is exporting these two makefiles?
Up to (and including) beta5, the deps and objects dirs are created in the same dir with the file that is being compiled. This means that if you have a multi-dir source tree, in every dir with compilable files you will find .objs and .deps (assuming the default names) dir in each of these directories

The CVS version has changed this and creates .objs and .deps dir only once (where you configure it) and under there creates a directory tree same as the one your source files reside (I think it's the exact same behaviour as MSVC - wouldn't know 'cause I 've never used it but that's what I 'm told ;) )

I hope I cleared this a bit,
Yiannis.

hd:
Hi,

(cb version is "bleeding edge" :)))

I frist export makefile, then hand edit it.


If you design your project directories as cb, than there is no problem. I think that is the reason you
don't know about the problem?

But my project tree is as following:


/a_C/_lib                      (common source files are here)
/a_C/adret                    (project source files are here)
/a_C/build/cb                (cb project file is here)

/a_C/build/cb/.deps       (for dependency files)
/a_C/build/cb/.orgc        (for gcc release object files)
/a_C/build/cb/.odgc       (for gcc debug object files)
/a_C/build/cb/.ordm      (for dmc release object files)
/a_C/build/cb/.oddm      (for dmc debug object files)
/a_C/build/cb/.orvc        (for vc release object files)
/a_C/build/cb/.odvc       (for vc debug object files)
/a_C/build/cb/.orbc        (for bcc release object files)
/a_C/build/cb/.odbc       (for bcc debug object files)

Yes, I'm a dreamer :))


IMHO, if cb can remove "relativity" from object files than problem will solved.

ie:

instead of : ..\\..\\..\\_lib\\.deps\\LocaleUtils.d: ..\\..\\..\\_lib\\LocaleUtils.cpp

remove ..\\..\\..\\  and use this: .deps\\_lib\\LocaleUtils.d: ..\\..\\..\\_lib\\LocaleUtils.cpp


Hope I could tell my thinkings..

--
Regards,
Hakki Dogusan

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version