I am trying to port my Windows program to Linux. Then I begin to write
makefile. But I meet a problem: I can't access environment variable in
the makefile. I have searched a lot but find no result.
In some documents, it says, in makefile, we can use environment
variable, but how?
I have tried (to environment variable XXX):
it always doesn't work.
I have added a variable in the makefile
INCLUDE_FLAGS := -I$$THREADPOOL_DIR/include
and the following is the overrided default rule:
%.o : %.cpp
$(FileModule_CXX) $(FileModule_CXXFLAGS) $(INCLUDE_FLAGS) $< -
c -o $@
which will refer to the INCLUDE_FLAGS.
But when I make the program, it always complain, can't find header
file which exactly exists in directory:
and I can cd to above directory in shell by: