Ticket: #2823 (cppcheck fails to build with system tinymxl and -Wl,--as-needed)
This commit is contained in:
parent
82f436c367
commit
e49763b14f
10
Makefile
10
Makefile
|
@ -9,10 +9,10 @@ endif
|
||||||
|
|
||||||
ifeq ($(HAVE_RULES),yes)
|
ifeq ($(HAVE_RULES),yes)
|
||||||
CXXFLAGS += -DHAVE_RULES
|
CXXFLAGS += -DHAVE_RULES
|
||||||
ifdef LDFLAGS
|
ifdef LIBS
|
||||||
LDFLAGS += -lpcre
|
LIBS += -lpcre
|
||||||
else
|
else
|
||||||
LDFLAGS=-lpcre
|
LIBS=-lpcre
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -128,12 +128,12 @@ EXTOBJ += $(TINYXML)
|
||||||
###### Targets
|
###### Targets
|
||||||
|
|
||||||
cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)
|
cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)
|
||||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LDFLAGS)
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LIBS)
|
||||||
|
|
||||||
all: cppcheck testrunner
|
all: cppcheck testrunner
|
||||||
|
|
||||||
testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/filelister.o cli/pathmatch.o
|
testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/filelister.o cli/pathmatch.o
|
||||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cppcheckexecutor.o cli/cmdlineparser.o cli/filelister.o cli/pathmatch.o $(LDFLAGS)
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) cli/threadexecutor.o cli/cppcheckexecutor.o cli/cmdlineparser.o cli/filelister.o cli/pathmatch.o $(EXTOBJ) $(LIBS)
|
||||||
|
|
||||||
test: all
|
test: all
|
||||||
./testrunner
|
./testrunner
|
||||||
|
|
|
@ -249,10 +249,10 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
fout << "ifeq ($(HAVE_RULES),yes)\n"
|
fout << "ifeq ($(HAVE_RULES),yes)\n"
|
||||||
<< " CXXFLAGS += -DHAVE_RULES\n"
|
<< " CXXFLAGS += -DHAVE_RULES\n"
|
||||||
<< " ifdef LDFLAGS\n"
|
<< " ifdef LIBS\n"
|
||||||
<< " LDFLAGS += -lpcre\n"
|
<< " LIBS += -lpcre\n"
|
||||||
<< " else\n"
|
<< " else\n"
|
||||||
<< " LDFLAGS=-lpcre\n"
|
<< " LIBS=-lpcre\n"
|
||||||
<< " endif\n"
|
<< " endif\n"
|
||||||
<< "endif\n\n";
|
<< "endif\n\n";
|
||||||
|
|
||||||
|
@ -286,10 +286,10 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
fout << "\n###### Targets\n\n";
|
fout << "\n###### Targets\n\n";
|
||||||
fout << "cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)\n";
|
fout << "cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)\n";
|
||||||
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LDFLAGS)\n\n";
|
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LIBS)\n\n";
|
||||||
fout << "all:\tcppcheck testrunner\n\n";
|
fout << "all:\tcppcheck testrunner\n\n";
|
||||||
fout << "testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/filelister.o cli/pathmatch.o\n";
|
fout << "testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/filelister.o cli/pathmatch.o\n";
|
||||||
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cppcheckexecutor.o cli/cmdlineparser.o cli/filelister.o cli/pathmatch.o $(LDFLAGS)\n\n";
|
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) cli/threadexecutor.o cli/cppcheckexecutor.o cli/cmdlineparser.o cli/filelister.o cli/pathmatch.o $(EXTOBJ) $(LIBS)\n\n";
|
||||||
fout << "test:\tall\n";
|
fout << "test:\tall\n";
|
||||||
fout << "\t./testrunner\n\n";
|
fout << "\t./testrunner\n\n";
|
||||||
fout << "check:\tall\n";
|
fout << "check:\tall\n";
|
||||||
|
|
Loading…
Reference in New Issue