[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pass variables to submake
From: |
Chenfu.Wang |
Subject: |
Pass variables to submake |
Date: |
Wed, 23 Nov 2005 13:44:30 +0200 |
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?
I've used cygwin and my make is
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Br,
- Chenfu
- Pass variables to submake,
Chenfu.Wang <=