Makefile无法定位dependecies

时间:2015-06-13 09:35:55

标签: makefile

#
# Makefile
#

# compiler to use
CXX = clang++

# flags to pass compiler
CXXFLAGS = -ggdb3 -O0 -std=c++11 -Wall -Werror -pedantic-errors

# flags for the C PreProcessor
CPPFLAGS =  -MMD

# The maintainer's variant of CXXFLAGS
AM_CXXFLAGS =

# The command used to actually compile a C++ source file.
# The file name is appended to form the complete command line.
CXXCOMPILE =

# The command used to actually link a C++ program
CXXLINK =

# space-separated list of header files
HDRS =

# space-separated list of libraries, if any,
# each of which should be prefixed with -l
LIBS =  -lm -lpthread


# default target
# require that an argument be provided at the command line
# for the target name
TARGET = $(target)

> problem with this line
> It is just targeting the single .cpp
> But when I want make project folder 
#
# Makefile
#

# compiler to use
CXX = clang++

# flags to pass compiler
CXXFLAGS = -ggdb3 -O0 -std=c++11 -Wall -Werror -pedantic-errors

# flags for the C PreProcessor
CPPFLAGS =  -MMD

# The maintainer's variant of CXXFLAGS
AM_CXXFLAGS =

# The command used to actually compile a C++ source file.
# The file name is appended to form the complete command line.
CXXCOMPILE =

# The command used to actually link a C++ program
CXXLINK =

# space-separated list of header files
HDRS =

# space-separated list of libraries, if any,
# each of which should be prefixed with -l
LIBS =  -lm -lpthread


# default target
# require that an argument be provided at the command line
# for the target name
TARGET = $(target)
  

我无法定位头文件和相应的.cpp依赖项       全部:$(TARGET)        $(TARGET):$(TARGET).cpp; $(CXX)$(CXXFLAGS)$(CPPFLAGS)$(AM_CXXFLAGS)$(CXXCOMPILE)$(CXXLINK)$(HDRS)-o $(TARGET)$(TARGET).cpp $(LIBS

# housekeeping
clean:
    rm -f core

0 个答案:

没有答案