S
sinbad
there is a source file "common.c" which will get linked with different
modules.the code in common.c will look like this.
common.c
--------
#ifdef FEAT_ENABLE
/* function_set_1*/
#else
/* function_set_2*/
#endif
common.c will get linked with two independent modules (1.c and 2.c).
FEAT_ENABLE is defined for 1.c and not for 2.c.
now common.o will get generated while compiling for 1.c.
since FEAT_ENABLE is defined for 1.c, common.o now contains
function_set_1.
now the problem is since common.o is already generated while 1.c is
compiled,
For 2.c "gnu make" is not recompiling common.c to generate the new
common.o
which should contain function_set_2 (which is suppose to be the
desired result);
what can be done for this, i want common.c to always be compiled for
each module(1.c,2.c);
modules.the code in common.c will look like this.
common.c
--------
#ifdef FEAT_ENABLE
/* function_set_1*/
#else
/* function_set_2*/
#endif
common.c will get linked with two independent modules (1.c and 2.c).
FEAT_ENABLE is defined for 1.c and not for 2.c.
now common.o will get generated while compiling for 1.c.
since FEAT_ENABLE is defined for 1.c, common.o now contains
function_set_1.
now the problem is since common.o is already generated while 1.c is
compiled,
For 2.c "gnu make" is not recompiling common.c to generate the new
common.o
which should contain function_set_2 (which is suppose to be the
desired result);
what can be done for this, i want common.c to always be compiled for
each module(1.c,2.c);