dmake: move . this fixes compiler errors when compiling with some old gcc 3.X compiler
This commit is contained in:
parent
385c9d341d
commit
16427b40b9
4
Makefile
4
Makefile
|
@ -173,12 +173,12 @@ EXTOBJ += $(TINYXML)
|
|||
###### Targets
|
||||
|
||||
cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LIBS)
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LIBS) $(LDFLAGS)
|
||||
|
||||
all: cppcheck testrunner
|
||||
|
||||
testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/filelister.o cli/pathmatch.o
|
||||
$(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)
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) cli/threadexecutor.o cli/cppcheckexecutor.o cli/cmdlineparser.o cli/filelister.o cli/pathmatch.o $(EXTOBJ) $(LIBS) $(LDFLAGS)
|
||||
|
||||
test: all
|
||||
./testrunner
|
||||
|
|
|
@ -81,14 +81,13 @@ static void compilefiles(std::ostream &fout, const std::vector<std::string> &fil
|
|||
|
||||
static void getCppFiles(std::vector<std::string> &files, const std::string &path)
|
||||
{
|
||||
std::map<std::string,long> filesizes;
|
||||
FileLister::recursiveAddFiles(files, filesizes, path);
|
||||
// only get *.cpp files..
|
||||
for (std::vector<std::string>::iterator it = files.begin(); it != files.end();) {
|
||||
if (it->find(".cpp") == std::string::npos)
|
||||
it = files.erase(it);
|
||||
else
|
||||
++it;
|
||||
std::map<std::string,size_t> filemap;
|
||||
FileLister::recursiveAddFiles(filemap, path);
|
||||
|
||||
// add *.cpp files to the "files" vector..
|
||||
for (std::map<std::string,size_t>::const_iterator it = filemap.begin(); it != filemap.end(); ++it) {
|
||||
if (it->first.find(".cpp") != std::string::npos)
|
||||
files.push_back(it->first);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -310,10 +309,10 @@ int main(int argc, char **argv)
|
|||
|
||||
fout << "\n###### Targets\n\n";
|
||||
fout << "cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)\n";
|
||||
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LIBS)\n\n";
|
||||
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LIBS) $(LDFLAGS)\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 << "\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 << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) cli/threadexecutor.o cli/cppcheckexecutor.o cli/cmdlineparser.o cli/filelister.o cli/pathmatch.o $(EXTOBJ) $(LIBS) $(LDFLAGS)\n\n";
|
||||
fout << "test:\tall\n";
|
||||
fout << "\t./testrunner\n\n";
|
||||
fout << "check:\tall\n";
|
||||
|
|
Loading…
Reference in New Issue