On Wednesday 23 November 2005 06:44 am, [EMAIL PROTECTED] wrote:
> Hi, all,
>
> I'd like to override submake's CPPFLAGS when I run "make debug" at
> the top level. I've tried in my top level Makefile, for example:
>
> ...
> debug:
>       export CPPFLAGS=-g
>       $(MAKE) -C subdir
>
> In my sub Makefile, I used this kind of rules:
>
> ...
> %.o : %.cc
>       $(CXX) -c  $< -o $@ $(CPPFLAGS)
> ...
>
> I failed to get "-g" to my sub Makefile. Could you point out what
> might help? Or what can be an alternative solution?
>

Try
...
debug:
        $(MAKE) -C subdir CPPFLAGS=-g


  --Eric


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to