Hello, world!
This is my first post on DaniWeb, though I have frequented it quite often.
I'm using gcc and make (on Ubuntu 10.10) with GVim for creating a foundation library in C. Within my code I've built in rudimentary profiling and assertion policies that are enabled through a symbolic constant evd_comvar_debug
. The appropriate entries in my makefile are as follows:
# compile-time symbolic constants; 'evd' is a namespace
# evd_comvar_ndebug is supposed to switch off debugging
# evd_comvar_debug is supposed to switch on debugging
#
evd_comvar_ndebug = 0
evd_comvar_debug =1
# makefile variable to toggle the debugging option
# in this case, we have chosen to switch on debugging
#
ppd_dbg = evd_comvar_debug
# conditional selection of output directory for the compiled archive
# if debugging is enabled, the compiled archive should be saved in ./lib/dbg
# if debugging is disabled, the compiled archive should be saved in ./lib/rls
#
ifeq ( ${ppd_dbg}, evd_comvar_debug )
pth_lib = ./lib/dbg
else[ICODE][/ICODE]
pth_lib = ./lib/rls
endif
# object archive generation
# flg_ar are flags to be passed to 'ar'
# bin_obj specifies the list of objects that have been compiled
#
flg_ar = rvu ${pth_lib}/$@ ${bin_obj}
Now, I have seen that debugging is switched on/off as expected during the compilation process by setting ppd_dbg
to evd_comvar_debug
or evd_comvar_ndebug
. This is OK, as it is the expected behaviour.
My problem is, that no matter what the value of ppd_dbg
, the generated archive file is being saved in ./lib/rls
. It should be saving in ./lib/dbg
if ppd_dbg
is set to evd_comvar_debug
, but this is not happening.
Any advice would be most welcome.
Thanks in advance.