Gettin目标模式不包含'%'从未修改的makefile?

时间:2017-05-20 10:41:14

标签: c++ makefile

,我知道this问题,但它对我没有帮助。我在linux上有这个Makefile:

appname := hesaff

PARALLELOPENCV=$(HOME)/ParallelOpenCV/install_gcc
INCLUDE=$(PARALLELOPENCV)/include
OPENCVLIB=$(PARALLELOPENCV)/lib

CCDIR=/home/luca/Dropbox/HKUST/CloudCache/cloudcache/CloudCache/Descriptors/hesaff

INTEL_INSPECTOR=-g -O0 -qopenmp-link dynamic -qopenmp
INTEL_OPT=-O3 -simd -xCORE-AVX2 -parallel -qopenmp -fargument-noalias -ansi-alias -no-prec-div -fp-model fast=2 -fma -align -finline-functions
#better not include -ipo for advisor and -qopt-report
#-ipo -fargument-noalias -ansi-alias -no-prec-div -fp-model fast=2 -fma -align -finline-functions

INTEL_PROFILE=-g -qopt-report=5 -Bdynamic -shared-intel -debug inline-debug-info -qopenmp-link dynamic -parallel-source-info=2 -ldl

CXX := icpc
CXXFLAGS := -I/opt/intel/advisor_2017.1.1.486553/include/ -I$(CCDIR) -I$(INCLUDE) $(INTEL_PROFILE) $(INTEL_OPT) -std=c++11


LDFLAGS= -L$(OPENCVLIB) $(INTEL_PROFILE) $(INTEL_OPT)
LDLIBS= -ltbb -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs

srcfiles := $(shell find . -name "*.cpp")
headerfiles := $(shell find . -name "*.hpp")
srcfiles := $(srcfiles) $(shell find $(CCDIR) -name "*.cpp" ! -name "hesaff.cpp")
headerfiles := $(headerfiles) $(shell find $(CCDIR) -name "*.hpp")

objects := $(patsubst %.cpp,%.o,$(notdir $(srcfiles)))

VPATH := $(sort $(dir $(srcfiles)))

all: $(srcfiles) $(appname)

$(appname): $(objects)
    $(CXX) -o $(appname) $(objects) $(LDLIBS) $(LDFLAGS)

depend: .depend

.depend: $(srcfiles) $(headerfiles)
    rm -f ./.depend
    $(CXX) $(CXXFLAGS) $(CXXDISALBE) -MM $^>>./.depend;

clean:
    rm -f $(appname) $(objects)

dist-clean: clean
    rm -f *~ .depend

include .depend

我收到此错误:

makefile:32: *** target pattern contains no '%'.  Stop.

最奇怪的是,我根本不记得改变它并且突然之间它开始出现这个错误,为什么?

1 个答案:

答案 0 :(得分:0)

我自己发现了问题:英特尔顾问创建了一个名为advixe的新目录,它创建了错误。移动它解决了这个问题。